frostney / frostney/GocciaScript
Implement Async Iterator Helpers
Nobody has claimed this yet.
- Dominant language
- Pascal
- Stars
- 20
- Forks
- 3
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 45
Description
Summary
Implement the Stage 2 TC39 proposal: https://github.com/tc39/proposal-async-iterator-helpers
Implement AsyncIterator.from plus all lazy and terminal helpers in the current draft with correct sequential awaiting and closing.
Why
This proposal fits GocciaScript's modern ECMAScript surface and the 0.13.0 proposal roadmap. It should extend the engine's existing architecture rather than arrive as a userland shim.
Current behavior
Async generators, Symbol.asyncIterator, for-await-of, and Array.fromAsync exist, but the AsyncIterator intrinsic/helper family is absent.
Expected behavior
Implement AsyncIterator.from plus all lazy and terminal helpers in the current draft with correct sequential awaiting and closing.
Scope notes
Reuse async-generator, Promise job, iterator-close, and GC-rooting infrastructure rather than blocking wrappers around sync helpers. Cover async-from-sync, thenables, re-entrancy, abrupt completion, GC, timeouts, docs, and tests. Additive API: no flag.
Related bytecode roadmap: #871 and #875. Update relevant documentation and the Goccia proposal inventory. Use the current proposal specification at implementation time; add focused project tests and matching pinned Test262/proposal coverage without regressions.
Acceptance criteria
- Parser/API surface, descriptors, evaluation order, errors, and protocol behavior match the current proposal.
- Implementation uses the identified shared engine seam without a duplicate compatibility shim.
- Focused positive, negative, abrupt-completion, and edge-case tests cover the proposal.
- Relevant project suites, pinned Test262 cases, formatting, and documentation checks pass.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing async generators, Symbol.asyncIterator, for-await-of, and Array.fromAsync implementation paths and the shared Promise job, iterator-close, and GC-rooting infrastructure. Use the current TC39 proposal as the behavioral reference, then run focused project tests and the pinned Test262/proposal coverage. Done means the full AsyncIterator.from and helper surface, edge cases, documentation, and relevant checks pass without regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers, documentation, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100