object BytecodeUtils
- Source
- BytecodeUtils.scala
- Alphabetic
- By Inheritance
- BytecodeUtils
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- implicit final class AnalyzerExtensions[V <: Value] extends AnyVal
- implicit final class FrameExtensions[V <: Value] extends AnyVal
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def cloneLabels(methodNode: MethodNode): Map[LabelNode, LabelNode]
-
def
cloneLocalVariableNodes(methodNode: MethodNode, labelMap: Map[LabelNode, LabelNode], calleeMethodName: String, shift: Int): List[LocalVariableNode]
Clone the local variable descriptors of
methodNode
and map theirstart
andend
labels according to thelabelMap
. -
def
cloneTryCatchBlockNodes(methodNode: MethodNode, labelMap: Map[LabelNode, LabelNode]): List[TryCatchBlockNode]
Clone the local try/catch blocks of
methodNode
and map theirstart
andend
andhandler
labels according to thelabelMap
. - def codeSizeOKForInlining(caller: MethodNode, callee: MethodNode): Boolean
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def finalJumpTarget(source: JumpInsnNode): LabelNode
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fixLoadedNothingOrNullValue(loadedType: Type, loadInstr: AbstractInsnNode, methodNode: MethodNode, bTypes: BTypes): Unit
This method is used by optimizer components to eliminate phantom values of instruction that load a value of type
Nothing$
orNull$
.This method is used by optimizer components to eliminate phantom values of instruction that load a value of type
Nothing$
orNull$
. Such values on the stack don't interact well with stack map frames.For example,
opt.getOrElse(throw e)
is re-written to an invocation of the lambda body, a method with return typeNothing$
. Similarly foropt.getOrElse(null)
andNull$
.During bytecode generation this is handled by BCodeBodyBuilder.adapt. See the comment in that method which explains the issue with such phantom values.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getPop(size: Int): InsnNode
- def hasCallerSensitiveAnnotation(methodNode: MethodNode): Boolean
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def instructionResultSize(insn: AbstractInsnNode): Int
- def isAbstractMethod(methodNode: MethodNode): Boolean
- def isCall(instruction: AbstractInsnNode): Boolean
- def isConditionalJump(instruction: AbstractInsnNode): Boolean
- def isConstructor(methodNode: MethodNode): Boolean
- def isExecutable(instruction: AbstractInsnNode): Boolean
- def isFinalClass(classNode: ClassNode): Boolean
- def isFinalMethod(methodNode: MethodNode): Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isInterface(classNode: ClassNode): Boolean
- def isJumpNonJsr(instruction: AbstractInsnNode): Boolean
- def isLoad(instruction: AbstractInsnNode): Boolean
- def isLoadOrStore(instruction: AbstractInsnNode): Boolean
- def isLoadStoreOrRet(instruction: AbstractInsnNode): Boolean
- def isNativeMethod(methodNode: MethodNode): Boolean
- def isNonVirtualCall(instruction: AbstractInsnNode): Boolean
- def isPrivateMethod(methodNode: MethodNode): Boolean
- def isPublicMethod(methodNode: MethodNode): Boolean
- def isReference(t: Type): Boolean
- def isReturn(instruction: AbstractInsnNode): Boolean
- def isSize2LoadOrStore(opcode: Int): Boolean
- def isStaticMethod(methodNode: MethodNode): Boolean
- def isStore(instruction: AbstractInsnNode): Boolean
- def isStrictfpMethod(methodNode: MethodNode): Boolean
- def isSynchronizedMethod(methodNode: MethodNode): Boolean
- def isVirtualCall(instruction: AbstractInsnNode): Boolean
- def loadZeroForTypeSort(sort: Int): InsnNode
- final val maxJVMMethodSize: Int(65535)
- final val maxMethodSizeAfterInline: Int
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def negateJumpOpcode(jumpOpcode: Int): Int
-
def
newLabelNode: LabelNode
Create a new LabelNode with a correctly associated Label.
-
def
nextExecutableInstruction(insn: AbstractInsnNode, alsoKeep: (AbstractInsnNode) ⇒ Boolean = Set()): Option[AbstractInsnNode]
- Annotations
- @tailrec()
-
def
nextExecutableInstructionOrLabel(insn: AbstractInsnNode): Option[AbstractInsnNode]
- Annotations
- @tailrec()
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
parametersSize(methodNode: MethodNode): Int
The number of local variable slots used for parameters and for the
this
reference. -
def
previousExecutableInstruction(insn: AbstractInsnNode, stopBefore: (AbstractInsnNode) ⇒ Boolean = Set()): Option[AbstractInsnNode]
Find the nearest preceding node to
insn
which is executable (i.e., not a label / line number) and which is not selected bystopBefore
.Find the nearest preceding node to
insn
which is executable (i.e., not a label / line number) and which is not selected bystopBefore
.- Annotations
- @tailrec()
- def removeJumpAndAdjustStack(method: MethodNode, jump: JumpInsnNode): Unit
- def removeLineNumberNodes(instructions: InsnList): Unit
- def removeLineNumberNodes(classNode: ClassNode): Unit
- def sameTargetExecutableInstruction(a: JumpInsnNode, b: JumpInsnNode): Boolean
- def substituteLabel(reference: AnyRef, from: LabelNode, to: LabelNode): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- object ConditionalJump
- object Goto
- object JumpNonJsr
- object VarInstruction
The Scala compiler and reflection APIs.