Expand description
JavaScript values, and the conversions between them.
A Value is what the VM’s stack and every property hold. The number split
between Value::Int and Value::Float mirrors QuickJS’s JS_TAG_INT /
JS_TAG_FLOAT64: keeping small integers as i32 makes array indices and loop
counters exact and cheap. Every arithmetic result that does not fit i32
becomes a Float, so the two are interchangeable numerically and only
Value::strict_equals has to care about which one it has.
Structs§
- Cell
- A mutable binding cell, shared between closures.
- JsString
- An immutable string, stored on the GC heap.
Enums§
- Value
- A JavaScript value.
Functions§
- number_
to_ string ToStringapplied to a number.- number_
to_ string_ for_ print ToStringas the engine’sprintapplies it, which differs from the language one for negative zero.- string_
to_ number ToNumberapplied to a string.- to_
int32 ToInt32.