TopLevel
A global scope that remembers the original built-in constructors.
The spec says most internal construction has to use the original prototype, but the global constructors are writable and deletable, so a script can replace them. Caching them here keeps internal work pointing at the real ones.
Context.initStandardObjects fills this cache when the scope is a TopLevel. A scope that inherits its globals from a prototype instead has to call cacheBuiltins itself.
Types
Properties
Functions
True for an object that has to pretend it is undefined, which only NativeWith does.
Takes a copy of the built-in constructors so a script cannot change what the engine itself uses. ScriptRuntime.initStandardObjects calls this when the scope is a TopLevel.
Same as above for a built-in method, which does not get a prototype property.
Defines a property whose value comes from a lambda that needs nothing but itself.
Defines a method backed by a Kotlin lambda.
A value another part of the engine parked on this object under key.
The cached constructor, or null when cacheBuiltins has not run.
The cached prototype, or null when cacheBuiltins has not run.
Converts this object to a primitive, guided by hint.
Backs the instanceof operator.
Seals the object, so no property can be added, removed or changed.
Attaches data that lives outside the engine, or detaches it with null.