Resuming execution contexts

Alan Schmitt alan.schmitt at polytechnique.org
Wed Mar 17 14:49:06 UTC 2021


Hello,

On 2021-03-16 10:43, Logan Smyth <loganfsmyth at gmail.com> writes:

>> as this code does not seem to take an argument.
>
> The resumption state set by `GeneratorStart` does not take an argument
> because there is no way to access the first resumption value in a
> generator, though there is the `function.sent` proposal to allow that:
> https://github.com/tc39/proposal-function.sent
>
> In the case you're asking about, the `value` applies in the case of
> `GeneratorYield` https://tc39.es/ecma262/2021/#sec-generatoryield which
> does take a resumption value argument.

Thanks a lot for the clarification. So would it be correct to state that
resumptions are always passed a value, but in some cases it is not used
(the sentence there is "when evaluation is resumed for that execution
context") and in other cases it is used ("when evaluation is resumed
with a Completion completionName")? If so, could they be made uniform in
the specification text (for instance, "when evaluation is resumed for
that execution context with a Completion completionName")?

Thanks again,

Alan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 528 bytes
Desc: not available
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20210317/ccc4640d/attachment.sig>


More information about the es-discuss mailing list