Dotty Documentation

0.14.0-bin-SNAPSHOT

class BTypesFromSymbols [ I ]
extends BTypes

This class mainly contains the method classBTypeFromSymbol, which extracts the necessary information from a symbol and its type to create the correpsonding 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.

[-] Constructors

BTypesFromSymbols ( int: I )

[-] Members

[+] val bCodeAsmCommon : BCodeAsmCommon [ int.type ]
[+] protected lazy val classBTypeFromInternalNameMap : Map [ String, ClassBType ]

A map from internal names to ClassBTypes. Every ClassBType is added to this map on its construction.

This map is used when computing stack map frames. The asm.ClassWriter invokes the method getCommonSuperClass. In this method we need to obtain the ClassBType for a given internal name. The method assumes that every class type that appears in the bytecode exists in the map.

Concurrent because stack map frames are computed when in the class writer, which might run on multiple classes concurrently.

[+] private lazy val convertedClasses : HashMap [ Symbol, ClassBType ]

Cache for the method classBTypeFromSymbol.

[+] val coreBTypes : CoreBTypesProxy [ BTypesFromSymbols [ I ] ]
[+] val int : I
[+] private def buildNestedInfo ( innerClassSym: Symbol ) : Option [ NestedInfo ]
[+] final def classBTypeFromSymbol ( classSym: Symbol ) : ClassBType

The ClassBType for a class symbol sym.

[+] final def intializeCoreBTypes ( ) : Unit
[+] def javaFieldFlags ( sym: Symbol ) : Int
[+] final def javaFlags ( sym: Symbol ) : Int

Return the Java modifiers for the given symbol. Java modifiers for classes: - public, abstract, final, strictfp (not used) for interfaces: - the same as for classes, without 'final' for fields: - public, private (*) - static, final for methods: - the same as for fields, plus: - abstract, synchronized (not used), strictfp (not used), native (not used) for all: - deprecated

(*) protected cannot be used, since inner classes 'see' protected members, and they would fail verification after lifted.

[+] private def setClassInfo ( classSym: Symbol , classBType: ClassBType ) : ClassBType