CoreBTypes

dotty.tools.backend.jvm.CoreBTypes
abstract class CoreBTypes(frontendAccess: PostProcessorFrontendAccess)(using ctx: Context)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

Concrete methods

final def asmMethodType(msym: Symbol)(using Context): MethodBType
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

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

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

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

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

final def symDescriptor(sym: Symbol)(using Context): String

The jvm descriptor for a symbol.

The jvm descriptor for a symbol.

Attributes

final def toTypeKind(tp: Type)(using Context): BType
final def typeDescriptor(t: Type): String

The jvm descriptor of a type.

The jvm descriptor of a type.

Attributes

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