Felix Kling wrote:
- `ResolveBinding` is an *"abstract operation"* so it returns a
completion record, whose value is a *"Reference"*, even though
completion records are only supposed to have language values as value
(6.2.2) (this still confuses me)
Uh, that's weird indeed. Looks like you found a mistake.
- As per your quote, `Return ?ResolveBinding(...)` simply returns that
completion record.
- In `Let exprRef be the result of evaluating Expression`, `exprRef` is
a Reference, the completion record obtained by *"evaluating Expression"*
was implicitly unwrapped, according to 6.2.2.2: *"Any reference to a
Completion Record value that is in a context that does not explicitly
require a complete Completion Record value is equivalent to an explicit
reference to the `[[Value]] field of the Completion Record value unless
the Completion Record is an abrupt completion."`
Am I right so far?
I believe so, yes.
Then, does the sentence
The algorithms of this specification often implicitly return
Completion Records whose `[[Type]]` is `normal`.
mean that
1. Algorithms may or may not return a completion record (i.e. some do
and some don't).
2. Algorithms *always* return a completion record, but it's not always
*explicitly* stated in the algorithm.
I'd say the second. But then again, there might be some algorithms that
get the [[Value]] from a completion record, and those hardly will return
a completion record, would they? Take `ReturnIfAbrupt` as an example.
It's weird.
- Bergi
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss