Expand description
JavaScript value representation
The core JsValue type and related structures for representing JavaScript values at runtime.
Structs§
- Accessor
- Accessor functions (getter and/or setter) - boxed to save space for data properties
- Binding
- Variable binding
- Bound
Function Data - Data for a bound function
- Bytecode
Function - Bytecode-compiled function
- Bytecode
Generator State - Generator state for bytecode-based generators
- Enum
Data - Enum internal state
- Enum
Member - Enum member - stores name and value
- Environment
Data - Environment data stored in Environment exotic objects.
- Generator
State - Generator state for suspended generators
- Guarded
- A JsValue bundled with a Guard that keeps it alive.
- Guarded
Env - A guarded environment that keeps itself alive via its guard.
- Import
Binding - Reference to a module export for live bindings
- JsMap
Key - A wrapper around JsValue that implements Hash and Eq using SameValueZero semantics.
- JsObject
- A JavaScript object
- JsString
- Reference-counted string for efficient string handling
- JsSymbol
- JavaScript Symbol primitive Symbols are unique identifiers, optionally with a description
- Native
Function - Native function wrapper
- Private
Field Key - Key for looking up private fields in an object.
- Promise
AllShared State - Shared state for Promise.all tracking This is shared across all handlers via Rc
- Promise
Handler - Handler attached via .then()/.catch()
- Promise
Race Shared State - Shared state for Promise.race tracking First promise to settle wins
- Promise
State - Promise internal state
- Property
- A property descriptor - optimized for size. Most properties are simple data properties, so we optimize for that case.
- Proxy
Data - Proxy internal state
- Saved
Frame State - Saved frame state for generators This stores the frames and values that need to be restored when resuming
- VarKey
- A key for variable lookups that uses pointer-based hashing.
Enums§
- Exotic
Object - Exotic object behavior
- Generator
Status - Status of generator execution
- JsFunction
- Function representation
- JsValue
- A JavaScript value
- Module
Export - Represents a module export entry - either a direct export from this module’s environment, or a re-export from another module.
- Promise
Status - Promise status
- Property
Key - Property key (string, index, or symbol)
- Property
Storage - Optimized property storage that uses inline storage for small objects.
- Property
Storage Iter - Iterator over PropertyStorage entries.
- Property
Storage Iter Mut - Mutable iterator over PropertyStorage entries.
Traits§
- Cheap
Clone - Trait for types that have cheap (O(1), reference-counted) clones.
Functions§
- create_
environment_ unrooted - Create a new environment object with its own temporary guard.
- create_
environment_ unrooted_ with_ capacity - Create a new environment object with pre-allocated capacity for bindings.
- create_
environment_ with_ guard - Create a new environment object with a temporary guard.
- create_
guarded_ env - Create a new guarded environment.
- number_
to_ string - Convert a JavaScript number to its canonical string representation.
- string_
to_ number - Convert a JavaScript string to a number according to ECMAScript ToNumber.
Type Aliases§
- Class
Brand Id - Unique identifier for a private field/method.
- EnvRef
- Environment reference - a GC-managed environment object.
- JsObject
Ref - Reference to a heap-allocated object (GC-managed)
- Native
Fn - Native function signature type Returns Guarded to keep newly created objects alive until ownership is transferred.