scala.scalanative.nir

Members list

Type members

Classlikes

sealed abstract class Attr

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Abstract.type
class Alignment
class Define
object Dyn.type
class Extern
object Final.type
class Inline
object AlwaysInline.type
object InlineHint.type
object MayInline.type
object NoInline.type
class Link
object LinktimeResolved.type
class Opt
class BailOpt
object DidOpt.type
object NoOpt.type
object UnOpt.type
object SafePublish.type
class Specialize
object MaySpecialize.type
object NoSpecialize.type
object Stub.type
object UsesIntrinsic.type
object Volatile.type
Show all
object Attr

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Attr.type
final case class Attrs(inlineHint: Inline, specialize: Specialize, opt: Opt, align: Option[Alignment], isExtern: Boolean, isBlocking: Boolean, isDyn: Boolean, isStub: Boolean, isAbstract: Boolean, isVolatile: Boolean, isFinal: Boolean, isSafePublish: Boolean, isLinktimeResolved: Boolean, isUsingIntrinsics: Boolean, links: Seq[Link], preprocessorDefinitions: Seq[Define])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Attrs

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Attrs.type
sealed abstract class Bin

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object And.type
object Ashr.type
object Fadd.type
object Fdiv.type
object Fmul.type
object Frem.type
object Fsub.type
object Iadd.type
object Imul.type
object Isub.type
object Lshr.type
object Or.type
object Sdiv.type
object Shl.type
object Srem.type
object Udiv.type
object Urem.type
object Xor.type
Show all
object Bin

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Bin.type
sealed abstract class Comp

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Fcmp
object Feq.type
object Fge.type
object Fgt.type
object Fle.type
object Flt.type
object Fne.type
class Icmp
object Ieq.type
object Ine.type
object Sge.type
object Sgt.type
object Sle.type
object Slt.type
object Uge.type
object Ugt.type
object Ule.type
object Ult.type
Show all
object Comp

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Comp.type
sealed abstract class Conv

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Bitcast.type
object Fpext.type
object Fptosi.type
object Fptoui.type
object Fptrunc.type
object Inttoptr.type
object Ptrtoint.type
object SSizeCast.type
object Sext.type
object Sitofp.type
object Trunc.type
object Uitofp.type
object ZSizeCast.type
object Zext.type
Show all
object Conv

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Conv.type
sealed abstract class Defn extends Positioned

A definition in NIR.

A definition in NIR.

Programs in NIR are represented as a sequence of definitions denoting types, methods and fields. Definitions fall into two categories:

  • Top-level definitions: these represent classes, modules, traits, or global variables and constants.
  • Member definitions: these represent fields or methods.

Classes and modules inherit from a single parent with the exception of java.lang.Object, which sits at the top of the hierarchy. They may additionally implement traits.

Definitions may also carry attributes providing further information about their semantics (e.g., whether a method may be inlined). Attributes are also used to mark special-purpose definitions, such as stubs, proxies and FFIs.

Attributes

Companion
object
Supertypes
trait Positioned
class Object
trait Matchable
class Any
Known subtypes
class Class
class Const
class Declare
class Define
class Module
class Trait
class Var
Show all
object Defn

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Defn.type
final class Fresh

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Fresh

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Fresh.type
sealed abstract class Global

The identifier of a type or method (aka a symbol).

The identifier of a type or method (aka a symbol).

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Member
object None.type
class Top
object Global

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Global.type
sealed abstract class Inst extends Positioned

Attributes

Companion
object
Supertypes
trait Positioned
class Object
trait Matchable
class Any
Known subtypes
class Cf
class If
class Jump
trait LinktimeCf
class LinktimeIf
class Ret
class Switch
class Throw
class Unreachable
class Label
class Let
Show all
object Inst

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Inst.type
class InstructionBuilder(implicit fresh: Fresh)

A class to build sequences of NIR instructions.

A class to build sequences of NIR instructions.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class FixupBuffer
class ExprBuffer
sealed trait LinktimeCondition

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
final case class Local(id: Long) extends AnyVal

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all
object Mangle

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Mangle.type
sealed abstract class MemoryOrder(val tag: Int)

An atomic memory ordering constraints.

An atomic memory ordering constraints.

Atomic instructions take ordering parameters specifying with which other instructions they synchronize.

Attributes

See also
Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object AcqRel.type
object Acquire.type
object Monotonic.type
object Release.type
object SeqCst.type
object Unordered.type
Show all
object MemoryOrder

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed case class NIRSource(directory: Path, path: Path)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object None.type
object NIRSource

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
NIRSource.type
sealed abstract class Next

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Case
class Label
object None.type
class Unwind
object Next

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Next.type
object Of

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Of.type
sealed abstract class Op

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AlignmentOf
class Arrayalloc
class Arraylength
class Arrayload
class Arraystore
class As
class Bin
class Box
class Call
class Classalloc
class Comp
class Conv
class Copy
class Dynmethod
class Elem
class Extract
class Fence
class Field
class Fieldload
class Fieldstore
class Insert
class Is
class Load
class Method
class Module
class SizeOf
class Stackalloc
class Store
class Unbox
class Var
class Varload
class Varstore
Show all
Self type
object Op

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Op.type
trait Positioned

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Defn
class Class
class Const
class Declare
class Define
class Module
class Trait
class Var
class Inst
class Cf
class If
class Jump
trait LinktimeCf
class LinktimeIf
class Ret
class Switch
class Throw
class Unreachable
class Label
class Let
Show all
object Positioned

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Positioned.type
final case class ScopeId(id: Int) extends AnyVal

The identifier of a lexical scope.

The identifier of a lexical scope.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all
object ScopeId

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
ScopeId.type
object Show

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Show.type
final class Sig(val mangle: String)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Sig

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Sig.type
sealed trait SourceFile

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Relative
object Virtual.type
object SourceFile

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
SourceFile.type
final case class SourcePosition(source: SourceFile, line: Int, column: Int, nirSource: NIRSource)

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
trait Transform

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Traverse

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed abstract class Type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class RefKind
class Array
object Null.type
class Ref
object Unit.type
class SpecialKind
class Function
object Nothing.type
class Var
object Vararg.type
object Virtual.type
class ValueKind
class ArrayValue
class StructValue
trait I
class FixedSizeI
object Byte.type
object Char.type
object Int.type
object Long.type
object Short.type
object Size.type
object Bool.type
class F
object Double.type
object Float.type
object Ptr.type
Show all
object Type

Attributes

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

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Unmangle.type
sealed abstract class Val

A NIR value.

A NIR value.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ArrayValue
class Byte
class ByteString
class Char
class ClassOf
class Const
class Double
object False.type
class Float
class Global
class Int
class Local
class Long
object Null.type
class Short
class Size
class String
class StructValue
object True.type
object Unit.type
class Virtual
class Zero
Show all
object Val

Attributes

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

Attributes

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

Types

type LocalName = String

The name of a variable in program sources.

The name of a variable in program sources.

Attributes

A map from SSA identifier to its name in program sources.

A map from SSA identifier to its name in program sources.

Local variables get lowered to an static assignment that is assigned to a unique identifier in the context of its definition. Instances of this type are used to maintain the correspondance between an SSA ID and its corresponding name in program sources.

Attributes