| 06:02 | <jmdyck> | In the post-2547 spec, is implicit unwrapping (conversion from normal completion to non-completion value) not supposed to happen? |
| 06:19 | <bakkot> | indeed not |
| 06:51 | <bakkot> | that was the title of the pr, even |
| 16:27 | <jmdyck> | If you invoke an op that returns a Completion Record, and you don't mark it with !, ?, or Completion(), is that an editorial error? Seems like that was one of the points of 2547, but I don't see it in the spec. |
| 16:35 | <bakkot> | Yes, but yeah it's not written down because it's still coherent to omit Completion |
| 16:35 | <bakkot> | ecmarkup enforces it for things other than internal/concrete methods |
| 16:36 | <jmdyck> | and Evaluation |
| 16:36 | <bakkot> | ah, yes, also that |
| 16:36 | <bakkot> | since it has its own invocation form |
| 18:15 | <jmdyck> | Is there a desire/intent to give Evaluation a conventional invocation form? |
| 18:42 | <bakkot> | Michael Ficarra wants that, I do not |
| 18:52 | <shu> | what would that form look like? |
| 18:52 | <jmdyck> | e.g. Let _ref_ be Evaluation of |Expression|. |
| 18:53 | <jmdyck> | regular SDO-invocation syntax |
| 18:54 | <jmdyck> | (you could use a different name for the op, but Evaluation appears to be what it's currently called.) |
| 18:57 | <shu> | pretty neutral |
| 18:57 | <shu> | i don't hate it |
| 19:03 | <jmdyck> | Okay, I was just curious. |
| 19:03 | <jmdyck> | The non-tangent is that I've found a class of editorial errors/bugs of the form: |
| 19:04 | <jmdyck> |
|
| 19:06 | <jmdyck> | E.g. https://tc39.es/ecma262/#sec-function-calls-runtime-semantics-evaluation |
| 19:06 | <jmdyck> | steps 4, 5, 6, 9 |
| 19:07 | <jmdyck> | Steps 6 and 9 are handling _ref_ as if it's been implicitly unwrapped. |
| 19:15 | <jmdyck> | I think putting a ? before "the result of evaluating" would avoid the error and preserve semantics (because of what ? GetValue(_CR_) does). |
| 19:16 | <jmdyck> | However, you can't just put ? before every occurrence of "the result of evaluating", because they aren't all immediately followed by ? GetValue(). |
| 19:18 | <bakkot> | offhand I think that for-of is the only place that does evaluation and does not immediately propagate errors |
| 19:19 | <jmdyck> | No, there are some others |
| 19:21 | <jmdyck> | E.g., in evaluation of a Block, you have to reset the the running execution context's LexicalEnvironment before returning the result of evaluating |StatementList|. |
| 19:22 | <bakkot> | oh, yeah |
| 19:26 | <jmdyck> | So I'm planning to submit a PR, not sure what it'll be yet. |
| 19:28 | <jmdyck> | but before i get much farther: any objection to putting ? before "the result of evaluating"? |
| 19:28 | <jmdyck> | (It doesn't currently occur) |
| 19:36 | <jmdyck> | (Other places we don't immediately propagate abrupts from evaluation is [I think] anywhere that the evaluation is followed by a call to UpdateEmpty.) |
| 20:02 | <jmdyck> | Also, how do you feel about putting Completion() around "the result of evaluating foo"? |
| 23:32 | <Michael Ficarra> | Also, how do you feel about putting |
| 23:32 | <Michael Ficarra> | but before i get much farther: any objection to putting |
| 23:36 | <shu> | say more about "more regular" |
| 23:36 | <shu> | i still feel that it's helpful to not consolidate the definition sites |
| 23:37 | <bakkot> | but before i get much farther: any objection to putting ReturnIfAbrupt step |
| 23:41 | <Michael Ficarra> | shu: agreed on not consolidating definition, but regular SDO invocation, listing parameters the same, etc |
| 23:41 | <shu> | i am neutral to weakly supportive of that, though would like to actually read it for the readability gut check |
| 23:54 | <bakkot> | evaluation doesn't take arguments, so it would presumably just be
rather than the current
|
| 23:54 | <bakkot> | except usually it would be ? Evaluation of |Thing|, and I guess sometimes it would be Completion(Evaluation of |Thing|) |