feat: implement Iterator.zip and Iterator.zipKeyed (#4564)#4946
feat: implement Iterator.zip and Iterator.zipKeyed (#4564)#4946yush-1018 wants to merge 12 commits intoboa-dev:mainfrom
Conversation
Test262 conformance changes
Tested main commit: |
| let iterables = args.get_or_undefined(0); | ||
| let options = args.get_or_undefined(1); | ||
|
|
||
| // 1. If iterables is not an Object, throw a TypeError exception. |
There was a problem hiding this comment.
issue: include the entire specification text.
| let mode = Self::parse_zip_mode(options, context)?; | ||
|
|
||
| // 6-7. Parse padding option (only for "longest" mode). | ||
| let padding_option = if mode == ZipMode::Longest { |
There was a problem hiding this comment.
suggestion: rewrite these using some if-let chains
| let mode = Self::parse_zip_mode(options, context)?; | ||
|
|
||
| // 6-7. Parse padding option. | ||
| let padding_option = if mode == ZipMode::Longest { |
There was a problem hiding this comment.
suggestion: use if-let chains here
| } | ||
| } | ||
|
|
||
| impl IntrinsicObject for ZipIterator { |
There was a problem hiding this comment.
nit: move this higher up in the file
|
Hey @nekevss, All review feedback addressed! (Added spec comments, refactored Ready for review. Thanks! |
|
All the implementation needs to be gated behind the |
99be867 to
cc4de18
Compare
|
Can you please review this once. Thanks! |
|
Also you didn't address some of Kevin's comments |
2612098 to
0993de3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4946 +/- ##
===========================================
+ Coverage 47.24% 59.97% +12.73%
===========================================
Files 476 583 +107
Lines 46892 63798 +16906
===========================================
+ Hits 22154 38266 +16112
- Misses 24738 25532 +794 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
PR is ready to review. Thanks! |
|
Looks like there may be some conflicts that need to be resolved |
455af3a to
4f4cca1
Compare
4f4cca1 to
b1e8393
Compare
Test262 conformance changes
Tested main commit: |
|
PR is ready to merge. Thanks! |
|
Marking as blocked on #5236, since that PR would remove a lot of the boilerplate code in this PR. |
Implements the TC39 Joint Iteration proposal (#4564).
Adds Iterator.zip and Iterator.zipKeyed static methods with support for
"shortest", "longest", and "strict" modes. Includes a new ZipIterator
backing object with proper iterator protocol handling.