/** * Awaits the lock on {@code monitor}, and acquires it. */ public void monitorEnter(Local<?> monitor) { addInstruction(new ThrowingInsn(Rops.MONITOR_ENTER, sourcePosition, RegisterSpecList.make(monitor.spec()), catches)); }
/** * Releases the held lock on {@code monitor}. */ public void monitorExit(Local<?> monitor) { addInstruction(new ThrowingInsn(Rops.MONITOR_EXIT, sourcePosition, RegisterSpecList.make(monitor.spec()), catches)); }
/** * Throws the throwable in {@code toThrow}. */ public void throwValue(Local<? extends Throwable> toThrow) { addInstruction(new ThrowingInsn(Rops.THROW, sourcePosition, RegisterSpecList.make(toThrow.spec()), catches)); }
/** * Sets {@code target} to the length of the array in {@code array}. */ public <T> void arrayLength(Local<Integer> target, Local<T> array) { addInstruction(new ThrowingInsn(Rops.ARRAY_LENGTH, sourcePosition, RegisterSpecList.make(array.spec()), catches)); moveResult(target, true); }
/** * Assigns the element at {@code index} in {@code array} to {@code target}. */ public void aget(Local<?> target, Local<?> array, Local<Integer> index) { addInstruction(new ThrowingInsn(Rops.opAget(target.type.ropType), sourcePosition, RegisterSpecList.make(array.spec(), index.spec()), catches)); moveResult(target, true); }
/** * Assigns {@code source} to the element at {@code index} in {@code array}. */ public void aput(Local<?> array, Local<Integer> index, Local<?> source) { addInstruction(new ThrowingInsn(Rops.opAput(source.type.ropType), sourcePosition, RegisterSpecList.make(source.spec(), array.spec(), index.spec()), catches)); }
/** * Executes {@code op} and sets {@code target} to the result. For most * binary operations, the types of {@code a} and {@code b} must be the same. * Shift operations (like {@link BinaryOp#SHIFT_LEFT}) require {@code b} to * be an {@code int}, even when {@code a} is a {@code long}. */ public <T1, T2> void op(BinaryOp op, Local<T1> target, Local<T1> a, Local<T2> b) { Rop rop = op.rop(StdTypeList.make(a.type.ropType, b.type.ropType)); RegisterSpecList sources = RegisterSpecList.make(a.spec(), b.spec()); if (rop.getBranchingness() == BRANCH_NONE) { addInstruction(new PlainInsn(rop, sourcePosition, target.spec(), sources)); } else { addInstruction(new ThrowingInsn(rop, sourcePosition, sources, catches)); moveResult(target, true); } }
/** {@inheritDoc} */ @Override public Insn withNewRegisters(RegisterSpec result, RegisterSpecList sources) { return new ThrowingInsn(getOpcode(), getPosition(), sources, catches); } }
/** {@inheritDoc} */ @Override public Insn withNewRegisters(RegisterSpec result, RegisterSpecList sources) { return new ThrowingInsn(getOpcode(), getPosition(), sources, catches); } }
/** {@inheritDoc} */ @Override public Insn withNewRegisters(RegisterSpec result, RegisterSpecList sources) { return new ThrowingInsn(getOpcode(), getPosition(), sources, catches); } }
/** * Throws the throwable in {@code toThrow}. */ public void throwValue(Local<? extends Throwable> toThrow) { addInstruction(new ThrowingInsn(Rops.THROW, sourcePosition, RegisterSpecList.make(toThrow.spec()), catches)); }
/** {@inheritDoc} */ @Override public Insn withAddedCatch(Type type) { return new ThrowingInsn(getOpcode(), getPosition(), getSources(), catches.withAddedType(type)); }
/** {@inheritDoc} */ @Override public Insn withRegisterOffset(int delta) { return new ThrowingInsn(getOpcode(), getPosition(), getSources().withOffset(delta), catches); }
/** {@inheritDoc} */ @Override public Insn withRegisterOffset(int delta) { return new ThrowingInsn(getOpcode(), getPosition(), getSources().withOffset(delta), catches); }
/** {@inheritDoc} */ @Override public Insn withRegisterOffset(int delta) { return new ThrowingInsn(getOpcode(), getPosition(), getSources().withOffset(delta), catches); }
/** {@inheritDoc} */ @Override public Insn withRegisterOffset(int delta) { return new ThrowingInsn(getOpcode(), getPosition(), getSources().withOffset(delta), catches); }
/** {@inheritDoc} */ @Override public Insn withAddedCatch(Type type) { return new ThrowingInsn(getOpcode(), getPosition(), getSources(), catches.withAddedType(type)); }
/** {@inheritDoc} */ @Override public Insn withRegisterOffset(int delta) { return new ThrowingInsn(getOpcode(), getPosition(), getSources().withOffset(delta), catches); }
/** * Assigns the element at {@code index} in {@code array} to {@code target}. */ public void aget(Local<?> target, Local<?> array, Local<Integer> index) { addInstruction(new ThrowingInsn(Rops.opAget(target.type.ropType), sourcePosition, RegisterSpecList.make(array.spec(), index.spec()), catches)); moveResult(target, true); }
public <T> void op(BinaryOp op, Local<T> target, Local<T> a, Local<T> b) { Rop rop = op.rop(StdTypeList.make(a.type.ropType, b.type.ropType)); RegisterSpecList sources = RegisterSpecList.make(a.spec(), b.spec()); if (rop.getBranchingness() == BRANCH_NONE) { addInstruction(new PlainInsn(rop, sourcePosition, target.spec(), sources)); } else { addInstruction(new ThrowingInsn(rop, sourcePosition, sources, catches)); moveResult(target, true); } }