abstract class BCodeBodyBuilder extends BCodeSkelBuilder
- Alphabetic
- By Inheritance
- BCodeBodyBuilder
- BCodeSkelBuilder
- BCodeHelpers
- BytecodeWriters
- BCodeIdiomatic
- SubComponent
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new BCodeBodyBuilder()
Type Members
-
abstract
class
StdPhase
extends GlobalPhase
A standard phase template
A standard phase template
- Definition Classes
- SubComponent
- abstract class PlainBodyBuilder extends PlainSkelBuilder
-
trait
BCAnnotGen
extends BCInnerClassGen
- Definition Classes
- BCodeHelpers
-
trait
BCClassGen
extends BCInnerClassGen
- Definition Classes
- BCodeHelpers
-
trait
BCForwardersGen
extends BCAnnotGen with BCJGenSigGen
- Definition Classes
- BCodeHelpers
-
trait
BCInnerClassGen
extends AnyRef
- Definition Classes
- BCodeHelpers
-
trait
BCJGenSigGen
extends AnyRef
- Definition Classes
- BCodeHelpers
-
trait
BCPickles
extends AnyRef
- Definition Classes
- BCodeHelpers
-
final
class
CClassWriter
extends ClassWriter
- Definition Classes
- BCodeHelpers
-
final
case class
EnclosingMethodEntry
(owner: String, name: String, methodDescriptor: String) extends Product with Serializable
- Definition Classes
- BCodeHelpers
-
trait
JAndroidBuilder
extends AnyRef
- Definition Classes
- BCodeHelpers
-
class
JBeanInfoBuilder
extends BCInnerClassGen
- Definition Classes
- BCodeHelpers
-
abstract
class
JCommonBuilder
extends BCInnerClassGen with BCAnnotGen with BCForwardersGen with BCPickles
- Definition Classes
- BCodeHelpers
-
class
JMirrorBuilder
extends JCommonBuilder
- Definition Classes
- BCodeHelpers
-
implicit
class
InsnIterInsnList
extends AnyRef
- Definition Classes
- BCodeIdiomatic
-
implicit
class
InsnIterMethodNode
extends AnyRef
- Definition Classes
- BCodeIdiomatic
-
abstract
class
JCodeMethodN
extends AnyRef
- Definition Classes
- BCodeIdiomatic
-
class
LabelDefsFinder
extends Global.Traverser
- Definition Classes
- BCodeIdiomatic
-
abstract
class
PlainSkelBuilder
extends BCClassGen with BCAnnotGen with BCInnerClassGen with JAndroidBuilder with BCForwardersGen with BCPickles with BCJGenSigGen
- Definition Classes
- BCodeSkelBuilder
-
trait
AsmpBytecodeWriter
extends BytecodeWriter
- Definition Classes
- BytecodeWriters
-
trait
BytecodeWriter
extends AnyRef
- Definition Classes
- BytecodeWriters
-
trait
ClassBytecodeWriter
extends BytecodeWriter
- Definition Classes
- BytecodeWriters
-
class
DirectToJarfileWriter
extends BytecodeWriter
- Definition Classes
- BytecodeWriters
-
trait
DumpBytecodeWriter
extends BytecodeWriter
- Definition Classes
- BytecodeWriters
Abstract Value Members
-
abstract
val
global: Global
- Definition Classes
- BytecodeWriters
-
abstract
def
newPhase(prev: Phase): Phase
The phase factory
The phase factory
- Definition Classes
- SubComponent
-
abstract
val
phaseName: String
The name of the phase
The name of the phase
- Definition Classes
- SubComponent
-
abstract
val
runsAfter: List[String]
Names of phases that must run before this phase.
Names of phases that must run before this phase.
- Definition Classes
- SubComponent
-
abstract
val
runsRightAfter: Option[String]
Name of the phase that this phase must follow immediately.
Name of the phase that this phase must follow immediately.
- Definition Classes
- SubComponent
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
Test two objects for inequality.
Test two objects for inequality.
- returns
true
if !(this == that), false otherwise.
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
Equivalent to
x.hashCode
except for boxed numeric types andnull
.Equivalent to
x.hashCode
except for boxed numeric types andnull
. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. Fornull
returns a hashcode wherenull.hashCode
throws aNullPointerException
.- returns
a hash value consistent with ==
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from BCodeBodyBuilder to any2stringadd[BCodeBodyBuilder] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (BCodeBodyBuilder, B)
- Implicit
- This member is added by an implicit conversion from BCodeBodyBuilder to ArrowAssoc[BCodeBodyBuilder] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
The expression
x == that
is equivalent toif (x eq null) that eq null else x.equals(that)
.The expression
x == that
is equivalent toif (x eq null) that eq null else x.equals(that)
.- returns
true
if the receiver object is equivalent to the argument;false
otherwise.
- Definition Classes
- AnyRef → Any
-
val
EMPTY_BTYPE_ARRAY: Array[BTypesFromSymbols.BType]
- Definition Classes
- BCodeIdiomatic
-
val
EMPTY_INT_ARRAY: Array[Int]
- Definition Classes
- BCodeIdiomatic
-
val
EMPTY_LABEL_ARRAY: Array[Label]
- Definition Classes
- BCodeIdiomatic
-
val
EMPTY_STRING_ARRAY: Array[String]
- Definition Classes
- BCodeIdiomatic
-
lazy val
JavaStringBuilderClassName: InternalName
- Definition Classes
- BCodeIdiomatic
-
final
def
addInnerClasses(jclass: ClassVisitor, refedInnerClasses: List[BTypesFromSymbols.ClassBType]): Unit
- Definition Classes
- BCodeHelpers
-
final
def
afterOwnPhase[T](op: ⇒ T): T
- Definition Classes
- SubComponent
- Annotations
- @inline()
-
final
def
asInstanceOf[T0]: T0
Cast the receiver object to be of type
T0
.Cast the receiver object to be of type
T0
.Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression
1.asInstanceOf[String]
will throw aClassCastException
at runtime, while the expressionList(1).asInstanceOf[List[String]]
will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.- returns
the receiver object.
- Definition Classes
- Any
- Exceptions thrown
ClassCastException
if the receiver object is not an instance of the erasure of typeT0
.
-
val
bTypes: BTypesFromSymbols[global.type]
- Definition Classes
- BCodeIdiomatic
-
final
def
beforeOwnPhase[T](op: ⇒ T): T
- Definition Classes
- SubComponent
- Annotations
- @inline()
-
def
classOriginallyNestedInClass(nestedClass: Global.Symbol, enclosingClass: Global.Symbol): Boolean
- Definition Classes
- BCodeHelpers
-
val
classfileVersion: Int
- Definition Classes
- BCodeIdiomatic
-
def
clone(): AnyRef
Create a copy of the receiver object.
Create a copy of the receiver object.
The default implementation of the
clone
method is platform dependent.- returns
a copy of the receiver object.
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- Note
not specified by SLS as a member of AnyRef
-
final
def
coercionFrom(code: Int): BTypesFromSymbols.BType
- Definition Classes
- BCodeIdiomatic
-
final
def
coercionTo(code: Int): BTypesFromSymbols.BType
- Definition Classes
- BCodeIdiomatic
-
def
completeSilentlyAndCheckErroneous(sym: Global.Symbol): Boolean
This is a hack to work around SI-9111.
This is a hack to work around SI-9111. The completer of
methodSym
may report type errors. We cannot change the typer context of the completer at this point and make it silent: the context captured when creating the completer in the namer. However, we can temporarily replace global.reporter (it's a var) to store errors.- Definition Classes
- BCodeHelpers
-
def
considerAsTopLevelImplementationArtifact(classSym: Global.Symbol): Boolean
True for classes generated by the Scala compiler that are considered top-level in terms of the InnerClass / EnclosingMethod classfile attributes.
True for classes generated by the Scala compiler that are considered top-level in terms of the InnerClass / EnclosingMethod classfile attributes. See comment in BTypes.
- Definition Classes
- BCodeHelpers
-
val
emitStackMapFrame: Boolean
- Definition Classes
- BCodeIdiomatic
-
def
enabled: Boolean
Is this component enabled? Default is true.
Is this component enabled? Default is true.
- Definition Classes
- SubComponent
-
def
enclosingMethodAttribute(classSym: Global.Symbol, classDesc: (Global.Symbol) ⇒ String, methodDesc: (Global.Symbol) ⇒ String): Option[EnclosingMethodEntry]
Data for emitting an EnclosingMethod attribute.
Data for emitting an EnclosingMethod attribute. None if
classSym
is a member class (not an anonymous or local class). See doc in BTypes.The class is parametrized by two functions to obtain a bytecode class descriptor for a class symbol, and to obtain a method signature descriptor fro a method symbol. These function depend on the implementation of GenASM / GenBCode, so they need to be passed in.
- Definition Classes
- BCodeHelpers
-
def
ensuring(cond: (BCodeBodyBuilder) ⇒ Boolean, msg: ⇒ Any): BCodeBodyBuilder
- Implicit
- This member is added by an implicit conversion from BCodeBodyBuilder to Ensuring[BCodeBodyBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (BCodeBodyBuilder) ⇒ Boolean): BCodeBodyBuilder
- Implicit
- This member is added by an implicit conversion from BCodeBodyBuilder to Ensuring[BCodeBodyBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): BCodeBodyBuilder
- Implicit
- This member is added by an implicit conversion from BCodeBodyBuilder to Ensuring[BCodeBodyBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): BCodeBodyBuilder
- Implicit
- This member is added by an implicit conversion from BCodeBodyBuilder to Ensuring[BCodeBodyBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
Tests whether the argument (
that
) is a reference to the receiver object (this
).Tests whether the argument (
that
) is a reference to the receiver object (this
).The
eq
method implements an equivalence relation on non-null instances ofAnyRef
, and has three additional properties:- It is consistent: for any non-null instances
x
andy
of typeAnyRef
, multiple invocations ofx.eq(y)
consistently returnstrue
or consistently returnsfalse
. - For any non-null instance
x
of typeAnyRef
,x.eq(null)
andnull.eq(x)
returnsfalse
. null.eq(null)
returnstrue
.
When overriding the
equals
orhashCode
methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2
), they should be equal to each other (o1 == o2
) and they should hash to the same value (o1.hashCode == o2.hashCode
).- returns
true
if the argument is a reference to the receiver object;false
otherwise.
- Definition Classes
- AnyRef
- It is consistent: for any non-null instances
-
def
equals(arg0: Any): Boolean
The equality method for reference types.
-
val
extraProc: Int
- Definition Classes
- BCodeIdiomatic
-
def
factoryNonJarBytecodeWriter(): BytecodeWriter
- Definition Classes
- BytecodeWriters
-
def
fieldSymbols(cls: Global.Symbol): List[Global.Symbol]
- Definition Classes
- BCodeHelpers
-
def
finalize(): Unit
Called by the garbage collector on the receiver object when there are no more references to the object.
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the
finalize
method is invoked, as well as the interaction betweenfinalize
and non-local returns and exceptions, are all platform dependent.- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- Note
not specified by SLS as a member of AnyRef
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from BCodeBodyBuilder to StringFormat[BCodeBodyBuilder] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
Returns the runtime class representation of the object.
Returns the runtime class representation of the object.
- returns
a class object corresponding to the runtime type of the receiver.
- Definition Classes
- AnyRef → Any
-
def
getFile(sym: Global.Symbol, clsName: String, suffix: String): AbstractFile
- Definition Classes
- BytecodeWriters
-
def
getFile(base: AbstractFile, clsName: String, suffix: String): AbstractFile
- clsName
cls.getName
- Definition Classes
- BytecodeWriters
-
def
getFileForClassfile(base: AbstractFile, clsName: String, suffix: String): AbstractFile
- Definition Classes
- BCodeHelpers
-
def
getOutFolder(csym: Global.Symbol, cName: String, cunit: Global.CompilationUnit): AbstractFile
- Definition Classes
- BCodeHelpers
-
def
hashCode(): Int
SubComponent are added to a HashSet and two phases are the same if they have the same name
SubComponent are added to a HashSet and two phases are the same if they have the same name
- returns
the hash code value for this object.
- Definition Classes
- SubComponent → AnyRef → Any
-
def
initBytecodeWriter(entryPoints: List[Global.Symbol]): BytecodeWriter
- Definition Classes
- BCodeHelpers
-
val
initial: Boolean
True if this phase runs before all other phases.
True if this phase runs before all other phases. Usually,
parser
.- Definition Classes
- SubComponent
-
val
internal: Boolean
True if this phase is not provided by a plug-in.
True if this phase is not provided by a plug-in.
- Definition Classes
- SubComponent
-
def
isAnonymousOrLocalClass(classSym: Global.Symbol): Boolean
True if
classSym
is an anonymous class or a local class.True if
classSym
is an anonymous class or a local class. I.e., false ifclassSym
is a member class. This method is used to decide if we should emit an EnclosingMethod attribute. It is also used to decide whether the "owner" field in the InnerClass attribute should be null.- Definition Classes
- BCodeHelpers
-
final
def
isInstanceOf[T0]: Boolean
Test whether the dynamic type of the receiver object is
T0
.Test whether the dynamic type of the receiver object is
T0
.Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression
1.isInstanceOf[String]
will returnfalse
, while the expressionList(1).isInstanceOf[List[String]]
will returntrue
. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.- returns
true
if the receiver object is an instance of erasure of typeT0
;false
otherwise.
- Definition Classes
- Any
-
def
isOriginallyStaticOwner(sym: Global.Symbol): Boolean
This is basically a re-implementation of sym.isStaticOwner, but using the originalOwner chain.
This is basically a re-implementation of sym.isStaticOwner, but using the originalOwner chain.
The problem is that we are interested in a source-level property. Various phases changed the symbol's properties in the meantime, mostly lambdalift modified (destructively) the owner. Therefore,
sym.isStatic
is not what we want. For example, in object T { def f { object U } } the owner of U is T, so UModuleClass.isStatic is true. Phase travel does not help here.- Definition Classes
- BCodeHelpers
-
val
majorVersion: Int
- Definition Classes
- BCodeIdiomatic
-
def
methodSymbols(cd: Global.ClassDef): List[Global.Symbol]
- Definition Classes
- BCodeHelpers
-
final
def
mkArray(xs: List[Label]): Array[Label]
- Definition Classes
- BCodeIdiomatic
-
final
def
mkArray(xs: List[String]): Array[String]
- Definition Classes
- BCodeIdiomatic
-
final
def
mkArray(xs: List[BTypesFromSymbols.BType]): Array[BTypesFromSymbols.BType]
- Definition Classes
- BCodeIdiomatic
-
final
def
mkArrayReverse(xs: List[Int]): Array[Int]
- Definition Classes
- BCodeIdiomatic
-
final
def
mkArrayReverse(xs: List[String]): Array[String]
- Definition Classes
- BCodeIdiomatic
-
final
def
ne(arg0: AnyRef): Boolean
Equivalent to
!(this eq that)
.Equivalent to
!(this eq that)
.- returns
true
if the argument is not a reference to the receiver object;false
otherwise.
- Definition Classes
- AnyRef
-
def
needsStaticImplMethod(sym: Global.Symbol): Boolean
- Definition Classes
- BCodeHelpers
-
def
nextEnclosing(sym: Global.Symbol): Global.Symbol
The next enclosing definition in the source structure.
The next enclosing definition in the source structure. Includes anonymous function classes under delambdafy:inline, even though they are only generated during UnCurry.
- Definition Classes
- BCodeHelpers
-
def
nextEnclosingClass(sym: Global.Symbol): Global.Symbol
- Definition Classes
- BCodeHelpers
-
final
def
notify(): Unit
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
- Definition Classes
- AnyRef
- Note
not specified by SLS as a member of AnyRef
-
final
def
notifyAll(): Unit
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
- Definition Classes
- AnyRef
- Note
not specified by SLS as a member of AnyRef
-
def
outputDirectory(sym: Global.Symbol): AbstractFile
- Definition Classes
- BytecodeWriters
-
def
ownPhase: Phase
The phase corresponding to this subcomponent in the current compiler run
The phase corresponding to this subcomponent in the current compiler run
- Definition Classes
- SubComponent
-
def
phaseNewFlags: Long
New flags defined by the phase which are not valid before
New flags defined by the phase which are not valid before
- Definition Classes
- SubComponent
-
def
phaseNextFlags: Long
New flags defined by the phase which are not valid until immediately after it
New flags defined by the phase which are not valid until immediately after it
- Definition Classes
- SubComponent
-
var
pickledBytes: Int
- Definition Classes
- BCodeHelpers
-
val
requires: List[String]
Names of phases required by this component.
Names of phases required by this component. Default is
Nil
.- Definition Classes
- SubComponent
-
val
runsBefore: List[String]
Names of phases that must run after this phase.
Names of phases that must run after this phase. Default is
Nil
.- Definition Classes
- SubComponent
-
def
serialVUID(csym: Global.Symbol): Option[Long]
- Definition Classes
- BCodeHelpers
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
terminal: Boolean
True if this phase runs after all other phases.
True if this phase runs after all other phases. Usually,
terminal
.- Definition Classes
- SubComponent
-
def
toString(): String
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
- returns
a String representation of the object.
- Definition Classes
- AnyRef → Any
-
final
def
traitImplMethodName(sym: Global.Symbol): Global.Name
- Definition Classes
- BCodeHelpers
-
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
- @throws( ... )
-
def
→[B](y: B): (BCodeBodyBuilder, B)
- Implicit
- This member is added by an implicit conversion from BCodeBodyBuilder to ArrowAssoc[BCodeBodyBuilder] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
-
object
delambdafyInline
Cache the value of delambdafy == "inline" for each run.
Cache the value of delambdafy == "inline" for each run. We need to query this value many times, so caching makes sense.
- Definition Classes
- BCodeHelpers
-
object
isJavaEntryPoint
- Definition Classes
- BCodeHelpers
-
object
JCodeMethodN
- Definition Classes
- BCodeIdiomatic
The Scala compiler API.
The following resources are useful for Scala plugin/compiler development: