tc39 / proposal-ecmascript-sharedmem

Shared memory and atomics for ECMAscript
Mozilla Public License 2.0
375 stars 32 forks source link

Editorial: Clarify the sense in which agents in a cluster all have the "same" [[CandidateExecution]] #152

Closed lars-t-hansen closed 7 years ago

lars-t-hansen commented 7 years ago

During execution the [[CandidateExecution]] is immutable, so it's fine for "same" to be a little vague, but really [[CandidateExecution]] has mutable fields during "construction", so it's probably best if this is clarified somehow by stating explicitly that the Agent Record contains a copy or that the Agent Records all carry a reference to the record, not the record itself.

lars-t-hansen commented 7 years ago

@syg, I believe this was fixed?

syg commented 7 years ago

The current language says:

All agents in an agent cluster share the same candidate execution record in its Agent Record's [[CandidateExecution] field, which is initialized to an empty candidate execution Record.

I didn't think too hard about clarifying further. Though now that I look at it, the "empty candidate execution" definition is missing the initialization of [[EventLists]] for all agents in the agent cluster.

syg commented 7 years ago

I spelled it out: https://github.com/syg/ecma262/commit/296d8d23550ed462efda423794896d51b3d63ac4

lars-t-hansen commented 7 years ago

Issue tracked by ecma262.