Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Editorial suggestions #52

Closed
littledan opened this issue Sep 19, 2016 · 2 comments
Closed

Editorial suggestions #52

littledan opened this issue Sep 19, 2016 · 2 comments

Comments

@littledan
Copy link
Member

Consider reusing sync generator internal slots, and using a special kind field to differentiate (I suggested something similar for SharedArrayBuffer, though it apparently caused problems; I think it'd be good to reduce spec code duplication, but maybe not worth it given the hazards encountered there).

@littledan
Copy link
Member Author

The await fulfilled/rejected functions don't say what they return. Other places in ECMA262 return a value after "resuming" to another execution context. Consider making them explicitly return undefined. (FWIW, V8's implementation of async/await is structured this way as well, and I had to include an explicit 'return undefined' after resuming to the other context).

domenic added a commit that referenced this issue Sep 19, 2016
@domenic
Copy link
Member

domenic commented Sep 19, 2016

Fixed the return values.

For the reuse of slots, as far as I can tell that would not be much of an improvement. It would allow consolidating a single [[AsyncGeneratorState]] vs. [[GeneratorState]] usage in this spec, but would require updating the existing spec's [[GeneratorState]] checks to instead be something like [[GeneratorState]] + no [[AsyncGeneratorQueue]]. Let me know if you see things differently.

@domenic domenic closed this as completed Sep 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants