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

Comments

Projects
None yet
4 participants
@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

This comment has been minimized.

Copy link

wingo commented May 8, 2013

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

@arv

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Copy link

hurrymaplelad commented Aug 17, 2013

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

@ghost

This comment has been minimized.

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