assemblyscript icon indicating copy to clipboard operation
assemblyscript copied to clipboard

[WIP] implement for..of loops and iterators

Open pitust opened this issue 4 years ago • 1 comments

  • [x] I've read the contributing guidelines

This PR implements for..of loops as well as iterators, which are important (convenience) features when writing code in assemblyscript.

The optimal solution would be to use Symbol.iterator, however symbols (and the api itself) are not yet implemented by the compiler.

Instead, this PR uses a different approach: a new decorator, @iterator.

TODO:

  • [ ] Add tests
  • [x] Run npm check and npm test to make sure the code is fine

pitust avatar Jun 13 '21 00:06 pitust

I'm getting some memory leaks, but they are unrelated to the added code - they exist even when writing similar code by hand somehow.

I disabled rtrace for this test temporarily

pitust avatar Jun 13 '21 08:06 pitust

This PR has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Nov 23 '23 23:11 github-actions[bot]

This PR has been automatically closed due to lack of recent activity, but feel free to reopen it as long as you merge in the main branch afterwards.

github-actions[bot] avatar Dec 01 '23 23:12 github-actions[bot]