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

update or make an alternate version for the ES6 generators API #28

Open
dherman opened this issue May 8, 2013 · 5 comments
Open

update or make an alternate version for the ES6 generators API #28

dherman opened this issue May 8, 2013 · 5 comments

Comments

@dherman
Copy link
Contributor

dherman commented May 8, 2013

The ES6 generators and iterators API is a little different from the one initially implemented in Firefox, which dates back to an earlier design. Update task.js to work with the new API, which can now be tested in the latest build of V8:

http://wingolog.org/archives/2013/05/08/generators-in-v8

We should hopefully start implementing the new generators API soon in SpiderMonkey as well, so that the new version of task.js can then be used.

@wingo
Copy link

wingo commented May 8, 2013

Note that it's fairly easy to support both APIs at once, as a stopgap measure.

@arv
Copy link

arv commented May 11, 2013

It should also be pretty straight forward to wrap a SpiderMonkey generator in an object that exposes the ES6 API.

@ghost
Copy link

ghost commented May 23, 2013

Just to play around with this and generators in node, I did this as well as updating it to work with node's module system. The change to work with the updated protocol was trivial, only requiring modification to runScheduledTask.

https://github.com/Benvie/task.js/commit/ae74dca4caf0122bc0d99bcef73beba252a9b9c4

@hurrymaplelad
Copy link

Thanks @Benvie, let me experiment in node. Anyone working on supporting both APIs?

@ghost
Copy link

ghost commented Sep 6, 2013

See #33 for pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants