object Code
- Alphabetic
- By Inheritance
- Code
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final val KindId: Int(6)
The unique id associated with attributes of kind: Code.
The unique id associated with attributes of kind: Code.
KindId
s can be used for efficient branching on attributes. - def apply(maxStack: Int, maxLocals: Int, instructions: Array[Instruction], exceptionHandlers: ExceptionHandlers = NoExceptionHandlers, attributes: Attributes = NoAttributes): Code
- def computeCFG(instructions: Array[Instruction], exceptionHandlers: ExceptionHandlers = NoExceptionHandlers, classHierarchy: ClassHierarchy = ClassHierarchy.PreInitializedClassHierarchy): CFG[Instruction, Code]
- def computeMaxLocals(isInstanceMethod: Boolean, descriptor: MethodDescriptor, instructions: Array[Instruction]): Int
- def computeMaxLocalsRequiredByCode(instructions: Array[Instruction]): Int
The maximum number of registers required to execute the code - independent of the number of parameters.
The maximum number of registers required to execute the code - independent of the number of parameters.
- Note
The method's descriptor may actually require
- def computeMaxStack(instructions: Array[Instruction], exceptionHandlers: ExceptionHandlers, cfg: CFG[Instruction, Code]): Int
Computes the maximum stack size required when executing this code block.
Computes the maximum stack size required when executing this code block.
- Annotations
- @throws("if it is impossible to compute the maximum height of the stack")
- Exceptions thrown
java.lang.ClassFormatError
If the stack size differs between execution paths.
- def computeMaxStack(instructions: Array[Instruction], classHierarchy: ClassHierarchy = ClassHierarchy.PreInitializedClassHierarchy, exceptionHandlers: ExceptionHandlers = NoExceptionHandlers): Int
Computes the maximum stack size required when executing this code block.
Computes the maximum stack size required when executing this code block.
- Annotations
- @throws("if it is impossible to compute the maximum height of the stack")
- Exceptions thrown
java.lang.ClassFormatError
If the stack size differs between execution paths.- Note
If the cfg is available, call the respective
computeMaxStack
method.
- def invalidBytecode(descriptor: MethodDescriptor, isInstanceMethod: Boolean, message: Option[String] = None): Code
Creates a method body which throws a
java.lang.Error
with the given message or that states that the underlying bytecode is invalid if the message is empty. - def unapply(code: Code): Option[(Int, Int, Array[Instruction], ExceptionHandlers, Attributes)]