WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.6% of users enabled 2FA.

Commit 1d811787 authored by Kunshan Wang's avatar Kunshan Wang
Browse files

getID -> newID

parent 2100d28f
......@@ -98,17 +98,18 @@ class MicroVM(val vmConf: VMConf) extends IRBuilderListener {
/// Bundle building stuff
def newIRBuilder(): IRBuilder = {
val irBuilder = new IRBuilder(irBuilderRegistry.getID(), globalBundle, idFactory, Some(this))
val irBuilder = new IRBuilder(irBuilderRegistry.newID(), globalBundle, idFactory, Some(this))
irBuilderRegistry.put(irBuilder)
irBuilder
}
override def onBundleLoad(irBuilder: IRBuilder, bundle: TrantientBundle): Unit = {
addBundle(bundle)
irBuilderRegistry.remove(irBuilder)
}
override def onBundleAbort(irBuilder: IRBuilder): Unit = {
irBuilderRegistry.remove(irBuilder)
}
/**
......
......@@ -57,5 +57,5 @@ class IDObjectKeeper[T <: HasID](val kind: String) {
}
/** Create an ID for a new object of this type. */
def getID() = idFactory.getID()
def newID() = idFactory.getID()
}
......@@ -45,7 +45,7 @@ class ThreadStackManager(implicit microVM: MicroVM, nativeCallHelper: NativeCall
*/
def newStack(func: Function, mutator: Mutator): InterpreterStack = {
val stackMemory = microVM.memoryManager.makeStackMemory(mutator)
val id = stackRegistry.getID()
val id = stackRegistry.newID()
val sta = new InterpreterStack(id, stackMemory, func)
stackRegistry.put(sta)
sta
......@@ -55,7 +55,7 @@ class ThreadStackManager(implicit microVM: MicroVM, nativeCallHelper: NativeCall
* Create a new thread, bind to a given stack.
*/
def newThread(stack: InterpreterStack, threadLocal: Long, htr: HowToResume): InterpreterThread = {
val id = threadRegistry.getID()
val id = threadRegistry.newID()
val mutator = microVM.memoryManager.makeMutator("Itpr-%d".format(id))
val thr = new InterpreterThread(id, stack, threadLocal, htr, mutator)
threadRegistry.put(thr)
......@@ -76,7 +76,7 @@ class ThreadStackManager(implicit microVM: MicroVM, nativeCallHelper: NativeCall
* Create a new frame cursor for a stack.
*/
def newFrameCursor(stack: InterpreterStack): FrameCursor = {
val id = frameCursorRegistry.getID()
val id = frameCursorRegistry.newID()
val frame = stack.top
createAndAddFrameCursor(id, stack, frame)
}
......@@ -85,7 +85,7 @@ class ThreadStackManager(implicit microVM: MicroVM, nativeCallHelper: NativeCall
* Copy a frame cursor.
*/
def copyCursor(cursor: FrameCursor): FrameCursor = {
val id = frameCursorRegistry.getID()
val id = frameCursorRegistry.newID()
val stack = cursor.stack
val frame = cursor.frame
createAndAddFrameCursor(id, stack, frame)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment