loop unrolling and completion values in ES6

Alan Schmitt 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 13.6.4.13 (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.

Sure.

> 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:
https://github.com/tilk/LambdaCert).

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150410/a2b3e2d9/attachment.sig>


More information about the es-discuss mailing list