ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

list and describe ambiently available state used in AOs

Open michaelficarra opened this issue 3 years ago • 6 comments

  • 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?

michaelficarra avatar Apr 07 '22 00:04 michaelficarra

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.)

jmdyck avatar Apr 07 '22 02:04 jmdyck

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.

ljharb avatar Apr 07 '22 03:04 ljharb

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.

jmdyck avatar Apr 08 '22 01:04 jmdyck

But now that you mention it, "The GlobalSymbolRegistry is a List that is globally available", so that presumably qualifies as "ambiently available state".

jmdyck avatar Apr 09 '22 01:04 jmdyck

Under "running execution context", you could note "the current Realm Record" and "the active function object".

jmdyck avatar Apr 15 '22 19:04 jmdyck

https://tc39.es/ecma262/#sec-weakref-execution

  • all objects that are not live
  • all WeakRefs
  • all FinalizationRegistrys
  • all WeakMaps
  • all WeakSets

michaelficarra avatar Aug 11 '22 01:08 michaelficarra

NewTarget

michaelficarra avatar May 18 '23 23:05 michaelficarra

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.

jmdyck avatar May 19 '23 16:05 jmdyck

Constants like msPerDay are available in the date algorithms.

(For that matter, all abstract operations are available in all algorithms.)

jmdyck avatar Jun 02 '23 13:06 jmdyck