scala.tools.nsc.backend.jvm.GenJVM

BytecodeGenerator

class BytecodeGenerator extends BytecodeUtil

Java bytecode generator.

Source
GenJVM.scala
Linear Supertypes
BytecodeUtil, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. BytecodeGenerator
  2. BytecodeUtil
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BytecodeGenerator()

  2. new BytecodeGenerator(bytecodeWriter: BytecodeWriter)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val BeanDescriptionAttr: Symbol

  7. val BeanDisplayNameAttr: Symbol

  8. val BeanInfoAttr: Symbol

  9. val BeanInfoSkipAttr: Symbol

  10. val BoxesRunTime: String

  11. lazy val CloneableClass: Symbol

  12. val INNER_CLASSES_FLAGS: Int

  13. val JavaLangClassType: JObjectType

  14. val MIN_SWITCH_DENSITY: Double

  15. val MethodHandleType: JObjectType

  16. val MethodTypeType: JObjectType

  17. val PublicStatic: Int

  18. val PublicStaticFinal: Int

  19. lazy val RemoteException: Type

  20. lazy val RemoteInterface: Symbol

  21. val StringBuilderClassName: String

  22. val StringBuilderType: JObjectType

  23. def addAnnotations(jmember: JMember, annotations: List[AnnotationInfo]): Unit

  24. def addAttribute(jmember: JMember, name: Name, buf: ByteBuffer): Unit

  25. def addExceptionsAttribute(jmethod: JMethod, excs: List[AnnotationInfo]): Unit

    Add the given 'throws' attributes to jmethod

  26. def addForwarder(jclass: JClass, module: Symbol, m: Symbol, accessFlags: Int): Unit

    Add a forwarder for method m

  27. def addForwarders(jclass: JClass, moduleClass: Symbol): Unit

    Add forwarders for all methods defined in module' that don't conflict with methods in the companion class of module'.

    Add forwarders for all methods defined in module' that don't conflict with methods in the companion class of module'. A conflict arises when a method with the same name is defined both in a class and its companion object: method signature is not taken into account.

  28. def addGenericSignature(jmember: JMember, sym: Symbol, owner: Symbol): Unit

  29. def addInnerClasses(jclass: JClass): Unit

  30. def addModuleInstanceField(): Unit

  31. def addParamAnnotations(jmethod: JMethod, pannotss: List[List[AnnotationInfo]]): Unit

  32. def addStaticInit(cls: JClass, mopt: Option[IMethod]): Unit

  33. val arrayCloneType: JMethodType

  34. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  35. def assert(cond: Boolean): Unit

  36. def assert(cond: Boolean, msg: ⇒ String): Unit

  37. var clasz: IClass

  38. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  39. def computeLocalVarsIndex(m: IMethod): Unit

    Compute the indexes of each local variable of the given method.

    Compute the indexes of each local variable of the given method. Assumes parameters come first in the list of locals.

  40. val conds: Map[TestOp, Int]

    Definition Classes
    BytecodeUtil
  41. def debugLevel: Int

  42. def dumpMirrorClass(clasz: Symbol, sourceFile: String): Unit

    Dump a mirror class for a top-level module.

    Dump a mirror class for a top-level module. A mirror class is a class containing only static methods that forward to the corresponding method on the MODULE instance of the given Scala object. It will only be generated if there is no companion class: if there is, an attempt will instead be made to add the forwarder methods to the companion class.

  43. def emitClass(jclass: JClass, sym: Symbol): Unit

    Write a class to disk, adding the Scala signature (pickled type information) and inner classes.

    Write a class to disk, adding the Scala signature (pickled type information) and inner classes.

    jclass

    The FJBG class, where code was emitted

    sym

    The corresponding symbol, used for looking up pickled information

  44. val emitLines: Boolean

  45. val emitSource: Boolean

  46. val emitVars: Boolean

  47. val endPC: HashMap[BasicBlock, Int]

    For each basic block, the first PC address following it.

  48. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  49. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  50. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  51. val fjbgContext: FJBGContext

  52. def genBeanInfoClass(c: IClass): Unit

    Generate a bean info class that describes the given class.

  53. def genClass(c: IClass): Unit

  54. def genCode(m: IMethod): Unit

    m

    ...

  55. def genConstant(jcode: JExtendedCode, const: Constant): Unit

    Attributes
    protected
    Definition Classes
    BytecodeUtil
  56. def genField(f: IField): Unit

  57. def genMethod(m: IMethod): Unit

  58. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  59. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  60. def indexOf(local: Local): Int

  61. def indexOf(m: IMethod, sym: Symbol): Int

  62. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  63. var isModuleInitialized: Boolean

  64. var isParcelableClass: Boolean

  65. var isRemoteClass: Boolean

  66. def isValidSignature(sym: Symbol, sig: String): Boolean

    Run the signature parser to catch bogus signatures.

  67. def javaName(sym: Symbol): String

    Return the a name of this symbol that can be used on the Java platform.

    Return the a name of this symbol that can be used on the Java platform. It removes spaces from names.

    Special handling: scala.Nothing erases to scala.runtime.Nothing$ scala.Null erases to scala.runtime.Null$

    This is needed because they are not real classes, and they mean 'abrupt termination upon evaluation of that expression' or null respectively. This handling is done already in GenICode, but here we need to remove references from method signatures to these types, because such classes can not exist in the classpath: the type checker will be very confused.

    Definition Classes
    BytecodeGeneratorBytecodeUtil
  68. def javaType(s: Symbol): JType

    Definition Classes
    BytecodeUtil
  69. def javaType(t: Type): JType

    Definition Classes
    BytecodeUtil
  70. def javaType(t: TypeKind): JType

    Definition Classes
    BytecodeUtil
  71. var jclass: JClass

  72. var jmethod: JMethod

  73. def legacyEmitBootstrapMethodInstall(jcode: JExtendedCode): Unit

    Emit code that installs a boostrap method for invoke dynamic.

    Emit code that installs a boostrap method for invoke dynamic. It installs the default method, found in scala.runtime.DynamicDispatch.

  74. var linearization: List[BasicBlock]

  75. var method: IMethod

  76. def mkArray(xs: Traversable[String]): Array[String]

    Definition Classes
    BytecodeUtil
  77. def mkArray(xs: Traversable[JType]): Array[JType]

    Specialized array conversion to prevent calling java.

    Specialized array conversion to prevent calling java.lang.reflect.Array.newInstance via TraversableOnce.toArray

    Definition Classes
    BytecodeUtil
  78. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  79. def needsInterfaceCall(sym: Symbol): Boolean

    Calls to methods in 'sym' need invokeinterface?

  80. val negate: Map[TestOp, TestOp]

    Definition Classes
    BytecodeUtil
  81. final def notify(): Unit

    Definition Classes
    AnyRef
  82. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  83. def scalaSignatureAddingMarker(jclass: JClass, sym: Symbol): Option[AnnotationInfo]

    Returns the ScalaSignature annotation if it must be added to this class, none otherwise; furthermore, it adds to jclass the ScalaSig marker attribute (marking that a scala signature annotation is present) or the Scala marker attribute (marking that the signature for this class is in another file).

    Returns the ScalaSignature annotation if it must be added to this class, none otherwise; furthermore, it adds to jclass the ScalaSig marker attribute (marking that a scala signature annotation is present) or the Scala marker attribute (marking that the signature for this class is in another file). The annotation that is returned by this method must be added to the class' annotations list when generating them.

    jclass

    The class file that is being readied.

    sym

    The symbol for which the signature has been entered in the symData map. This is different than the symbol that is being generated in the case of a mirror class.

    returns

    An option that is:

    • defined and contains an annotation info of the ScalaSignature type, instantiated with the pickle signature for sym (a ScalaSig marker attribute has been written);
    • undefined if the jclass/sym couple must not contain a signature (a Scala marker attribute has been written).
  84. var serialVUID: Option[Long]

  85. def sizeOf(k: TypeKind): Int

  86. def sizeOf(sym: Symbol): Int

  87. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  88. def toString(): String

    Definition Classes
    AnyRef → Any
  89. val toStringType: JMethodType

  90. val versionPickle: PickleBuffer

  91. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  92. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  93. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from BytecodeUtil

Inherited from AnyRef

Inherited from Any