Skip to content

Support generators #351

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

Open
jtenner opened this issue Nov 29, 2018 · 2 comments
Open

Support generators #351

jtenner opened this issue Nov 29, 2018 · 2 comments

Comments

@jtenner
Copy link
Contributor

jtenner commented Nov 29, 2018

This sort of feature would help us develop features like Array.prototype.entries, Array.prototype.values, and other features that require generators.

For instance:

class Array<T> {
  *values(): Iterator<T> {
    var length = this.length_;
    for (let i = 0; i < length; i++) {
      yield this.__unchecked_get(i);
    }
  }
}
@jtenner jtenner changed the title Generator function support [Feature Request] Generator function support Nov 29, 2018
@MaxGraey
Copy link
Member

I will collect and share helpful articles about generators here:

  1. https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io/en/latest/advanced-constructs/generators.html

@dcodeIO dcodeIO changed the title [Feature Request] Generator function support Support generators May 27, 2020
@leeho0108
Copy link

Years passed, Is there any plan/news for this?

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

No branches or pull requests

4 participants