Skip to main content

SlotKind

Enum SlotKind 

Source
pub enum SlotKind {
Show 26 variants Float64, NullableFloat64, Int8, NullableInt8, UInt8, NullableUInt8, Int16, NullableInt16, UInt16, NullableUInt16, Int32, NullableInt32, UInt32, NullableUInt32, Int64, NullableInt64, UInt64, NullableUInt64, IntSize, NullableIntSize, UIntSize, NullableUIntSize, Bool, String, NanBoxed, Unknown,
}
Expand description

Describes the storage kind for a single local/parameter slot in a frame.

Used by the JIT and VM to generate more efficient code by knowing the actual storage representation at compile time.

This was previously named StorageHint; the alias is kept for backwards compatibility.

Variants§

§

Float64

Plain f64 value (direct float operations)

§

NullableFloat64

Nullable f64 using NaN sentinel (Option) IEEE 754: NaN + x = NaN, so null propagates automatically

§

Int8

Plain i8 value

§

NullableInt8

Nullable i8 value

§

UInt8

Plain u8 value

§

NullableUInt8

Nullable u8 value

§

Int16

Plain i16 value

§

NullableInt16

Nullable i16 value

§

UInt16

Plain u16 value

§

NullableUInt16

Nullable u16 value

§

Int32

Plain i32 value

§

NullableInt32

Nullable i32 value

§

UInt32

Plain u32 value

§

NullableUInt32

Nullable u32 value

§

Int64

Plain i64 value

§

NullableInt64

Nullable i64 value

§

UInt64

Plain u64 value

§

NullableUInt64

Nullable u64 value

§

IntSize

Plain isize value

§

NullableIntSize

Nullable isize value

§

UIntSize

Plain usize value

§

NullableUIntSize

Nullable usize value

§

Bool

Boolean value

§

String

String reference

§

NanBoxed

NaN-boxed value: the raw u64 bits are a valid NaN-boxed interpreter value. Used for boxed locals and operand stack entries in precise deopt metadata. The VM unmarshals these via direct transmute (zero-cost passthrough).

§

Unknown

Type not determined at compile time (falls back to NaN-boxed dispatch). Should NOT appear in precise deopt metadata — use NanBoxed instead. Reserved for truly uninitialized/unresolved slots.

Implementations§

Source§

impl SlotKind

Source

pub fn from_storage_type(st: &StorageType) -> Self

Convert from runtime StorageType

Maps semantic storage types to JIT optimization hints:

  • Primitive types map directly
  • NullableFloat64 enables NaN sentinel optimization
  • Complex types fall back to boxed representation
Source

pub fn is_integer(self) -> bool

Source

pub fn is_nullable_integer(self) -> bool

Source

pub fn is_integer_family(self) -> bool

Source

pub fn is_default_int_family(self) -> bool

Source

pub fn is_float_family(self) -> bool

Source

pub fn is_numeric_family(self) -> bool

Source

pub fn is_pointer_sized_integer(self) -> bool

Source

pub fn is_signed_integer(self) -> Option<bool>

Source

pub fn integer_bit_width(self) -> Option<u16>

Source

pub fn non_nullable(self) -> Self

Source

pub fn with_nullability(self, nullable: bool) -> Self

Source

pub fn combine_integer_hints(lhs: Self, rhs: Self) -> Option<Self>

Trait Implementations§

Source§

impl Clone for SlotKind

Source§

fn clone(&self) -> SlotKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SlotKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SlotKind

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SlotKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<StorageType> for SlotKind

Source§

fn from(st: StorageType) -> Self

Convert from runtime StorageType to JIT StorageHint

Source§

impl Hash for SlotKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SlotKind

Source§

fn eq(&self, other: &SlotKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SlotKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for SlotKind

Source§

impl Eq for SlotKind

Source§

impl StructuralPartialEq for SlotKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,