Packages

object BytecodeUtils

Source
BytecodeUtils.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BytecodeUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. implicit final class AnalyzerExtensions[V <: Value] extends AnyVal
  2. implicit final class FrameExtensions[V <: Value] extends AnyVal

Value Members

  1. def callsiteTooLargeAfterInlining(caller: MethodNode, callee: MethodNode): Boolean
  2. def cloneLabels(methodNode: MethodNode): Map[LabelNode, LabelNode]
  3. def cloneLocalVariableNodes(methodNode: MethodNode, labelMap: Map[LabelNode, LabelNode], calleeMethodName: String, localIndexMap: (Int) => Int): List[LocalVariableNode]

    Clone the local variable descriptors of methodNode and map their start and end labels according to the labelMap.

  4. def cloneTryCatchBlockNodes(methodNode: MethodNode, labelMap: Map[LabelNode, LabelNode]): List[TryCatchBlockNode]

    Clone the local try/catch blocks of methodNode and map their start and end and handler labels according to the labelMap.

  5. def finalJumpTarget(source: JumpInsnNode): LabelNode
  6. def findSingleCall(method: MethodNode, such: (MethodInsnNode) => Boolean): Option[MethodInsnNode]
  7. 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$ or Null$.

    This method is used by optimizer components to eliminate phantom values of instruction that load a value of type Nothing$ or Null$. 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 type Nothing$. Similarly for opt.getOrElse(null) and Null$.

    During bytecode generation this is handled by BCodeBodyBuilder.adapt. See the comment in that method which explains the issue with such phantom values.

  8. def getPop(size: Int): InsnNode
  9. def hasCallerSensitiveAnnotation(methodNode: MethodNode): Boolean
  10. def instructionResultSize(insn: AbstractInsnNode): Int
  11. def isAbstractMethod(methodNode: MethodNode): Boolean
  12. def isCall(instruction: AbstractInsnNode): Boolean
  13. def isConditionalJump(instruction: AbstractInsnNode): Boolean
  14. def isConstructor(methodNode: MethodNode): Boolean
  15. def isExecutable(instruction: AbstractInsnNode): Boolean
  16. def isFinalClass(classNode: ClassNode): Boolean
  17. def isFinalMethod(methodNode: MethodNode): Boolean
  18. def isInterface(classNode: ClassNode): Boolean
  19. def isJumpNonJsr(instruction: AbstractInsnNode): Boolean
  20. def isLoad(instruction: AbstractInsnNode): Boolean
  21. def isLoadOrStore(instruction: AbstractInsnNode): Boolean
  22. def isLoadStoreOrRet(instruction: AbstractInsnNode): Boolean
  23. def isNativeMethod(methodNode: MethodNode): Boolean
  24. def isPrivateMethod(methodNode: MethodNode): Boolean
  25. def isPublicMethod(methodNode: MethodNode): Boolean
  26. def isReference(t: Type): Boolean
  27. def isReturn(instruction: AbstractInsnNode): Boolean
  28. def isSize2LoadOrStore(opcode: Int): Boolean
  29. def isStaticCall(instruction: AbstractInsnNode): Boolean
  30. def isStaticMethod(methodNode: MethodNode): Boolean
  31. def isStore(instruction: AbstractInsnNode): Boolean
  32. def isStrictfpMethod(methodNode: MethodNode): Boolean
  33. def isSynchronizedMethod(methodNode: MethodNode): Boolean
  34. def isSyntheticMethod(methodNode: MethodNode): Boolean
  35. def isVarargsMethod(methodNode: MethodNode): Boolean
  36. def isVirtualCall(instruction: AbstractInsnNode): Boolean
  37. def loadZeroForTypeSort(sort: Int): InsnNode
  38. final val maxJVMMethodSize: Int(65535)
  39. final val maxMethodSizeAfterInline: 62259
  40. def negateJumpOpcode(jumpOpcode: Int): Int
  41. def newLabelNode: LabelNode

    Create a new LabelNode with a correctly associated Label.

  42. def nextExecutableInstruction(insn: AbstractInsnNode, alsoKeep: (AbstractInsnNode) => Boolean = Set()): Option[AbstractInsnNode]
    Annotations
    @tailrec()
  43. def nextExecutableInstructionOrLabel(insn: AbstractInsnNode): Option[AbstractInsnNode]
    Annotations
    @tailrec()
  44. def parametersSize(methodNode: MethodNode): Int

    The number of local variable slots used for parameters and for the this reference.

  45. 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 by stopBefore.

    Find the nearest preceding node to insn which is executable (i.e., not a label / line number) and which is not selected by stopBefore.

    Annotations
    @tailrec()
  46. def previousLineNumber(insn: AbstractInsnNode): Option[Int]
    Annotations
    @tailrec()
  47. def removeJumpAndAdjustStack(method: MethodNode, jump: JumpInsnNode): Unit
  48. def sameTargetExecutableInstruction(a: JumpInsnNode, b: JumpInsnNode): Boolean
  49. def substituteLabel(reference: AnyRef, from: LabelNode, to: LabelNode): Unit
  50. object ConditionalJump
  51. object Goto
  52. object JumpNonJsr
  53. object VarInstruction