CoreBTypesFromSymbols

dotty.tools.backend.jvm.CoreBTypesFromSymbols
final class CoreBTypesFromSymbols(ppa: PostProcessorFrontendAccess)(using val ctx: Context) extends CoreBTypes

Attributes

Graph
Supertypes
class CoreBTypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def ObjectRef: ClassBType

Attributes

Definition Classes
override def PredefRef: ClassBType

Attributes

Definition Classes
override def StringRef: ClassBType

Attributes

Definition Classes

Maps the method symbol for a box method to the boxed type of the result. For example, the method symbol for Byte.box() is mapped to the ClassBType java/lang/Byte.

Maps the method symbol for a box method to the boxed type of the result. For example, the method symbol for Byte.box() is mapped to the ClassBType java/lang/Byte.

Attributes

Definition Classes

Map from primitive types to their boxed class type. Useful when pushing class literals onto the operand stack (ldc instruction taking a class literal), see genConstant.

Map from primitive types to their boxed class type. Useful when pushing class literals onto the operand stack (ldc instruction taking a class literal), see genConstant.

Attributes

Definition Classes

The ClassBType for a class symbol sym.

The ClassBType for a class symbol sym.

Attributes

Attributes

Definition Classes

Attributes

Definition Classes
override def jlClassRef: ClassBType

Attributes

Definition Classes
override def jlCloneableRef: ClassBType

Attributes

Definition Classes

Attributes

Definition Classes
override def jlThrowableRef: ClassBType

Attributes

Definition Classes

Attributes

Definition Classes

Attributes

Definition Classes

Attributes

Definition Classes

Attributes

Definition Classes

Attributes

Definition Classes

Attributes

Definition Classes

Maps primitive types to their corresponding PrimitiveBType. The map is defined lexically above the first use of classBTypeFromSymbol because that method looks at the map.

Maps primitive types to their corresponding PrimitiveBType. The map is defined lexically above the first use of classBTypeFromSymbol because that method looks at the map.

Attributes

Definition Classes
override def srBoxedUnitRef: ClassBType

Attributes

Definition Classes

Attributes

Definition Classes
override def srNothingRef: ClassBType

Attributes

Definition Classes
override def srNullRef: ClassBType

Attributes

Definition Classes

Maps the method symbol for an unbox method to the primitive type of the result. For example, the method symbol for Byte.unbox() is mapped to the PrimitiveBType BYTE.

Maps the method symbol for an unbox method to the primitive type of the result. For example, the method symbol for Byte.unbox() is mapped to the PrimitiveBType BYTE.

Attributes

Definition Classes

Inherited methods

final def asmMethodType(msym: Symbol)(using Context): MethodBType

Attributes

Inherited from:
CoreBTypes
def classBType(internalName: InternalName)(init: ClassBType => ClassInfo): ClassBType

See doc of ClassBType.apply. This is where to use that method from. Version that cannot fail.

See doc of ClassBType.apply. This is where to use that method from. Version that cannot fail.

Attributes

Inherited from:
CoreBTypes
def classBType[T](internalName: InternalName)(init: ClassBType => Either[T, ClassInfo]): Either[T, ClassBType]

See doc of ClassBType.apply. This is where to use that method from.

See doc of ClassBType.apply. This is where to use that method from.

Attributes

Inherited from:
CoreBTypes

Obtain a previously constructed ClassBType for a given internal name, or None if no such ClassBType was constructed.

Obtain a previously constructed ClassBType for a given internal name, or None if no such ClassBType was constructed.

Attributes

Inherited from:
CoreBTypes
final def getClassBType(sym: Symbol)(using Context): ClassBType

The ClassBType for a class symbol.

The ClassBType for a class symbol.

The class symbol scala.Nothing is mapped to the class scala.runtime.Nothing$. Similarly, scala.Null is mapped to scala.runtime.Null$. This is because there exist no class files for the Nothing / Null. If used for example as a parameter type, we use the runtime classes in the classfile method signature.

Note that the referenced class symbol may be an implementation class. For example when compiling a mixed-in method that forwards to the static method in the implementation class, the class descriptor of the receiver (the implementation class) is obtained by creating the ClassBType.

Attributes

Inherited from:
CoreBTypes
final def internalName(sym: Symbol)(using Context): String

The class internal name for a given class symbol.

The class internal name for a given class symbol.

Attributes

Inherited from:
CoreBTypes
final def symDescriptor(sym: Symbol)(using Context): String

The jvm descriptor for a symbol.

The jvm descriptor for a symbol.

Attributes

Inherited from:
CoreBTypes
final def toTypeKind(tp: Type)(using Context): BType

Attributes

Inherited from:
CoreBTypes
final def typeDescriptor(t: Type): String

The jvm descriptor of a type.

The jvm descriptor of a type.

Attributes

Inherited from:
CoreBTypes
final def typeToTypeKind(tp: Type)(using Context): BType

This method returns the BType for a type reference, for example a parameter type.

This method returns the BType for a type reference, for example a parameter type.

If the result is a ClassBType for a nested class, it is added to the innerClassBufferASM.

If t references a class, toTypeKind ensures that the class is not an implementation class. See also comment on getClassBTypeAndRegisterInnerClass, which is invoked for implementation classes.

Attributes

Inherited from:
CoreBTypes

Concrete fields

Methods in scala.runtime.BoxesRuntime No need to wrap in Lazy to synchronize access, symbols won't change

Methods in scala.runtime.BoxesRuntime No need to wrap in Lazy to synchronize access, symbols won't change

Attributes

lazy val typeOfArrayOp: Map[Int, BType]

Givens

Givens

given ctx: Context