Val

scala.scalanative.nir.Val$
See theVal companion class
object Val

Attributes

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

Members list

Type members

Classlikes

final case class ArrayValue(elemty: Type, values: Seq[Val]) extends Val

A homogeneous collection of data members.

A homogeneous collection of data members.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
object Bool extends Boolean => Val

A Boolean constant.

A Boolean constant.

Attributes

Supertypes
trait Boolean => Val
class Object
trait Matchable
class Any
Self type
Bool.type
final case class Byte(value: Byte) extends Val

A 8-bit signed two’s complement integer.

A 8-bit signed two’s complement integer.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class ByteString(bytes: Array[Byte]) extends Val

A collection of bytes.

A collection of bytes.

Unlike arrays, byte strings are implicitly null-terminated. Hence, they correspond to C-string literals. For example, ByteString(Array(97)) will be compiled to c"a\0".

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class Char(value: Char) extends Val

16-bit unsigned Unicode character

16-bit unsigned Unicode character

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class ClassOf(name: Top) extends Val

A reference to java.lang.Class[_] of given symbol name.

A reference to java.lang.Class[_] of given symbol name.

Instances are emitted as global variables during code feneration. They are used to deduplicate Class instances. There should be only 1 instance per type.

Note that, althrough they are currently emitted as global variables, instances of this type could be constants. However, when we added multithreading and object monitors, we needed to edit one of its fields (specifically, lockWord), which contains an ObjectMonitor or a bit set of lock word.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class Const(value: Val) extends Val

A constant.

A constant.

Note that this class does not behave like a literal constant, which are represented by ByteString, Zero, Int, etc. Instead, it represents a pointer to some constant value.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class Double(value: Double) extends Val

A 64-bit IEEE 754 double-precision float.

A 64-bit IEEE 754 double-precision float.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
case object False extends Val

The constant Boolean 'false'.

The constant Boolean 'false'.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
Self type
False.type
final case class Float(value: Float) extends Val

A 32-bit IEEE 754 single-precision float.

A 32-bit IEEE 754 single-precision float.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class Global(name: Global, valty: Type) extends Val

A reference to a global variable, constant, or method.

A reference to a global variable, constant, or method.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class Int(value: Int) extends Val

A 32-bit signed two’s complement integer.

A 32-bit signed two’s complement integer.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class Local(id: Local, valty: Type) extends Val

A local SSA variable.

A local SSA variable.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class Long(value: Long) extends Val

A 64-bit signed two’s complement integer.

A 64-bit signed two’s complement integer.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
case object Null extends Val

The constant 'null' value.

The constant 'null' value.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
Self type
Null.type
final case class Short(value: Short) extends Val

A 16-bit signed two’s complement integer.

A 16-bit signed two’s complement integer.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class Size(value: Long) extends Val

A numerical value suitable to represent the size of a container.

A numerical value suitable to represent the size of a container.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class String(value: String) extends Val

A character string.

A character string.

Values of this type correspond to instances of java.lang.String and are compiled as global arrays of UTF-16 characters. Use ByteString to represent C-string literals.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class StructValue(values: Seq[Val]) extends Val

A heterogeneous collection of data members.

A heterogeneous collection of data members.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
case object True extends Val

The constant Boolean 'true'.

The constant Boolean 'true'.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
Self type
True.type
case object Unit extends Val

The unit value.

The unit value.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
Self type
Unit.type
final case class Virtual(key: Long) extends Val

A virtual value.

A virtual value.

Virtual values only serve as placeholders during optimization. They are not serializable and are never emitted by the compiler plugin.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Val
class Object
trait Matchable
class Any
Show all
final case class Zero(of: Type) extends Val

The "zero" value of the given NIR type.

The "zero" value of the given NIR type.

Attributes

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

Inherited 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