Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: "the calling surrounding" #1721

Closed
jmdyck opened this issue Oct 5, 2019 · 2 comments · Fixed by #2736
Closed

Editorial: "the calling surrounding" #1721

jmdyck opened this issue Oct 5, 2019 · 2 comments · Fixed by #2736

Comments

@jmdyck
Copy link
Collaborator

jmdyck commented Oct 5, 2019

In LeaveCriticalSection (introduced in PR #1692) step 2 is:
1. Let _execution_ be the [[CandidateExecution]] field of the calling surrounding's Agent Record.

Presumably, "the calling surrounding" should be either "the calling agent" or "the surrounding agent", but I don't know which.

@jmdyck
Copy link
Collaborator Author

jmdyck commented Jan 28, 2021

(bump)

@jmdyck
Copy link
Collaborator Author

jmdyck commented Jan 31, 2022

I'm now pretty sure that "the calling agent" is just a lingering alias for "the surrounding agent". (So it and "the calling surrounding" should just be changed to "the surrounding agent".)

For instance, consider that the preamble for Atomics.wait says:

Atomics.wait puts the calling agent in a wait queue and puts it to sleep ...

But then the algorithm says:

1. Let _W_ be AgentSignifier().
1. Perform AddWaiter(_WL_, _W_).
1. ... SuspendAgent(_WL_, _W_, _t_).

and AgentSignifier() returns the signifier for the surrounding agent, so the algorithm is actually putting the surrounding agent in a wait queue and suspending it.

@ljharb ljharb added the editor call to be discussed in the next editor call label Apr 7, 2022
syg added a commit to syg/ecma262 that referenced this issue Apr 13, 2022
Closes tc39#1721

In parts having to do with Atomics, we use the phrase "surrounding
agent" interchangeably with "calling agent". This PR makes the phrasing
uniform.
@syg syg removed editor call to be discussed in the next editor call spec bug labels Apr 13, 2022
@ljharb ljharb closed this as completed in 4f72173 Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants