/** * Starts a new code fragment. Branch instructions that are added are * assumed to be relative within such code fragments. * @param maximumCodeFragmentLength the maximum length of the code that will * be added as part of this fragment (more * precisely, the maximum old instruction * offset or label that is specified, plus * one). */ public CompactCodeAttributeComposer beginCodeFragment(int maximumCodeFragmentLength) { codeAttributeComposer.beginCodeFragment(maximumCodeFragmentLength); return this; }
/** * Starts a new code fragment. Branch instructions that are added are * assumed to be relative within such code fragments. * @param maximumCodeFragmentLength the maximum length of the code that will * be added as part of this fragment (more * precisely, the maximum old instruction * offset or label that is specified, plus * one). */ public CompactCodeAttributeComposer beginCodeFragment(int maximumCodeFragmentLength) { codeAttributeComposer.beginCodeFragment(maximumCodeFragmentLength); return this; }
/** * Starts a new code fragment. Branch instructions that are added are * assumed to be relative within such code fragments. * @param maximumCodeFragmentLength the maximum length of the code that will * be added as part of this fragment (more * precisely, the maximum old instruction * offset or label that is specified, plus * one). */ public CompactCodeAttributeComposer beginCodeFragment(int maximumCodeFragmentLength) { codeAttributeComposer.beginCodeFragment(maximumCodeFragmentLength); return this; }
/** * Appends the code of the given code attribute. */ private void copyCode(Clazz clazz, Method method, CodeAttribute codeAttribute) { // The code may expand, due to expanding constant and variable // instructions. codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength); // Copy the instructions. codeAttribute.instructionsAccept(clazz, method, this); // Append a label just after the code. codeAttributeComposer.appendLabel(codeAttribute.u4codeLength); codeAttributeComposer.endCodeFragment(); }
/** * Appends the code of the given code attribute. */ private void copyCode(Clazz clazz, Method method, CodeAttribute codeAttribute) { // The code may expand, due to expanding constant and variable // instructions. codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength); // Copy the instructions. codeAttribute.instructionsAccept(clazz, method, this); // Copy the exceptions. codeAttribute.exceptionsAccept(clazz, method, exceptionInfoAdder); // Append a label just after the code. codeAttributeComposer.appendLabel(codeAttribute.u4codeLength); codeAttributeComposer.endCodeFragment(); }
clipEnd = subroutineEnd; codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength);
clipEnd = subroutineEnd; codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength);
codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength);
public static void main(String[] args) { CodeAttributeComposer composer = new CodeAttributeComposer(); composer.beginCodeFragment(4); composer.appendInstruction(0, new SimpleInstruction(InstructionConstants.OP_ICONST_0)); composer.appendInstruction(1, new VariableInstruction(InstructionConstants.OP_ISTORE, 0)); composer.appendInstruction(2, new BranchInstruction(InstructionConstants.OP_GOTO, 1)); composer.beginCodeFragment(4); composer.appendInstruction(0, new VariableInstruction(InstructionConstants.OP_IINC, 0, 1)); composer.appendInstruction(1, new VariableInstruction(InstructionConstants.OP_ILOAD, 0)); composer.appendInstruction(2, new SimpleInstruction(InstructionConstants.OP_ICONST_5)); composer.appendInstruction(3, new BranchInstruction(InstructionConstants.OP_IFICMPLT, -3)); composer.endCodeFragment(); composer.appendInstruction(3, new SimpleInstruction(InstructionConstants.OP_RETURN)); composer.endCodeFragment(); } }
public static void main(String[] args) { CodeAttributeComposer composer = new CodeAttributeComposer(); composer.beginCodeFragment(4); composer.appendInstruction(0, new SimpleInstruction(InstructionConstants.OP_ICONST_0)); composer.appendInstruction(1, new VariableInstruction(InstructionConstants.OP_ISTORE, 0)); composer.appendInstruction(2, new BranchInstruction(InstructionConstants.OP_GOTO, 1)); composer.beginCodeFragment(4); composer.appendInstruction(0, new VariableInstruction(InstructionConstants.OP_IINC, 0, 1)); composer.appendInstruction(1, new VariableInstruction(InstructionConstants.OP_ILOAD, 0)); composer.appendInstruction(2, new SimpleInstruction(InstructionConstants.OP_ICONST_5)); composer.appendInstruction(3, new BranchInstruction(InstructionConstants.OP_IFICMPLT, -3)); composer.endCodeFragment(); composer.appendInstruction(3, new SimpleInstruction(InstructionConstants.OP_RETURN)); composer.endCodeFragment(); } }
clipEnd = subroutineEnd; codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength);
codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength);
codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength);
public static void main(String[] args) { CodeAttributeComposer composer = new CodeAttributeComposer(); composer.beginCodeFragment(4); composer.appendInstruction(0, new SimpleInstruction(InstructionConstants.OP_ICONST_0)); composer.appendInstruction(1, new VariableInstruction(InstructionConstants.OP_ISTORE, 0)); composer.appendInstruction(2, new BranchInstruction(InstructionConstants.OP_GOTO, 1)); composer.beginCodeFragment(4); composer.appendInstruction(0, new VariableInstruction(InstructionConstants.OP_IINC, 0, 1)); composer.appendInstruction(1, new VariableInstruction(InstructionConstants.OP_ILOAD, 0)); composer.appendInstruction(2, new SimpleInstruction(InstructionConstants.OP_ICONST_5)); composer.appendInstruction(3, new BranchInstruction(InstructionConstants.OP_IFICMPLT, -3)); composer.endCodeFragment(); composer.appendInstruction(3, new SimpleInstruction(InstructionConstants.OP_RETURN)); composer.endCodeFragment(); } }
public static void main(String[] args) { CodeAttributeComposer composer = new CodeAttributeComposer(); composer.beginCodeFragment(4); composer.appendInstruction(0, new SimpleInstruction(InstructionConstants.OP_ICONST_0)); composer.appendInstruction(1, new VariableInstruction(InstructionConstants.OP_ISTORE, 0)); composer.appendInstruction(2, new BranchInstruction(InstructionConstants.OP_GOTO, 1)); composer.beginCodeFragment(4); composer.appendInstruction(0, new VariableInstruction(InstructionConstants.OP_IINC, 0, 1)); composer.appendInstruction(1, new VariableInstruction(InstructionConstants.OP_ILOAD, 0)); composer.appendInstruction(2, new SimpleInstruction(InstructionConstants.OP_ICONST_5)); composer.appendInstruction(3, new BranchInstruction(InstructionConstants.OP_IFICMPLT, -3)); composer.endCodeFragment(); composer.appendInstruction(3, new SimpleInstruction(InstructionConstants.OP_RETURN)); composer.endCodeFragment(); } }
codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength);
codeAttributeComposer.beginCodeFragment(codeAttribute.u4codeLength);
composer.beginCodeFragment(0); composer.appendInstructions(instructions); if (firstInstructions != null) {
composer.beginCodeFragment(0); composer.appendInstructions(instructions); if (firstInstructions != null) {
composer.beginCodeFragment(0); composer.appendInstructions(instructions); if (firstInstructions != null) {