BCodeAsmCommon

dotty.tools.backend.jvm.BCodeAsmCommon

Code shared between GenBCode and GenASM that depends on types defined in the compiler cake (Global).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class EnclosingMethodEntry(owner: String, name: String | Null, methodDescriptor: String | Null)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def enclosingMethodAttribute(classSym: Symbol, classDesc: Symbol => String, methodDesc: Symbol => String)(using ctx: Context): Option[EnclosingMethodEntry]

Data for emitting an EnclosingMethod attribute. None if classSym is a member class (not an anonymous or local class). See doc in BTypes.

Data for emitting an EnclosingMethod attribute. None if classSym is a member class (not an anonymous or local class). See doc in BTypes.

The class is parametrized by two functions to obtain a bytecode class descriptor for a class symbol, and to obtain a method signature descriptor from a method symbol. These function depend on the implementation of GenASM / GenBCode, so they need to be passed in.

Attributes

def isAnonymousOrLocalClass(classSym: Symbol)(using ctx: Context): Boolean

True if classSym is an anonymous class or a local class. I.e., false if classSym is a member class. This method is used to decide if we should emit an EnclosingMethod attribute. It is also used to decide whether the "owner" field in the InnerClass attribute should be null.

True if classSym is an anonymous class or a local class. I.e., false if classSym is a member class. This method is used to decide if we should emit an EnclosingMethod attribute. It is also used to decide whether the "owner" field in the InnerClass attribute should be null.

Attributes