public IRTSStack makeChild(int id) { RTSStack scope = Factory.getStack(mThread, id); scope.mSuper = this; return(scope); }
public static RTSStack getStack(IRTSThread thread, int id) { if (sStacks == null) { sStacks = new Queue <RTSStack>(RTSCfg.CALL_STACK_CACHE); } RTSStack sec; if (sStacks.Count > 0) { sec = sStacks.Dequeue(); sec.mThread = thread; sec.mId = id; } else { sec = new RTSStack(thread, id); } return(sec); }
public static void cacheStack(RTSStack stack) { stack.clearVars(); sStacks.Enqueue(stack); }