public class PeepholeOptimizerMethodBodyVisitor extends DelegatingMethodBodyVisitor
Constructor and Description |
---|
PeepholeOptimizerMethodBodyVisitor(IMethodBodyVisitor delegate) |
Modifier and Type | Method and Description |
---|---|
void |
labelCurrent(Label l)
Bind a Label object (not to be confused with the AVM OP_label
instruction) to the last-visited ABC instruction in this method.
|
void |
labelNext(Label l)
Bind a Label object (not to be confused with the AVM OP_label
instruction) to the next ABC instruction that gets visited in this method
|
void |
visitEnd()
Indicates that no further method calls will be made on this visitor
instance.
|
void |
visitInstruction(Instruction instruction)
Vist an instruction
|
void |
visitInstruction(int opcode)
Visit an instruction with no operands.
|
void |
visitInstruction(int opcode,
int immediate_operand)
Visit an instruction with an immediate operand.
|
void |
visitInstruction(int opcode,
Object single_operand)
Visit an instruction with a single operand (convenience method).
|
void |
visitInstruction(int opcode,
Object[] operands)
Visit an instruction.
|
void |
visitInstructionList(InstructionList new_list)
Resets the entire method body at once.
|
visit, visitException, visitTraits
public PeepholeOptimizerMethodBodyVisitor(IMethodBodyVisitor delegate)
public void visitInstructionList(InstructionList new_list)
visitInstructionList
in interface IMethodBodyVisitor
visitInstructionList
in class DelegatingMethodBodyVisitor
new_list
- The new Instructions for the method.public void visitInstruction(int opcode)
IMethodBodyVisitor
visitInstruction
in interface IMethodBodyVisitor
visitInstruction
in class DelegatingMethodBodyVisitor
opcode
- - the instruction's opcode.public void visitInstruction(int opcode, int immediate_operand)
IMethodBodyVisitor
visitInstruction
in interface IMethodBodyVisitor
visitInstruction
in class DelegatingMethodBodyVisitor
opcode
- - the instruction's opcode.immediate_operand
- - the operand.public void visitInstruction(int opcode, Object[] operands)
IMethodBodyVisitor
visitInstruction
in interface IMethodBodyVisitor
visitInstruction
in class DelegatingMethodBodyVisitor
opcode
- - the instruction's opcode.operands
- - the instruction's operands.public void visitInstruction(int opcode, Object single_operand)
IMethodBodyVisitor
visitInstruction
in interface IMethodBodyVisitor
visitInstruction
in class DelegatingMethodBodyVisitor
opcode
- - the instruction's opcode.single_operand
- - the instruction's operand.public void visitInstruction(Instruction instruction)
IMethodBodyVisitor
visitInstruction
in interface IMethodBodyVisitor
visitInstruction
in class DelegatingMethodBodyVisitor
instruction
- the Instruction to visitpublic void visitEnd()
IVisitor
visitEnd
in interface IVisitor
visitEnd
in class DelegatingMethodBodyVisitor
public void labelCurrent(Label l)
labelCurrent
in interface IMethodBodyVisitor
labelCurrent
in class DelegatingMethodBodyVisitor
public void labelNext(Label l)
labelNext
in interface IMethodBodyVisitor
labelNext
in class DelegatingMethodBodyVisitor
Copyright © 2016 The Apache Software Foundation. All rights reserved.