pub enum IntrinsicId {
Show 52 variants
Dbg,
Panic,
Assert,
CompileError,
Cast,
SizeOf,
AlignOf,
TypeName,
TypeInfo,
Ownership,
ThreadSafety,
Implements,
Field,
Import,
EmbedFile,
TargetArch,
TargetOs,
PtrRead,
PtrWrite,
PtrReadVolatile,
PtrWriteVolatile,
PtrOffset,
PtrToInt,
IntToPtr,
NullPtr,
IsNull,
PtrCopy,
Raw,
RawMut,
Syscall,
Range,
SliceLen,
SliceIsEmpty,
SliceIndexRead,
SliceIndexWrite,
SlicePtr,
SlicePtrMut,
PartsToSlice,
PartsToMutSlice,
VecLiteral,
VecRepeat,
PartsToVec,
CStrToVec,
PtrCast,
Uninit,
Finalize,
FieldSet,
VariantUninit,
VariantField,
Spawn,
ThreadJoin,
TestPreviewGate,
}Expand description
Stable identity for every intrinsic. Stages dispatch on this rather than comparing strings, so adding an intrinsic requires updating a closed match in each consumer — the compiler enforces coverage.
Variants§
Dbg
Panic
Assert
CompileError
Cast
SizeOf
AlignOf
TypeName
TypeInfo
Ownership
ThreadSafety
ADR-0084: comptime classification of T on the Unsend < Send < Sync ladder.
Implements
Field
Import
EmbedFile
TargetArch
TargetOs
PtrRead
PtrWrite
PtrReadVolatile
PtrWriteVolatile
PtrOffset
PtrToInt
IntToPtr
NullPtr
IsNull
PtrCopy
Raw
RawMut
Syscall
Range
SliceLen
SliceIsEmpty
SliceIndexRead
SliceIndexWrite
SlicePtr
SlicePtrMut
PartsToSlice
PartsToMutSlice
VecLiteral
VecRepeat
PartsToVec
CStrToVec
PtrCast
@ptr_cast(p) -> MutPtr(T) / Ptr(T): reinterpret the pointer as
the inferred target pointer type. Result type comes from HM
inference (let-annotation or call context).
Uninit
@uninit(T) -> Uninit(T): handle to T-sized storage. Drop is
suppressed on the slot until @finalize consumes it.
Finalize
@finalize(handle) -> T: consume the handle and hand back a
real T. Sema verifies all fields written.
FieldSet
@field_set(handle, name, value): write a field of an
in-progress @uninit / @variant_uninit handle. The
write-side counterpart to read-side @field.
VariantUninit
@variant_uninit(Self, comptime tag) -> Uninit(Self):
variant-shaped counterpart to @uninit.
VariantField
@variant_field(self, comptime tag, name): read the named
field of variant tag from self. Symmetric counterpart to
@variant_uninit + @field_set.
Spawn
@spawn(fn, arg) -> JoinHandle(R) — spawn a worker thread.
ThreadJoin
@thread_join(handle: MutPtr(u8)) -> R — internal lowering
target for JoinHandle::join. Reads the runtime handle out
of the prelude struct’s handle field, calls
__gruel_thread_join, copies the return value into a stack
slot, and returns it. Codegen consults the let-binding
context for the result type. Not user-callable.
TestPreviewGate
Trait Implementations§
Source§impl Clone for IntrinsicId
impl Clone for IntrinsicId
Source§fn clone(&self) -> IntrinsicId
fn clone(&self) -> IntrinsicId
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more