The native side of script execution. One script_runtime per process (asserted; script_runtime::active() is what the component hooks and the core table entries reach). It owns the host, the class registry, the store, the frame block, the pending queues and the DOD query scopes; attach_world() wires the ADDED/REMOVED observers of script_component and of the activity tags (set_activity_tags). Every method runs on the main thread.
The managed heap figures of one frame (script_runtime::sample_managed_memory). allocatedBytes and the collections are what happened since the previous sample on the main thread's managed heap; heapBytes is the heap size now. Threads that scripts start are not counted.
An id the scripting entries reserved through mDeferredCommands that no flush has applied yet. held follows the components the commands recorded so far give it, so component_remove can answer whether there is something to remove; an instantiation root gets its archive's components at the flush, which the runtime cannot see (heldKnownfalse).
The component ids a scope requires (with) and excludes (without), each sorted ascending, without repeats and padded with component_id::INVALID: the same sets in any order, {a, a} included, find the same cached query (columns still follow the request order), and {a} without {b} is a different query from {a}.
Fills the core-owned entries (log_*, script_*, the five entity_*, component_*, query_*) of a table with functions that act on script_runtime::active(). Called by script_runtime::initialise.