Package-level declarations
Types
The spec's abstract operations on objects: integrity levels, species, grouping and the rest.
GetSubstitution: the $1, $&, $<name> patterns a replacement string can carry.
A Slot whose value is produced by a getter and consumed by a setter. Unlike LambdaSlot, the property descriptor shows that this is what is happening.
The array methods that also work on typed arrays and other array-likes: iteration, reduce, sort.
The base of every function object, and also the prototype of every function defined in script except the generator functions written with function *.
What Function.prototype.bind returns. ECMAScript 5 section 15.3.4.5.
A Slot for a property of a built-in object that gets created very often. It exposes a field on a native object through plain functions, and lets the owner take over attribute changes and redefinition (array length behaves unusually on both counts).
Fills a JSDescriptor.Builder from the IR tree. Shared by every code generator.
Compiler configuration shared by the lexer, parser and code generator.
A sequence of operations run against one map. It does as little as possible: no locking, just a note of whether the map was changed, so the map underneath knows when to hand work off.
A lazily flattened rope of two character sequences. Repeated string concatenation builds a tree of these instead of copying, and the tree is flattened once, on the first read.
Implemented by objects that can hold const bindings.
Anything that can be used with new.
The state one run of the engine carries: the language version, the error reporter, the feature flags, and the call stack bookkeeping the interpreter needs.
Work to run with a Context entered. See ContextFactory.call.
Makes Context objects and answers the questions a context asks about its environment: which optional behaviours are on, and what wraps a top-level call.
How decompile should print a function.
Forwards every object operation to another object. Subclass it to wrap a host object: override only what you want to change and the rest keeps working.
The errors the engine itself raises, as ECMA edition 3 section 15.11.6 describes them: EvalError, RangeError, ReferenceError, SyntaxError, TypeError and URIError.
A SlotMap built on a hash table that holds the slots directly rather than wrapping each one in another object. That saves an allocation per property, which measurably pays off.
This interface defines a protocol for the reporting of errors during JavaScript translation or execution.
The ES6 generator object: next, return, throw and Symbol.iterator.
The base for the built-in iterators (array, string, map, set and the rest). A subclass says when it is done and what the next value is; this class turns that into {value, done} results.
The class of exceptions thrown by the JavaScript engine for translation or evaluation problems.
Implement this to back a ScriptableObject with data that lives outside the engine.
A JavaScript function: an object that can also be called and constructed.
A SlotMap built on a linked hash map. It costs more than EmbeddedSlotMap, mostly because each slot sits inside another object, but it copes far better with a lot of hash collisions, so it takes over once an object has many properties.
The table behind Map and Set: a hash map for lookup plus a doubly linked list for insertion order.
The owner of a set of id-based functions: it knows their properties and how to run them.
A function identified by a number, which its IdFunctionCall master dispatches on.
The base for a native object that exposes its methods through IdFunctionObjects hung off its prototype.
A one-method interface so a lambda can stand in for the lazy setup of a native class.
The interpreter: the one Evaluator this engine has. It runs the icode CodeGenerator emits, one call frame per script function, with the frames linked so an exception or a yield can unwind them without touching the host stack.
Lowers the AST into the Node IR that the code generator consumes.
Drives a script iterator from Kotlin: next() until done, and return() on close if the iterator has one. Close it when done, or hand it to use.
A JavaScript throw that reached Kotlin: value is whatever the script threw.
The compiled form of a script or function. The interpreter's version is InterpreterData.
Runs compiled code.
Resumes a suspended generator.
Everything known about a compiled script or function that does not change per call: its code, its names, its flags and its nested functions. Built once by the code generator through Builder, then shared by every function object made from it.
A function compiled from script source. Everything about it lives in its descriptor.
A compiled script.
An arbitrary-precision integer: what BigInt values are made of.
A LambdaFunction the engine recognises by its tag, so the interpreter and the runtime can treat it specially. Function.prototype.apply and call are the two that matter most.
Like LambdaSlot, but the lambdas also get the owning object, so the property can read and write the owner's own fields. That is what makes it usable for a native property that has to behave like a normal JavaScript property without reflection.
A function that can be used as a constructor, with the construction handed off to a lambda. LambdaFunction adds the prototype methods the same way.
One JavaScript function, implemented by a single Kotlin lambda. It has the built-in Function prototype and no parent scope; binding it into a scope is the caller's job.
A Slot whose value comes from calling a Kotlin lambda. To script it looks like any ordinary value property, which is what separates it from AccessorSlot: the descriptor shows a plain value, not a getter and setter pair.
Holds off building a built-in class until something asks for it, which cuts startup time and the memory a scope costs when most of the globals go untouched.
A Slot that builds its value the first time it is read. The built-in objects use it so they are not all constructed up front.
The JavaScript Array.
The iterator behind array.keys(), entries() and values(), and for (x of array).
The activation record of one function call: its parameters, its variables and its arguments object, kept as properties so closures and eval can reach them.
One frame of a captured stack, as handed to Error.prepareStackTrace.
The iterator Map and Set hand back from keys, values and entries.
The console object: log, warn, error and friends, plus the counters and timers. Where the output goes is the embedder's choice, through a ConsolePrinter.
The pre-ES6 generator object from JavaScript 1.7: send, next, throw, close and the legacy __iterator__. Language versions at or above ES6 get ES6Generator instead.
The global functions and values: eval, parseInt, isNaN, NaN, the error constructors and the rest.
The legacy Iterator object from JavaScript 1.7: it walks an object's own properties and throws StopIteration when there is nothing left. The ES6 protocol lives in ES6Iterator.
The JavaScript JSON object.
The Map builtin, over the insertion-ordered Hashtable.
The JavaScript Object builtin: the plain object class, its constructor and the methods on both.
The Promise builtin.
The Set builtin, including the ES2025 set algebra methods.
The iterator behind for (const ch of "text"): one code point per step.
The Symbol wrapper object. The primitive symbol value is a SymbolKey; this class is only what Object(sym) produces, and it carries the key in an internal slot.
WeakMap: a map that does not keep its keys alive. Only objects and unregistered symbols can be keys, and there is no way to ask it what it holds, which is what makes the weakness unobservable from script.
WeakSet: the same weak keys as NativeWeakMap, with nothing stored against them.
The scope a with statement pushes: every lookup goes to the object it wraps.
Collects the pieces of an object or array literal while the interpreter evaluates them, then hands the runtime the keysField, valuesField and getter/setter flags in one go.
Rewrites the IR into the lower-level form the code generator wants.
The JavaScript parser, based on the SpiderMonkey sources jsparse.c and jsparse.h.
A callable that can also produce a Ref, for delete f(x) and friends.
What the runtime needs from a regular expression engine. The engine itself lands in phase 4.
The class of exceptions thrown by the JavaScript engine.
The interface every JavaScript object implements.
The base of every JavaScript object. It keeps the properties, the prototype and the parent scope, and implements the property algorithm the whole language rests on.
Something compiled from source: a script or a function. T is the concrete type itself.
The runtime method collection. Phase 0 ports only what the lexer needs: line terminator and whitespace classification, string-to-number parsing, and the error message lookup. The rest of the file arrives with Phase 3.
The ES6-only runtime helpers.
One frame of a script stack trace.
The Callable that LambdaFunction and LambdaConstructor take. Upstream also requires it to be Serializable; there is no serialization here, so the name is kept for parity and the marker is empty (D-22).
The Constructable counterpart of SerializableCallable.
One property of a ScriptableObject. This base class is an ordinary property holding a value; the subclasses cover the ones backed by getters and setters.
The property table behind a ScriptableObject. It is iterable but is not a Map, because a real map brings overhead this does not need.
Holds the property table for whatever owns it, and swaps that table for a bigger one as the object gains properties. ScriptableObject is the only thing that extends it.
The symbol-keyed half of the property protocol, implemented alongside Scriptable.
A global scope that remembers the original built-in constructors.
Remembers promises that were rejected with nothing to catch them. One of these belongs to each Context.
A weak reference to T: holds its referent without keeping it alive.
A weak reference to T: holds its referent without keeping it alive.
A weak reference to T: holds its referent without keeping it alive.
A weak reference to T: holds its referent without keeping it alive.
A weak reference to T: holds its referent without keeping it alive.
A host exception carried through script as a JavaScript error.