list and describe ambiently available state used in AOs
- parse goal
- the surrounding agent
- a running execution context
- an execution context stack
- other execution context stacks
- an Agent record
- endianness
- whether various atomic operations are lock-free
- whether the agent can block
- the agent signifier
- objects with weak references
- an executing thread
Is there anything else? Maybe we should consolidate these better?
Is there anything else?
The set of well-known symbols appears to be ambient state that AOs can reference.
Maybe we should consolidate these better?
I'm not sure it's useful to put some of an Agent's 'constituents' in a record, and some not. Maybe it should all be in the record, and say that an Agent is modeled as an Agent Record. (Though whether you'd consider this "better consolidation", I don't know.)
If well-known symbols are included, so would be the contents of the symbol registry, and also probably ‘every single intrinsic anything” because of the way intrinsic notation works in the spec.
Well, intrinsic objects are already 'available' via the current Realm Record, which is available via the running execution context (of the surrounding agent), which is listed above.
But now that you mention it, "The GlobalSymbolRegistry is a List that is globally available", so that presumably qualifies as "ambiently available state".
Under "running execution context", you could note "the current Realm Record" and "the active function object".
https://tc39.es/ecma262/#sec-weakref-execution
- all objects that are not live
- all WeakRefs
- all
FinalizationRegistrys - all WeakMaps
- all WeakSets
NewTarget
I'd put NewTarget and the *this* value in a distinct category, as their 'bindings' are tied to a given function call, whereas everything else listed above is relatively persistent.
Constants like msPerDay are available in the date algorithms.
(For that matter, all abstract operations are available in all algorithms.)