scala.tools.nsc.backend.jvm.GenJVM

BytecodeGenerator

class BytecodeGenerator extends BytecodeUtil

Java bytecode generator.

Source
GenJVM.scala
Linear Supertypes
GenJVM.BytecodeUtil, AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BytecodeGenerator
  2. BytecodeUtil
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BytecodeGenerator()

  2. new BytecodeGenerator(bytecodeWriter: GenJVM.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. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (BytecodeGenerator, B)

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to ArrowAssoc[BytecodeGenerator] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  8. val BeanDescriptionAttr: Global.ClassSymbol

  9. val BeanDisplayNameAttr: Global.ClassSymbol

  10. val BeanInfoAttr: Global.ClassSymbol

  11. val BeanInfoSkipAttr: Global.ClassSymbol

  12. val BoxesRunTime: String

  13. final val ExcludedForwarderFlags: Long

  14. val INNER_CLASSES_FLAGS: Int

  15. val JavaLangClassType: JObjectType

  16. val MIN_SWITCH_DENSITY: Double

  17. val MethodHandleType: JObjectType

  18. val MethodTypeType: JObjectType

  19. val PublicStatic: Int

  20. val PublicStaticFinal: Int

  21. val StringBuilderClassName: String

  22. val StringBuilderType: JObjectType

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

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

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

    Add the given 'throws' attributes to jmethod

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

    Add a forwarder for method m

  27. def addForwarders(jclass: JClass, moduleClass: Global.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: Global.Symbol, owner: Global.Symbol): Unit

  29. def addInnerClasses(jclass: JClass): Unit

  30. def addModuleInstanceField(): Unit

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

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

  33. val arrayCloneType: JMethodType

  34. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  35. var clasz: Global.icodes.IClass

  36. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  37. def computeLocalVarsIndex(m: Global.icodes.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!*

  38. val conds: Map[Global.icodes.TestOp, Int]

    Definition Classes
    BytecodeUtil
  39. def debugLevel: Int

  40. def emitClass(jclass: JClass, sym: Global.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

  41. val emitLines: Boolean

  42. val emitSource: Boolean

  43. val emitVars: Boolean

  44. val endPC: HashMap[Global.icodes.BasicBlock, Int]

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

  45. def ensuring(cond: (BytecodeGenerator) ⇒ Boolean, msg: ⇒ Any): BytecodeGenerator

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to Ensuring[BytecodeGenerator] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  46. def ensuring(cond: (BytecodeGenerator) ⇒ Boolean): BytecodeGenerator

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to Ensuring[BytecodeGenerator] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  47. def ensuring(cond: Boolean, msg: ⇒ Any): BytecodeGenerator

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to Ensuring[BytecodeGenerator] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  48. def ensuring(cond: Boolean): BytecodeGenerator

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to Ensuring[BytecodeGenerator] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  49. final def eq(arg0: AnyRef): Boolean

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

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

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

  53. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  54. def genBeanInfoClass(c: Global.icodes.IClass): Unit

    Generate a bean info class that describes the given class.

  55. def genClass(c: Global.icodes.IClass): Unit

  56. def genCode(m: Global.icodes.IMethod): Unit

    m

    ...

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

    Attributes
    protected
    Definition Classes
    BytecodeUtil
  58. def genField(f: Global.icodes.IField): Unit

  59. def genMethod(m: Global.icodes.IMethod): Unit

  60. def generateMirrorClass(clasz: Global.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.

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

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

    Definition Classes
    AnyRef → Any
  63. def indexOf(local: Global.icodes.Local): Int

  64. def indexOf(m: Global.icodes.IMethod, sym: Global.Symbol): Int

  65. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  66. var isModuleInitialized: Boolean

  67. def isParcelableClass: Boolean

  68. def isRemoteClass: Boolean

  69. def javaName(sym: Global.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
  70. def javaType(s: Global.Symbol): JType

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

    Definition Classes
    BytecodeUtil
  72. def javaType(t: Global.icodes.TypeKind): JType

    Definition Classes
    BytecodeUtil
  73. var jclass: JClass

  74. var jmethod: JMethod

  75. var linearization: List[Global.icodes.BasicBlock]

  76. var method: Global.icodes.IMethod

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

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

    Definition Classes
    AnyRef
  80. def newParentForAttr(attr: Global.Symbol): Option[Global.Symbol]

  81. final def notify(): Unit

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

    Definition Classes
    AnyRef
  83. def scalaSignatureAddingMarker(jclass: JClass, sym: Global.Symbol): Option[Global.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. def serialVUID: Option[Long]

  85. def sizeOf(k: Global.icodes.TypeKind): Int

  86. def sizeOf(sym: Global.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()
  94. def [B](y: B): (BytecodeGenerator, B)

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to ArrowAssoc[BytecodeGenerator] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implict Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (bytecodeGenerator: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (bytecodeGenerator: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: BytecodeGenerator

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to ArrowAssoc[BytecodeGenerator] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (bytecodeGenerator: ArrowAssoc[BytecodeGenerator]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: BytecodeGenerator

    Implicit information
    This member is added by an implicit conversion from BytecodeGenerator to Ensuring[BytecodeGenerator] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (bytecodeGenerator: Ensuring[BytecodeGenerator]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from GenJVM.BytecodeUtil

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from BytecodeGenerator to StringAdd

Inherited by implicit conversion any2stringfmt from BytecodeGenerator to StringFormat

Inherited by implicit conversion any2ArrowAssoc from BytecodeGenerator to ArrowAssoc[BytecodeGenerator]

Inherited by implicit conversion any2Ensuring from BytecodeGenerator to Ensuring[BytecodeGenerator]

Ungrouped