Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upinadequate .[[Value]] after ReturnIfAbrupt in 15.2.1.20 #936
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ljharb
Jun 17, 2017
Member
Doesn't ReturnIfAbrupt(sl) become the value? I don't think it mutates the fictional sl binding.
|
Doesn't ReturnIfAbrupt(sl) become the value? I don't think it mutates the fictional |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kotarondo
Jun 17, 2017
The Definition of ReturnIfAbrupt:
5.2.3.3 ReturnIfAbrupt
Algorithms steps that say or are otherwise equivalent to:
ReturnIfAbrupt(argument).
mean the same thing as:
If argument is an abrupt completion, return argument.
Else if argument is a Completion Record, let argument be argument.[[Value]].
In above case, step 2 means:
If sl is an abrupt completion, return sl.
Else if sl is a Completion Record, let sl be sl.[[Value]].
kotarondo
commented
Jun 17, 2017
|
The Definition of ReturnIfAbrupt:
In above case, step 2 means:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ljharb
Jun 17, 2017
Member
Ah, fair point. That seems like a confusing way for the spec to be worded, but given that, I think you are correct.
|
Ah, fair point. That seems like a confusing way for the spec to be worded, but given that, I think you are correct. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jmdyck
Jun 18, 2017
Collaborator
That seems like a confusing way for the spec to be worded
(I think it would be less confusing with the proposal of Issue #497.)
(I think it would be less confusing with the proposal of Issue #497.) |
kotarondo commentedJun 17, 2017
In the following Evaluation algorithm, sl.[[Value]] in the last line should be sl because sl is already a completion's [[Value]] after ReturnIfAbrupt(sl).