Expand description
The object model: property tables, arrays, functions, and the prototype chain.
QuickJS splits an object into a shape (the property names and their attributes, shared between objects with the same layout) and a property vector (the values). That split is a performance feature, not a semantic one, and it only pays off once objects are created in bulk; this model keeps the property table per object, in insertion order, and therefore reproduces the ordering rules directly.
Insertion order is load-bearing: for (k in o) and Object.keys iterate in the
order properties were defined, with integer-like keys first in ascending order.
Structs§
- Closure
Env - The reference cells a closure captured from enclosing scopes.
- Compiled
Code - The bytecode of one function, plus the slot-to-cell mapping.
- JsObject
- A JavaScript object.
- Object
Data - The mutable half of an object.
- Property
- A property of an object.
Enums§
- Callable
- The body of a callable object.
- Object
Kind - What kind of object this is.
Functions§
- array_
index - The array index a property key names, if it names one.
- lookup
- Walk the prototype chain from
objectlooking forname.
Type Aliases§
- Native
Fn - A native (Rust) function reachable from JavaScript.