scala.tools.nsc.backend.jvm

BTypes

abstract class BTypes[G <: Global] extends AnyRef

BTypes is a backend component that defines the class BType, a number of basic instances and some utilities.

A BType is essentially an slice of the array chrs denoting the name of the type, and a field denoting the kind (object, array, method, or one of the primitive types).

BTypes depends on Global just because it re-uses hash-consing of Name. It would be cleaner to create an interface for BTypeName and extend it in scala.reflect.internal.Names#Name, that would simplify testing BTypes (no Global needed).

Source
BTypes.scala
Linear Supertypes
AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BTypes
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BTypes(__global_dont_use: G)

Type Members

  1. case class ArrayBType(componentType: BType) extends RefBType with Product with Serializable

  2. trait BType extends AnyRef

  3. abstract type BTypeName <: G.Name

    Interface for names stored in chrs

  4. class ClassBType extends RefBType

    Class or Interface type.

    Class or Interface type.

    Classes are represented using their name as a slice of the chrs array. This representation is efficient because the JVM class name is initially created using classSymbol.javaBinaryName. This already adds the necessary string to the chrs array, so it makes sense to reuse the same name table in the backend.

    Not a case class because that would expose the (Int, Int) constructor (didn't find a way to make it private, also the factory in the companion).

  5. case class MethodBType(argumentTypes: List[BType], returnType: BType) extends BType with Product with Serializable

  6. case class MethodNameAndType(name: String, descriptor: String) extends Product with Serializable

  7. sealed trait PrimitiveBType extends BType

  8. sealed trait RefBType extends BType

Abstract Value Members

  1. abstract def chrs: Array[Char]

  2. abstract def createNewName(s: String): BTypeName

    Create a new name in chrs.

    Create a new name in chrs. Names are assumed to be hash-consed. Equality on BType will use reference equality to compare the names.

Concrete Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

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

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

    Definition Classes
    AnyRef → Any
  6. object BOOL extends PrimitiveBType with Product with Serializable

  7. val BOXED_BOOLEAN: ClassBType

  8. val BOXED_BYTE: ClassBType

  9. val BOXED_CHAR: ClassBType

  10. val BOXED_DOUBLE: ClassBType

  11. val BOXED_FLOAT: ClassBType

  12. val BOXED_INT: ClassBType

  13. val BOXED_LONG: ClassBType

  14. val BOXED_SHORT: ClassBType

  15. val BOXED_UNIT: ClassBType

  16. object BType

  17. object BYTE extends PrimitiveBType with Product with Serializable

  18. object CHAR extends PrimitiveBType with Product with Serializable

  19. val CT_NOTHING: ClassBType

  20. val CT_NULL: ClassBType

  21. object ClassBType

  22. object DOUBLE extends PrimitiveBType with Product with Serializable

  23. object FLOAT extends PrimitiveBType with Product with Serializable

  24. object INT extends PrimitiveBType with Product with Serializable

  25. object LONG extends PrimitiveBType with Product with Serializable

  26. object MethodBType extends Serializable

  27. val RT_NOTHING: ClassBType

  28. val RT_NULL: ClassBType

  29. object SHORT extends PrimitiveBType with Product with Serializable

  30. object UNIT extends PrimitiveBType with Product with Serializable

  31. val __global_dont_use: G

  32. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  33. val asmBoxTo: Map[BType, MethodNameAndType]

  34. val asmUnboxTo: Map[BType, MethodNameAndType]

  35. val classLiteral: Map[BType, ClassBType]

    Map from type kinds to the Java reference types.

    Map from type kinds to the Java reference types. Useful when pushing class literals onto the operand stack (ldc instruction taking a class literal).

    See also

    genConstant()

    TODO @lry rename to "boxedClassOfPrimitive" or so, check usages

    Predef.classOf

  36. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def ensuring(cond: (BTypes[G]) ⇒ Boolean, msg: ⇒ Any): BTypes[G]

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

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

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

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  44. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from BTypes[G] to StringFormat[BTypes[G]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  45. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  47. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  48. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  49. final def notify(): Unit

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

    Definition Classes
    AnyRef
  51. val srBooleanRef: ClassBType

  52. val srByteRef: ClassBType

  53. val srCharRef: ClassBType

  54. val srDoubleRef: ClassBType

  55. val srFloatRef: ClassBType

  56. val srIntRef: ClassBType

  57. val srLongRef: ClassBType

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

    Definition Classes
    AnyRef
  59. def toString(): String

    Definition Classes
    AnyRef → Any
  60. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. def [B](y: B): (BTypes[G], B)

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

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from BTypes[G] to any2stringadd[BTypes[G]]

Inherited by implicit conversion StringFormat from BTypes[G] to StringFormat[BTypes[G]]

Inherited by implicit conversion Ensuring from BTypes[G] to Ensuring[BTypes[G]]

Inherited by implicit conversion ArrowAssoc from BTypes[G] to ArrowAssoc[BTypes[G]]

Ungrouped