abstract class BackendUtils extends PerRunInit
This component hosts tools and utilities used in the backend that require access to a BTypes
instance.
TODO: move out of analysis package?
- Source
- BackendUtils.scala
- Alphabetic
- By Inheritance
- BackendUtils
- PerRunInit
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new BackendUtils()
Abstract Value Members
- abstract val postProcessor: PostProcessor
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from BackendUtils toany2stringadd[BackendUtils] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (BackendUtils, B)
- Implicit
- This member is added by an implicit conversion from BackendUtils toArrowAssoc[BackendUtils] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addIndyLambdaImplMethod(hostClass: InternalName, method: MethodNode, indy: InvokeDynamicInsnNode, handle: Handle): Unit
- final def addInnerClasses(jclass: ClassNode, declaredInnerClasses: List[ClassBType], refedInnerClasses: List[ClassBType]): Unit
- def addLambdaDeserialize(classNode: ClassNode, implMethods: Iterable[Handle]): Unit
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- lazy val classfileVersion: LazyVar[Int]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def cloneInstructions(methodNode: MethodNode, labelMap: Map[LabelNode, LabelNode], callsitePos: Position, keepLineNumbers: Boolean): (InsnList, Map[AbstractInsnNode, AbstractInsnNode], BitSet)
Clone the instructions in
methodNodeinto a new InsnList, mapping labels according to thelabelMap.Clone the instructions in
methodNodeinto a new InsnList, mapping labels according to thelabelMap.For invocation instructions, set the callGraph.callsitePositions to the
callsitePos.Returns
- the new instruction list
- a map from old to new instructions
- a bit set containing local variable indices that are stored into
- def collectNestedClasses(classNode: ClassNode): (List[ClassBType], List[ClassBType])
Visit the class node and collect all referenced nested classes.
Visit the class node and collect all referenced nested classes.
- returns
(declaredInnerClasses, referredInnerClasses)
- lazy val emitStackMapFrame: LazyVar[Boolean]
- def ensuring(cond: (BackendUtils) => Boolean, msg: => Any): BackendUtils
- Implicit
- This member is added by an implicit conversion from BackendUtils toEnsuring[BackendUtils] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (BackendUtils) => Boolean): BackendUtils
- Implicit
- This member is added by an implicit conversion from BackendUtils toEnsuring[BackendUtils] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): BackendUtils
- Implicit
- This member is added by an implicit conversion from BackendUtils toEnsuring[BackendUtils] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): BackendUtils
- Implicit
- This member is added by an implicit conversion from BackendUtils toEnsuring[BackendUtils] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- lazy val extraProc: LazyVar[Int]
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def getBoxedUnit: FieldInsnNode
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getScalaBox(primitiveType: Type): MethodInsnNode
- def getScalaUnbox(primitiveType: Type): MethodInsnNode
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def indyLambdaBodyMethods(hostClass: InternalName, method: MethodNode): Map[InvokeDynamicInsnNode, Handle]
The methods used as lambda bodies for IndyLambda instructions within
methodofhostClass. - def indyLambdaBodyMethods(hostClass: InternalName): SortedSet[Handle]
The methods used as lambda bodies for IndyLambda instructions within
hostClass.The methods used as lambda bodies for IndyLambda instructions within
hostClass. Note that the methods are not necessarily defined within thehostClass(when an IndyLambda is inlined into a different class). - def initialize(): Unit
- Definition Classes
- PerRunInit
- def isBoxedUnit(insn: AbstractInsnNode): Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isJavaBox(insn: MethodInsnNode): Boolean
- def isJavaUnbox(insn: MethodInsnNode): Boolean
- def isMixinForwarder(method: MethodNode, owner: ClassBType): Boolean
- def isNewForSideEffectFreeConstructor(insn: AbstractInsnNode): Boolean
- def isNonNullMethodInvocation(mi: MethodInsnNode): Boolean
- def isPredefAutoBox(insn: MethodInsnNode): Boolean
- def isPredefAutoUnbox(insn: MethodInsnNode): Boolean
- def isPredefLoad(insn: AbstractInsnNode): Boolean
- def isPrimitiveBoxConstructor(insn: MethodInsnNode): Boolean
- def isRefCreate(insn: MethodInsnNode): Boolean
- def isRefZero(insn: MethodInsnNode): Boolean
- def isRuntimeRefConstructor(insn: MethodInsnNode): Boolean
- def isScalaBox(insn: MethodInsnNode): Boolean
- def isScalaUnbox(insn: MethodInsnNode): Boolean
- def isSideEffectFreeCall(mi: MethodInsnNode): Boolean
- def isSideEffectFreeConstructorCall(insn: MethodInsnNode): Boolean
- def isTraitSuperAccessor(method: MethodNode, owner: ClassBType): Boolean
- def isTraitSuperAccessorOrMixinForwarder(method: MethodNode, owner: ClassBType): Boolean
- def isTupleConstructor(insn: MethodInsnNode): Boolean
- def looksLikeForwarderOrFactoryOrTrivial(method: MethodNode, owner: InternalName, allowPrivateCalls: Boolean): Int
Identify forwarders, aliases, anonfun$adapted methods, bridges, trivial methods (x + y), etc Returns -1 : no match 1 : trivial (no method calls), but not field getters 2 : factory 3 : forwarder with boxing adaptation 4 : generic forwarder / alias
Identify forwarders, aliases, anonfun$adapted methods, bridges, trivial methods (x + y), etc Returns -1 : no match 1 : trivial (no method calls), but not field getters 2 : factory 3 : forwarder with boxing adaptation 4 : generic forwarder / alias
TODO: should delay some checks to
canInline(during inlining) problem is: here we don't have access to the callee / accessed field, so we can't check accessibility- INVOKESPECIAL is not the only way to call private methods, INVOKESTATIC is also possible
- the body of the callee can change between here (we're in inliner heuristics) and the point when we actually inline it (code may have been inlined into the callee)
- methods accessing a public field could be inlined. on the other hand, methods accessing a private static field should not be inlined.
- lazy val majorVersion: LazyVar[Int]
- lazy val modulesAllowSkipInitialization: Set[InternalName]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def onIndyLambdaImplMethod[T](hostClass: InternalName)(action: (Map[MethodNode, Map[InvokeDynamicInsnNode, Handle]]) => T): T
- def onIndyLambdaImplMethodIfPresent[T](hostClass: InternalName)(action: (Map[MethodNode, Map[InvokeDynamicInsnNode, Handle]]) => T): Option[T]
- def optimizerWarningSiteString(cs: (callGraph)#Callsite): String
- def perRunInit(init: => Unit): Unit
- Definition Classes
- PerRunInit
- def primitiveAsmTypeToBType(primitiveType: Type): PrimitiveBType
- def removeIndyLambdaImplMethod(hostClass: InternalName, method: MethodNode, indy: InvokeDynamicInsnNode): Unit
- def runtimeRefClassBoxedType(refClass: InternalName): Type
- 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(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from BackendUtils toStringFormat[BackendUtils] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)instead ofvalue.formatted(formatString), or use thef""string interpolator. In Java 15 and later,formattedresolves to the new method in String which has reversed parameters.
- def →[B](y: B): (BackendUtils, B)
- Implicit
- This member is added by an implicit conversion from BackendUtils toArrowAssoc[BackendUtils] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.
The Scala compiler and reflection APIs.