Skip to main content

Module builtins

Module builtins 

Source
Expand description

The realm’s builtins, as natives. One file per builtin object.

Every native reads its receiver and arguments through [CallSite]. A conversion that may run JavaScript (ToString of an object, ToNumber through valueOf) goes through the re-entrant call; a native that holds a value across an allocation roots it first (the rooting rule, enforced by gc-stress). Natives that call back into JavaScript for their own work (sort with a comparator, replace with a function) use the same re-entrant call.

Modules§

agent
$262.agent: Test262’s multi-agent host, as QuickJS’s run-test262 implements it. Each agent is a thread with its own runtime running a script through the embedder’s ScriptRunner; a broadcast hands every agent the shared bytes of a SharedArrayBuffer (an Arc, so no heap crosses threads) and waits until each has taken them; reports are strings in a shared queue.

Enums§

Native
A host function, stored by index in its function record.