Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normative: add async iteration #1066

Merged
merged 44 commits into from
Feb 15, 2018
Merged

Normative: add async iteration #1066

merged 44 commits into from
Feb 15, 2018

Conversation

domenic
Copy link
Member

@domenic domenic commented Jan 12, 2018

This supersedes @zbraniecki's #1063. The individual commits are just to show the delta from that.

One potential question for the editor is the ordering of sections within 25 (Control Abstraction Objects). I went with

  • Iteration
  • GeneratorFunction Objects
  • AsyncGeneratorFunction Objects
  • Generator Objects
  • AsyncGenerator Objects
  • Promise Objects
  • AsyncFunction Objects

but I can also see an argument for keeping the two new sections together, perhaps even after the AsyncFunction Objects section.

(Closes #1063)

@bterlson
Copy link
Member

@domenic I think I like keeping them together at the end, personally. I'll be working on reviewing the rest of this text today/tomorrow.

@bterlson
Copy link
Member

I have reviewed this from a technical basis. I have a few editorial changes that I will do once I integrate this PR (and will run anything significant by the champions as I do it).

Also, Stage 4!! 🥂

@ljharb ljharb added pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. has test262 tests labels Jan 25, 2018
@bterlson bterlson added has consensus This has committee consensus. and removed pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. labels Feb 7, 2018
@leobalter
Copy link
Member

@bterlson tc39/proposal-async-iteration#124, you might want to include this in the editorial changes you mentinoed.

@spectranaut
Copy link

In tc39/proposal-async-iteration#124 we recommended adding "async generator" the possible values of FunctionAllocate's parameter "functionKind".

Relatedly/if that change is accepted -- you might want to update AsyncGeneratorFunctionCreate line 2 to:

2. Let F be ! FunctionAllocate(functionPrototype, Strict, "async generator").

@bterlson
Copy link
Member

Alright, I think this is ready for ol' squash-n-merge. But tomorrow morning. Gotta give these commits some time to cool off first.

@domenic
Copy link
Member Author

domenic commented Feb 14, 2018

Wow, amazing work as always; thank you!

@bterlson
Copy link
Member

@domenic I'd withhold judgement until @jmdyck fixes all my mistakes ;)

@jmdyck
Copy link
Collaborator

jmdyck commented Feb 14, 2018

11 commits at domenic#2

(Putting them in a PR was probably unnecessary if you're just going to cherry-pick, but I like seeing them as a unit.)

jmdyck and others added 12 commits February 14, 2018 13:14
... in 3 invocations of ForIn/OfBodyEvaluation.

(I'm *pretty* sure that it has to be ~iterate~,
but please check.)
(I don't think _innerResult_ is guaranteed to be set at these points,
and it seems like there's more to be done with_innerReturnResult_.)
... to distinguish it from the ~normal~ value that
appears in the [[Type]] field of Completion Records,
and also to better contrast it with the ~async~ value.
@@ -16961,24 +17218,28 @@ <h1>Runtime Semantics: ForIn/OfHeadEvaluation ( _TDZnames_, _expr_, _iterationKi
1. Return ? EnumerateObjectProperties(_obj_).
1. Else,
1. Assert: _iterationKind_ is ~iterate~.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1812 suggests this line should probably have been removed in this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has consensus This has committee consensus. has test262 tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants