Skip to content

Conversation

@bnoordhuis
Copy link
Contributor

I initially tried to do this in C but it was so onerous I decided to switch to JS. Marginally less onerous but still a massive PITA to implement.

Iterator.zipKeyed is up next.

@@ -1,10 +1,10 @@
;(function(Array, TypeError, asyncIterator, defineProperty, iterator) {
;(function(Array, TypeError, Symbol·asyncIterator, Object·defineProperty, Symbol·iterator) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cute, innit?

@@ -0,0 +1,210 @@
;(function(IteratorHelper, InternalError, TypeError, call, Symbol·iterator) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A thing to keep in mind when reviewing this file: it's almost impossible to change or reorder anything here without breaking some test262 tests.

@saghul
Copy link
Contributor

saghul commented Dec 18, 2025

I'll do a full review shortly, bun in the meantime, some food for thought: do we want to have each of these as a separate file or maybe have a builtins.js where we put all similar ones? I think I have a soft preference for the single file approach, WDYT?

@bnoordhuis
Copy link
Contributor Author

With a single .js file there's no lazy-loading of individual built-ins; it's all or nothing.

@saghul
Copy link
Contributor

saghul commented Dec 18, 2025

With a single .js file there's no lazy-loading of individual built-ins; it's all or nothing.

Fair enough!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants