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. final val ExcludedForwarderFlags: Long

  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. val StringBuilderClassName: String

  20. val StringBuilderType: JObjectType

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

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

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

    Add the given 'throws' attributes to jmethod

  24. def addForwarder(jclass: JClass, module: Symbol, m: Symbol): Unit

    Add a forwarder for method m

  25. 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.

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

  27. def addInnerClasses(jclass: JClass): Unit

  28. def addModuleInstanceField(): Unit

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

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

  31. val arrayCloneType: JMethodType

  32. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  33. var clasz: IClass

  34. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. 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. *Does not assume the parameters come first!*

  36. val conds: Map[TestOp, Int]

    Definition Classes
    BytecodeUtil
  37. def debugLevel: Int

  38. 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

  39. val emitLines: Boolean

  40. val emitSource: Boolean

  41. val emitVars: Boolean

  42. val endPC: HashMap[BasicBlock, Int]

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

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

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

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

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

  47. def genBeanInfoClass(c: IClass): Unit

    Generate a bean info class that describes the given class.

  48. def genClass(c: IClass): Unit

  49. def genCode(m: IMethod): Unit

    m

    ...

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

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

  52. def genMethod(m: IMethod): Unit

  53. def generateMirrorClass(clasz: Symbol, sourceFile: SourceFile): Unit

    Generate a mirror class for a top-level module.

    Generate 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.

  54. final def getClass(): Class[_]

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

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

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

  58. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  59. var isModuleInitialized: Boolean

  60. def isParcelableClass: Boolean

  61. def isRemoteClass: Boolean

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

    Run the signature parser to catch bogus signatures.

  63. 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
  64. def javaType(s: Symbol): JType

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

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

    Definition Classes
    BytecodeUtil
  67. var jclass: JClass

  68. var jmethod: JMethod

  69. var linearization: List[BasicBlock]

  70. var method: IMethod

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

    Definition Classes
    BytecodeUtil
  72. 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
  73. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  74. val negate: Map[TestOp, TestOp]

    Definition Classes
    BytecodeUtil
  75. def newParentForAttr(attr: Symbol): Option[Type]

  76. final def notify(): Unit

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

    Definition Classes
    AnyRef
  78. 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).
  79. def serialVUID: Option[Long]

  80. def sizeOf(k: TypeKind): Int

  81. def sizeOf(sym: Symbol): Int

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

    Definition Classes
    AnyRef
  83. def toString(): String

    Definition Classes
    AnyRef → Any
  84. val toStringType: JMethodType

  85. val versionPickle: PickleBuffer

  86. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from BytecodeUtil

Inherited from AnyRef

Inherited from Any