/** {@inheritDoc} */ @Override public final void localArg(Frame frame, int idx) { clearArgs(); args[0] = frame.getLocals().get(idx); argCount = 1; localIndex = idx; }
/** {@inheritDoc} */ public final void localArg(Frame frame, int idx) { clearArgs(); args[0] = frame.getLocals().get(idx); argCount = 1; localIndex = idx; }
/** {@inheritDoc} */ @Override public final void localArg(Frame frame, int idx) { clearArgs(); args[0] = frame.getLocals().get(idx); argCount = 1; localIndex = idx; }
/** {@inheritDoc} */ public final void localArg(Frame frame, int idx) { clearArgs(); args[0] = frame.getLocals().get(idx); argCount = 1; localIndex = idx; }
/** {@inheritDoc} */ public final void localArg(Frame frame, int idx) { clearArgs(); args[0] = frame.getLocals().get(idx); argCount = 1; localIndex = idx; }
/** {@inheritDoc} */ public final void localArg(Frame frame, int idx) { clearArgs(); args[0] = frame.getLocals().get(idx); argCount = 1; localIndex = idx; }
/** * Merges two frames. If the merged result is the same as this frame, * then this instance is returned. * * @param other {@code non-null;} another frame * @return {@code non-null;} the result of merging the two frames */ public Frame mergeWith(Frame other) { LocalsArray resultLocals; ExecutionStack resultStack; IntList resultSubroutines; resultLocals = getLocals().merge(other.getLocals()); resultStack = getStack().merge(other.getStack()); resultSubroutines = mergeSubroutineLists(other.subroutines); resultLocals = adjustLocalsForSubroutines( resultLocals, resultSubroutines); if ((resultLocals == getLocals()) && (resultStack == getStack()) && subroutines == resultSubroutines) { return this; } return new Frame(resultLocals, resultStack, resultSubroutines); }
/** * Merges two frames. If the merged result is the same as this frame, * then this instance is returned. * * @param other {@code non-null;} another frame * @return {@code non-null;} the result of merging the two frames */ public Frame mergeWith(Frame other) { LocalsArray resultLocals; ExecutionStack resultStack; IntList resultSubroutines; resultLocals = getLocals().merge(other.getLocals()); resultStack = getStack().merge(other.getStack()); resultSubroutines = mergeSubroutineLists(other.subroutines); resultLocals = adjustLocalsForSubroutines( resultLocals, resultSubroutines); if ((resultLocals == getLocals()) && (resultStack == getStack()) && subroutines == resultSubroutines) { return this; } return new Frame(resultLocals, resultStack, resultSubroutines); }
/** * Merges two frames. If the merged result is the same as this frame, * then this instance is returned. * * @param other {@code non-null;} another frame * @return {@code non-null;} the result of merging the two frames */ public Frame mergeWith(Frame other) { LocalsArray resultLocals; ExecutionStack resultStack; IntList resultSubroutines; resultLocals = getLocals().merge(other.getLocals()); resultStack = getStack().merge(other.getStack()); resultSubroutines = mergeSubroutineLists(other.subroutines); resultLocals = adjustLocalsForSubroutines( resultLocals, resultSubroutines); if ((resultLocals == getLocals()) && (resultStack == getStack()) && subroutines == resultSubroutines) { return this; } return new Frame(resultLocals, resultStack, resultSubroutines); }
/** * Merges two frames. If the merged result is the same as this frame, * then this instance is returned. * * @param other {@code non-null;} another frame * @return {@code non-null;} the result of merging the two frames */ public Frame mergeWith(Frame other) { LocalsArray resultLocals; ExecutionStack resultStack; IntList resultSubroutines; resultLocals = getLocals().merge(other.getLocals()); resultStack = getStack().merge(other.getStack()); resultSubroutines = mergeSubroutineLists(other.subroutines); resultLocals = adjustLocalsForSubroutines( resultLocals, resultSubroutines); if ((resultLocals == getLocals()) && (resultStack == getStack()) && subroutines == resultSubroutines) { return this; } return new Frame(resultLocals, resultStack, resultSubroutines); }
/** * Merges two frames. If the merged result is the same as this frame, * then this instance is returned. * * @param other {@code non-null;} another frame * @return {@code non-null;} the result of merging the two frames */ public Frame mergeWith(Frame other) { LocalsArray resultLocals; ExecutionStack resultStack; IntList resultSubroutines; resultLocals = getLocals().merge(other.getLocals()); resultStack = getStack().merge(other.getStack()); resultSubroutines = mergeSubroutineLists(other.subroutines); resultLocals = adjustLocalsForSubroutines( resultLocals, resultSubroutines); if ((resultLocals == getLocals()) && (resultStack == getStack()) && subroutines == resultSubroutines) { return this; } return new Frame(resultLocals, resultStack, resultSubroutines); }
/** * Merges two frames. If the merged result is the same as this frame, * then this instance is returned. * * @param other {@code non-null;} another frame * @return {@code non-null;} the result of merging the two frames */ public Frame mergeWith(Frame other) { LocalsArray resultLocals; ExecutionStack resultStack; IntList resultSubroutines; resultLocals = getLocals().merge(other.getLocals()); resultStack = getStack().merge(other.getStack()); resultSubroutines = mergeSubroutineLists(other.subroutines); resultLocals = adjustLocalsForSubroutines( resultLocals, resultSubroutines); if ((resultLocals == getLocals()) && (resultStack == getStack()) && subroutines == resultSubroutines) { return this; } return new Frame(resultLocals, resultStack, resultSubroutines); }
/** * Makes a new frame for an exception handler block invoked from this * frame. * * @param exceptionClass exception that the handler block will handle * @return new frame */ public Frame makeExceptionHandlerStartFrame(CstType exceptionClass) { ExecutionStack newStack = getStack().copy(); newStack.clear(); newStack.push(exceptionClass); return new Frame(getLocals(), newStack, subroutines); }
/** * Makes a new frame for an exception handler block invoked from this * frame. * * @param exceptionClass exception that the handler block will handle * @return new frame */ public Frame makeExceptionHandlerStartFrame(CstType exceptionClass) { ExecutionStack newStack = getStack().copy(); newStack.clear(); newStack.push(exceptionClass); return new Frame(getLocals(), newStack, subroutines); }
/** * Makes a new frame for an exception handler block invoked from this * frame. * * @param exceptionClass exception that the handler block will handle * @return new frame */ public Frame makeExceptionHandlerStartFrame(CstType exceptionClass) { ExecutionStack newStack = getStack().copy(); newStack.clear(); newStack.push(exceptionClass); return new Frame(getLocals(), newStack, subroutines); }
/** * Makes a new frame for an exception handler block invoked from this * frame. * * @param exceptionClass exception that the handler block will handle * @return new frame */ public Frame makeExceptionHandlerStartFrame(CstType exceptionClass) { ExecutionStack newStack = getStack().copy(); newStack.clear(); newStack.push(exceptionClass); return new Frame(getLocals(), newStack, subroutines); }
/** * Makes a new frame for an exception handler block invoked from this * frame. * * @param exceptionClass exception that the handler block will handle * @return new frame */ public Frame makeExceptionHandlerStartFrame(CstType exceptionClass) { ExecutionStack newStack = getStack().copy(); newStack.clear(); newStack.push(exceptionClass); return new Frame(getLocals(), newStack, subroutines); }
/** * Makes a new frame for an exception handler block invoked from this * frame. * * @param exceptionClass exception that the handler block will handle * @return new frame */ public Frame makeExceptionHandlerStartFrame(CstType exceptionClass) { ExecutionStack newStack = getStack().copy(); newStack.clear(); newStack.push(exceptionClass); return new Frame(getLocals(), newStack, subroutines); }
/** * Stores the results of the latest operation into the given frame. If * there is a local target (see {@link #localTarget}), then the sole * result is stored to that target; otherwise any results are pushed * onto the stack. * * @param frame {@code non-null;} frame to operate on */ protected final void storeResults(Frame frame) { if (resultCount < 0) { throw new SimException("results never set"); } if (resultCount == 0) { // Nothing to do. return; } if (localTarget != null) { /* * Note: getLocalTarget() doesn't necessarily return * localTarget directly. */ frame.getLocals().set(getLocalTarget()); } else { ExecutionStack stack = frame.getStack(); for (int i = 0; i < resultCount; i++) { stack.push(results[i]); } } }
frame.getLocals().set(getLocalTarget(false)); } else { ExecutionStack stack = frame.getStack();