public class MethodBodyInfo extends Object
Modifier and Type | Field and Description |
---|---|
int |
code_len |
int |
initial_scope |
int |
max_local |
int |
max_scope |
int |
max_slot |
int |
max_stack |
Constructor and Description |
---|
MethodBodyInfo()
Construct a new MethodBodyInfo.
|
Modifier and Type | Method and Description |
---|---|
int |
addExceptionInfo(ExceptionInfo ex) |
void |
computeFrameCounts(IDiagnosticsVisitor diagnosticsVisitor)
Compute a functions's max_stack, max_scope, and slot count.
|
IBasicBlock |
getBlock(Label target)
Get the block that the label corresponds to.
|
IBasicBlock |
getBlock(Label target,
boolean throwOnError)
Get the block that the label corresponds to.
|
byte[] |
getBytecode()
Retrieve this method's bytecode.
|
IFlowgraph |
getCfg()
Get the method's control flow graph, building it as necessary.
|
List<ExceptionInfo> |
getExceptions() |
int |
getInitScopeDepth() |
InstructionList |
getInstructionList() |
int |
getLocalCount() |
int |
getMaxScopeDepth() |
int |
getMaxSlotCount() |
int |
getMaxStack() |
MethodInfo |
getMethodInfo() |
Traits |
getTraits() |
boolean |
hasBytecode()
Has this method been serialized to bytecode?
|
boolean |
hasNewclassInstruction()
Does this method body contain a newclass instruction?
|
void |
insn(Instruction instruction) |
Instruction |
insn(int opcode) |
Instruction |
insn(int opcode,
int immed) |
Instruction |
insn(int opcode,
Object pooledValue) |
Instruction |
insn(int opcode,
Object[] operands) |
boolean |
isCatchTarget(Label l)
Does the given Label reference a catch target?
|
void |
labelCurrent(Label l)
Pass through a labelCurrent() request to the resident InstructionList.
|
void |
labelNext(Label l)
Pass through a labelNext() request to the resident InstructionList.
|
void |
setBytecode(byte[] bytecode)
Set this method's serialized ABC.
|
void |
setInstructionList(InstructionList new_list)
Set this method body's InstructionList.
|
void |
setMethodInfo(MethodInfo minfo) |
void |
setTraits(Traits t)
Set the method's traits.
|
public int max_stack
public int max_scope
public int initial_scope
public int max_local
public int max_slot
public int code_len
public MethodInfo getMethodInfo()
public void setMethodInfo(MethodInfo minfo)
public Traits getTraits()
public void setTraits(Traits t)
t
- - the method's traits.public void setBytecode(byte[] bytecode)
bytecode
- - the method's instructions serialized to ABC bytecode.public byte[] getBytecode()
public boolean hasBytecode()
public IFlowgraph getCfg()
public Instruction insn(int opcode)
public Instruction insn(int opcode, Object[] operands)
public Instruction insn(int opcode, Object pooledValue)
public Instruction insn(int opcode, int immed)
public void insn(Instruction instruction)
public void computeFrameCounts(IDiagnosticsVisitor diagnosticsVisitor)
public int getMaxStack()
public int getLocalCount()
public int getMaxSlotCount()
public int getMaxScopeDepth()
public int addExceptionInfo(ExceptionInfo ex)
public int getInitScopeDepth()
public IBasicBlock getBlock(Label target)
target
- the label you want the block forpublic IBasicBlock getBlock(Label target, boolean throwOnError)
target
- the label you want the block forthrowOnError
- false if you do not want this method to throw an
IllegalArgumentException - in this case the method will return null
instead.public List<ExceptionInfo> getExceptions()
public boolean isCatchTarget(Label l)
l
- - the Label of interest.public void setInstructionList(InstructionList new_list)
public InstructionList getInstructionList()
public void labelCurrent(Label l)
public void labelNext(Label l)
public boolean hasNewclassInstruction()
Copyright © 2016 The Apache Software Foundation. All rights reserved.