dotty.tools.backend.jvm

Members list

Type members

Classlikes

object AsmUtils

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
AsmUtils.type
final class BCodeAsmCommon[I <: DottyBackendInterface](val interface: I)

This trait contains code shared between GenBCode and GenASM that depends on types defined in the compiler cake (Global).

This trait contains code shared between GenBCode and GenASM that depends on types defined in the compiler cake (Global).

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait BCodeHelpers
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object BCodeHelpers

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
trait BCodeHelpers
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Supertypes
trait BCodeHelpers
class Object
trait Matchable
class Any
Show all
Known subtypes
abstract class BTypes

The BTypes component defines The BType class hierarchy. BTypes encapsulates all type information that is required after building the ASM nodes. This includes optimizations, geneartion of InnerClass attributes and generation of stack map frames.

The BTypes component defines The BType class hierarchy. BTypes encapsulates all type information that is required after building the ASM nodes. This includes optimizations, geneartion of InnerClass attributes and generation of stack map frames.

This representation is immutable and independent of the compiler data structures, hence it can be queried by concurrent threads.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes

This class mainly contains the method classBTypeFromSymbol, which extracts the necessary information from a symbol and its type to create the corresponding ClassBType. It requires access to the compiler (global parameter).

This class mainly contains the method classBTypeFromSymbol, which extracts the necessary information from a symbol and its type to create the corresponding ClassBType. It requires access to the compiler (global parameter).

The mixin CoreBTypes defines core BTypes that are used in the backend. Building these BTypes uses classBTypeFromSymbol, hence requires access to the compiler (global).

BTypesFromSymbols extends BTypes because the implementation of BTypes requires access to some of the core btypes. They are declared in BTypes as abstract members. Note that BTypes does not have access to the compiler instance.

Attributes

Supertypes
class BTypes
class Object
trait Matchable
class Any

For the last mile: turning generated bytecode in memory into something you can use. Has implementations for writing to class files, jars, and disassembled/javap output.

For the last mile: turning generated bytecode in memory into something you can use. Has implementations for writing to class files, jars, and disassembled/javap output.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Collect all super calls to trait members.

Collect all super calls to trait members.

For each super reference to trait member, register a call from the current class to the owner of the referenced member.

This information is used to know if it is safe to remove a redundant mixin class. A redundant mixin class is one that is implemented by another mixin class. As the methods in a redundant mixin class could be implemented with a default abstract method, the redundant mixin class could be required as a parent by the JVM.

Attributes

Companion
object
Supertypes
class MiniPhase
class Phase
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class CoreBTypes[BTFS <: BTypesFromSymbols[_ <: DottyBackendInterface]](val bTypes: BTFS)

Core BTypes and some other definitions. The initialization of these definitions requies access to symbols / types (global).

Core BTypes and some other definitions. The initialization of these definitions requies access to symbols / types (global).

The symbols used to initialize the ClassBTypes may change from one compiler run to the next. To make sure the definitions are consistent with the symbols in the current run, the intializeCoreBTypes method in BTypesFromSymbols creates a new instance of CoreBTypes in each compiler run.

The class BTypesFromSymbols does not directly reference CoreBTypes, but CoreBTypesProxy. The reason is that having a var bTypes: CoreBTypes would not allow import bTypes._. Instead, the proxy class holds a CoreBTypes in a variable field and forwards to this instance.

The definitions in CoreBTypes need to be lazy vals to break an initialization cycle. When creating a new instance to assign to the proxy, the classBTypeFromSymbol invoked in the constructor will actucally go through the proxy. The lazy vals make sure the instance is assigned in the proxy before the fields are initialized.

Note: if we did not re-create the core BTypes on each compiler run, BType.classBTypeFromInternalNameMap could not be a perRunCache anymore: the classes defeined here need to be in that map, they are added when the ClassBTypes are created. The per run cache removes them, so they would be missing in the second run.

Attributes

Supertypes
class Object
trait Matchable
class Any
final class CoreBTypesProxy[BTFS <: BTypesFromSymbols[_ <: DottyBackendInterface]](val bTypes: BTFS) extends CoreBTypesProxyGlobalIndependent[BTFS]

See comment in class CoreBTypes.

See comment in class CoreBTypes.

Attributes

Supertypes
class Object
trait Matchable
class Any

This trait make some core BTypes availalbe that don't depend on a Global instance. Some core BTypes are required to be accessible in the BTypes trait, which does not have access to Global.

This trait make some core BTypes availalbe that don't depend on a Global instance. Some core BTypes are required to be accessible in the BTypes trait, which does not have access to Global.

BTypes cannot refer to CoreBTypesProxy because some of its members depend on global, for example the type Symbol in def primitiveTypeMap: Map[Symbol, PrimitiveBType]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class CoreBTypesProxy[BTFS]
class DottyBackendInterface(val outputDirectory: AbstractFile, val superCallsMap: ReadOnlyMap[Symbol, Set[ClassSymbol]])(using val ctx: Context)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class DottyPrimitives(ictx: Context)

Scala primitive operations are represented as methods in Any and AnyVal subclasses. Here we demultiplex them by providing a mapping from their symbols to integers. Different methods exist for different value types, but with the same meaning (like plus, minus, etc.). They will all be mapped to the same int.

Scala primitive operations are represented as methods in Any and AnyVal subclasses. Here we demultiplex them by providing a mapping from their symbols to integers. Different methods exist for different value types, but with the same meaning (like plus, minus, etc.). They will all be mapped to the same int.

Note: The three equal methods have the following semantics:

  • "==" checks for null, and if non-null, calls java.lang.Object.equals (class: Any; modifier: final). Primitive: EQ
  • "eq" usual reference comparison (class: AnyRef; modifier: final). Primitive: ID
  • "equals" user-defined equality (Java semantics) (class: Object; modifier: none). Primitive: EQUALS

Inspired from the scalac compiler.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class JSPrimitives
class FileConflictException(msg: String, val file: AbstractFile) extends IOException

Can't output a file due to the state of the file system.

Can't output a file due to the state of the file system.

Attributes

Supertypes
class IOException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
class GenBCode extends Phase

Attributes

Companion
object
Supertypes
class Phase
class Object
trait Matchable
class Any
object GenBCode

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
GenBCode.type
object GenBCodeOps extends GenBCodeOps

Attributes

Companion
class
Supertypes
class GenBCodeOps
class Object
trait Matchable
class Any
Self type
class GenBCodeOps

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object GenBCodeOps.type
class GenBCodePipeline(val int: DottyBackendInterface, val primitives: DottyPrimitives)(using x$3: Context) extends BCodeSyncAndTry

Attributes

Supertypes
trait BCodeHelpers
class Object
trait Matchable
class Any
Show all
abstract class GenericSignatureVisitor(nestedOnly: Boolean)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
abstract class NestedClassesCollector[T](nestedOnly: Boolean) extends GenericSignatureVisitor

Attributes

Supertypes
class Object
trait Matchable
class Any
object Primitives

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Primitives.type