Type

scala.scalanative.nir.Type
See theType companion class
object Type

Attributes

Companion
class
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Type.type

Members list

Type members

Classlikes

sealed abstract class AggregateKind extends ValueKind

The type of an aggregate.

The type of an aggregate.

Attributes

Supertypes
class ValueKind
class Type
class Object
trait Matchable
class Any
Known subtypes
class ArrayValue
class StructValue
final case class Array(ty: Type, nullable: Boolean) extends RefKind

The type of an array reference.

The type of an array reference.

An Array is a reference to scala.Array[T]. It contains a header followed by a tail allocated buffer, which typically sit on the heap. That is unlike ArrayValue, which corresponds to LLVM's fixed-size array type.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class RefKind
class Type
class Object
trait Matchable
class Any
Show all
final case class ArrayValue(ty: Type, n: Int) extends AggregateKind

The type of a homogeneous collection of data members.

The type of a homogeneous collection of data members.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
case object Bool extends PrimitiveKind

The type of Boolean values.

The type of Boolean values.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Bool.type
case object Byte extends FixedSizeI

The type of a 8-bit signed integer.

The type of a 8-bit signed integer.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class FixedSizeI
trait I
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Byte.type
case object Char extends FixedSizeI

The type of a 16-bit unsigned integer.

The type of a 16-bit unsigned integer.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class FixedSizeI
trait I
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Char.type
case object Double extends F

The type of a 64-bit IEEE 754 single-precision float.

The type of a 64-bit IEEE 754 single-precision float.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class F
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Double.type
sealed abstract class F(width: Int) extends PrimitiveKind

The type of a floating-point number.

The type of a floating-point number.

Value parameters

width

The bit width of the type's instances.

Attributes

Supertypes
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Known subtypes
object Double
object Float
sealed abstract class FixedSizeI(width: Int, val signed: Boolean) extends PrimitiveKind, I

The type of a fixed-size integer.

The type of a fixed-size integer.

Value parameters

signed

true iff the type's instances are signed.

width

The bit width of the type's instances.

Attributes

Supertypes
trait I
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Known subtypes
object Byte
object Char
object Int
object Long
object Short
case object Float extends F

The type of a 32-bit IEEE 754 single-precision float.

The type of a 32-bit IEEE 754 single-precision float.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class F
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Float.type
final case class Function(args: Seq[Type], ret: Type) extends SpecialKind

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class SpecialKind
class Type
class Object
trait Matchable
class Any
Show all
sealed trait I extends ValueKind

The type of an integer.

The type of an integer.

Attributes

Supertypes
class ValueKind
class Type
class Object
trait Matchable
class Any
Known subtypes
class FixedSizeI
object Byte
object Char
object Int
object Long
object Short
object Size
Show all
case object Int extends FixedSizeI

The type of a 32-bit signed integer.

The type of a 32-bit signed integer.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class FixedSizeI
trait I
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Int.type
case object Long extends FixedSizeI

The type of a 64-bit signed integer.

The type of a 64-bit signed integer.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class FixedSizeI
trait I
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Long.type
case object Nothing extends SpecialKind

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class SpecialKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Nothing.type
case object Null extends RefKind

The null reference type.

The null reference type.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class RefKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Null.type
sealed abstract class PrimitiveKind(val width: Int) extends ValueKind

A primitive value type.

A primitive value type.

Value parameters

width

The bit width of the type's instances.

Attributes

Supertypes
class ValueKind
class Type
class Object
trait Matchable
class Any
Known subtypes
object Bool
class F
object Double
object Float
class FixedSizeI
object Byte
object Char
object Int
object Long
object Short
Show all
case object Ptr extends ValueKind

The type of pointers.

The type of pointers.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Ptr.type
final case class Ref(name: Top, exact: Boolean, nullable: Boolean) extends RefKind

The type of a reference.

The type of a reference.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class RefKind
class Type
class Object
trait Matchable
class Any
Show all
sealed abstract class RefKind extends Type

A reference type.

A reference type.

Attributes

Supertypes
class Type
class Object
trait Matchable
class Any
Known subtypes
class Array
object Null
class Ref
object Unit
case object Short extends FixedSizeI

The type of a 16-bit signed integer.

The type of a 16-bit signed integer.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class FixedSizeI
trait I
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Short.type
case object Size extends ValueKind, I

The type of a value suitable to represent the size of a container.

The type of a value suitable to represent the size of a container.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait I
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Size.type
sealed abstract class SpecialKind extends Type

Second-class types.

Second-class types.

Attributes

Supertypes
class Type
class Object
trait Matchable
class Any
Known subtypes
class Function
object Nothing
class Var
object Vararg
object Virtual
final case class StructValue(tys: Seq[Type]) extends AggregateKind

The type of a heterogeneous collection of data members.

The type of a heterogeneous collection of data members.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ValueKind
class Type
class Object
trait Matchable
class Any
Show all
case object Unit extends RefKind

The unit type.

The unit type.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class RefKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Unit.type
sealed abstract class ValueKind extends Type

The type of an aggregate or primitive value.

The type of an aggregate or primitive value.

Attributes

Supertypes
class Type
class Object
trait Matchable
class Any
Known subtypes
class ArrayValue
class StructValue
trait I
class FixedSizeI
object Byte
object Char
object Int
object Long
object Short
object Size
object Bool
class F
object Double
object Float
object Ptr
Show all
final case class Var(ty: Type) extends SpecialKind

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class SpecialKind
class Type
class Object
trait Matchable
class Any
Show all
case object Vararg extends SpecialKind

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class SpecialKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Vararg.type
case object Virtual extends SpecialKind

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class SpecialKind
class Type
class Object
trait Matchable
class Any
Show all
Self type
Virtual.type
object unsigned

Attributes

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

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def fromArrayClass(name: Top): Option[Type]
def isArray(clsTy: Ref): Boolean
def isArray(clsName: Top): Boolean
def isPtrBox(ty: Type): Boolean
def isPtrType(ty: Type): Boolean
def isSizeBox(ty: Type): Boolean
def normalize(ty: Type): Type
def toArrayClass(ty: Type): Top
def typeToName(tpe: Type): Top

Concrete fields

val box: Map[Type, Type]
val boxesTo: Seq[(Type, Type)]
val unbox: Map[Type, Type]