/** {@inheritDoc} */ public TypeBearer getFrameType() { return type.getFrameType(); }
/** {@inheritDoc} */ @Override public TypeBearer getFrameType() { return type.getFrameType(); }
/** {@inheritDoc} */ @Override public TypeBearer getFrameType() { return type.getFrameType(); }
/** {@inheritDoc} */ @Override public TypeBearer getFrameType() { return type.getFrameType(); }
/** {@inheritDoc} */ public TypeBearer getFrameType() { return type.getFrameType(); }
/** {@inheritDoc} */ public TypeBearer getFrameType() { return type.getFrameType(); }
/** {@inheritDoc} */ public TypeBearer getFrameType() { return type.getFrameType(); }
/** {@inheritDoc} */ public TypeBearer getFrameType() { return type.getFrameType(); }
/** {@inheritDoc} */ public void set(int idx, TypeBearer type) { throwIfImmutable(); try { type = type.getFrameType(); } catch (NullPointerException ex) { // Elucidate the exception throw new NullPointerException("type == null"); } if (idx < 0) { throw new IndexOutOfBoundsException("idx < 0"); } // Make highest possible out-of-bounds check happen first. if (type.getType().isCategory2()) { locals[idx + 1] = null; } locals[idx] = type; if (idx != 0) { TypeBearer prev = locals[idx - 1]; if ((prev != null) && prev.getType().isCategory2()) { locals[idx - 1] = null; } } }
/** @inheritDoc */ public void set(int idx, TypeBearer type) { throwIfImmutable(); try { type = type.getFrameType(); } catch (NullPointerException ex) { // Elucidate the exception throw new NullPointerException("type == null"); } if (idx < 0) { throw new IndexOutOfBoundsException("idx < 0"); } // Make highest possible out-of-bounds check happen first. if (type.getType().isCategory2()) { locals[idx + 1] = null; } locals[idx] = type; if (idx != 0) { TypeBearer prev = locals[idx - 1]; if ((prev != null) && prev.getType().isCategory2()) { locals[idx - 1] = null; } } }
/** @inheritDoc */ public void set(int idx, TypeBearer type) { throwIfImmutable(); try { type = type.getFrameType(); } catch (NullPointerException ex) { // Elucidate the exception throw new NullPointerException("type == null"); } if (idx < 0) { throw new IndexOutOfBoundsException("idx < 0"); } // Make highest possible out-of-bounds check happen first. if (type.getType().isCategory2()) { locals[idx + 1] = null; } locals[idx] = type; if (idx != 0) { TypeBearer prev = locals[idx - 1]; if ((prev != null) && prev.getType().isCategory2()) { locals[idx - 1] = null; } } }
/** {@inheritDoc} */ @Override public void set(int idx, TypeBearer type) { throwIfImmutable(); try { type = type.getFrameType(); } catch (NullPointerException ex) { // Elucidate the exception throw new NullPointerException("type == null"); } if (idx < 0) { throw new IndexOutOfBoundsException("idx < 0"); } // Make highest possible out-of-bounds check happen first. if (type.getType().isCategory2()) { locals[idx + 1] = null; } locals[idx] = type; if (idx != 0) { TypeBearer prev = locals[idx - 1]; if ((prev != null) && prev.getType().isCategory2()) { locals[idx - 1] = null; } } }
/** {@inheritDoc} */ @Override public void set(int idx, TypeBearer type) { throwIfImmutable(); try { type = type.getFrameType(); } catch (NullPointerException ex) { // Elucidate the exception throw new NullPointerException("type == null"); } if (idx < 0) { throw new IndexOutOfBoundsException("idx < 0"); } // Make highest possible out-of-bounds check happen first. if (type.getType().isCategory2()) { locals[idx + 1] = null; } locals[idx] = type; if (idx != 0) { TypeBearer prev = locals[idx - 1]; if ((prev != null) && prev.getType().isCategory2()) { locals[idx - 1] = null; } } }
/** @inheritDoc */ public void set(int idx, TypeBearer type) { throwIfImmutable(); try { type = type.getFrameType(); } catch (NullPointerException ex) { // Elucidate the exception throw new NullPointerException("type == null"); } if (idx < 0) { throw new IndexOutOfBoundsException("idx < 0"); } // Make highest possible out-of-bounds check happen first. if (type.getType().isCategory2()) { locals[idx + 1] = null; } locals[idx] = type; if (idx != 0) { TypeBearer prev = locals[idx - 1]; if ((prev != null) && prev.getType().isCategory2()) { locals[idx - 1] = null; } } }
/** * Pushes a value of the given type onto the stack. * * @param type {@code non-null;} type of the value * @throws SimException thrown if there is insufficient room on the * stack for the value */ public void push(TypeBearer type) { throwIfImmutable(); int category; try { type = type.getFrameType(); category = type.getType().getCategory(); } catch (NullPointerException ex) { // Elucidate the exception. throw new NullPointerException("type == null"); } if ((stackPtr + category) > stack.length) { throwSimException("overflow"); return; } if (category == 2) { stack[stackPtr] = null; stackPtr++; } stack[stackPtr] = type; stackPtr++; }
/** * Pushes a value of the given type onto the stack. * * @param type {@code non-null;} type of the value * @throws SimException thrown if there is insufficient room on the * stack for the value */ public void push(TypeBearer type) { throwIfImmutable(); int category; try { type = type.getFrameType(); category = type.getType().getCategory(); } catch (NullPointerException ex) { // Elucidate the exception. throw new NullPointerException("type == null"); } if ((stackPtr + category) > stack.length) { throwSimException("overflow"); return; } if (category == 2) { stack[stackPtr] = null; stackPtr++; } stack[stackPtr] = type; stackPtr++; }
/** * Pushes a value of the given type onto the stack. * * @param type {@code non-null;} type of the value * @throws SimException thrown if there is insufficient room on the * stack for the value */ public void push(TypeBearer type) { throwIfImmutable(); int category; try { type = type.getFrameType(); category = type.getType().getCategory(); } catch (NullPointerException ex) { // Elucidate the exception. throw new NullPointerException("type == null"); } if ((stackPtr + category) > stack.length) { throwSimException("overflow"); return; } if (category == 2) { stack[stackPtr] = null; stackPtr++; } stack[stackPtr] = type; stackPtr++; }
/** * Pushes a value of the given type onto the stack. * * @param type {@code non-null;} type of the value * @throws SimException thrown if there is insufficient room on the * stack for the value */ public void push(TypeBearer type) { throwIfImmutable(); int category; try { type = type.getFrameType(); category = type.getType().getCategory(); } catch (NullPointerException ex) { // Elucidate the exception. throw new NullPointerException("type == null"); } if ((stackPtr + category) > stack.length) { throwSimException("overflow"); return; } if (category == 2) { stack[stackPtr] = null; stackPtr++; } stack[stackPtr] = type; stackPtr++; }
/** * Pushes a value of the given type onto the stack. * * @param type {@code non-null;} type of the value * @throws SimException thrown if there is insufficient room on the * stack for the value */ public void push(TypeBearer type) { throwIfImmutable(); int category; try { type = type.getFrameType(); category = type.getType().getCategory(); } catch (NullPointerException ex) { // Elucidate the exception. throw new NullPointerException("type == null"); } if ((stackPtr + category) > stack.length) { throwSimException("overflow"); return; } if (category == 2) { stack[stackPtr] = null; stackPtr++; } stack[stackPtr] = type; stackPtr++; }
/** * Changes an element already on a stack. This method is useful in limited * contexts, particularly when merging two instances. As such, it places * the following restriction on its behavior: You may only replace * values with other values of the same category. * * @param n {@code >= 0;} which element to change, where {@code 0} is * the top element of the stack * @param type {@code non-null;} type of the new value * @throws SimException thrown if {@code n >= size()} or * the action is otherwise prohibited */ public void change(int n, TypeBearer type) { throwIfImmutable(); try { type = type.getFrameType(); } catch (NullPointerException ex) { // Elucidate the exception. throw new NullPointerException("type == null"); } int idx = stackPtr - n - 1; TypeBearer orig = stack[idx]; if ((orig == null) || (orig.getType().getCategory() != type.getType().getCategory())) { throwSimException("incompatible substitution: " + stackElementString(orig) + " -> " + stackElementString(type)); } stack[idx] = type; }