loop unrolling and completion values in ES6
alan.schmitt at polytechnique.org
Fri Apr 10 16:46:53 UTC 2015
On 2015-04-10 17:13, Allen Wirfs-Brock <allen at wirfs-brock.com> writes:
> I'm much less confident about 126.96.36.199 (evaluation of ForIn/Of).
> I would replace step 5.n with:
> n. If LoopContinues(status,labelSet) is false then
> i. let status = UpdateCompletion(status,V).
> ii. Return IteratorClose(iterator,status).
> yes, although I’ll probably make it
> k. Let result be the result of evaluating stmt.
> l. Set the running execution context …
> m. If LoopContinues(result,labelSet) is false, return IteratorClose
> (iterator,UpdateCompletion(result, V)
> n. If result.[[value]] is not empty, let V = result.[[value]].
> so that if follow the same pattern as the other loops.
> And thanks for bringing up the loop unrolling perspective. It really helps
> clarify the desired semantics for these cases.
The credit should go to Marek Materzok, a postdoc here who found the
issue while working on proving the desugaring of while loops to λJS (if
you're curious about what he is doing, his development is here:
OpenPGP Key ID : 040D0A3B4ED2E5C7
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 494 bytes
Desc: not available
More information about the es-discuss