scala.scalanative.linker

Type members

Classlikes

object ArrayRef
object BoxRef
final
class Class(val attrs: Attrs, val name: Global, val parent: Option[Class], val traits: Seq[Trait], val isModule: Boolean)(implicit val position: Position) extends ScopeInfo
Companion
object
object Class
Companion
class
sealed abstract
Companion
object
Companion
class
sealed
trait ClassPath
Companion
object
object ClassPath
Companion
class
object ClassRef extends Extractor[Class]
trait Extractor[T]
final
class Field(val attrs: Attrs, val owner: Info, val name: Global, val isConst: Boolean, val ty: Type, val init: Val)(implicit val position: Position) extends MemberInfo
object FieldRef extends Extractor[(Info, Field)]
sealed abstract
class Info
object Link
final
class LinkingException(message: String) extends Exception

Exception that is thrown when a Scala Native linking fails.

Exception that is thrown when a Scala Native linking fails.

sealed abstract
class MemberInfo extends Info
final
class Method(val attrs: Attrs, val owner: Info, val name: Global, val ty: Type, val insts: Array[Inst])(implicit val position: Position) extends MemberInfo
object MethodRef extends Extractor[(Info, Method)]
class Reach(val config: Config, entries: Seq[Global], loader: ClassLoader) extends LinktimeValueResolver
Companion
object
object Reach
Companion
class
object Ref extends Extractor[Info]
final
class Result(val infos: Map[Global, Info], val entries: Seq[Global], val unavailable: Seq[Global], val referencedFrom: Map[Global, Global], val links: Seq[Link], val defns: Seq[Defn], val dynsigs: Seq[Sig], val dynimpls: Seq[Global], val resolvedVals: Map[String, Val])
sealed abstract
class ScopeInfo extends Info
object ScopeRef extends Extractor[ScopeInfo]
object Sub

Our subtyping can be described by a following diagram:

Our subtyping can be described by a following diagram:

  value kind        ref kind         special kind
  |     \           |    \
  |     |           |      \
  prim  aggr        class  trait
  |     |           |      /
  |     |           |    /
  |     |           null
  |     |           /
  |     |       /
  |     |   /
  nothing

Primitive and aggregate types don't participate in subtyping and they have to be explicitly boxed to become compatible with a reference type.

Reference types form a simple lattice with java.lang.Object at the top and null type at the bottom. Subtyping between traits and classes is based on linearization of the all transitive parents, similarly to scalac.

Nothing is the common bottom type between reference and value types. It represents computations that may never complete normally (either loops forever or throws an exception).

final
class Trait(val attrs: Attrs, val name: Global, val traits: Seq[Trait])(implicit val position: Position) extends ScopeInfo
object TraitRef extends Extractor[Trait]
final
class Unavailable(val name: Global) extends Info
object UnitRef