Skip to content

Simplify Array.fromAsync lazy loading#982

Merged
bnoordhuis merged 2 commits intoquickjs-ng:masterfrom
bnoordhuis:array-fromasync-classic
Mar 17, 2025
Merged

Simplify Array.fromAsync lazy loading#982
bnoordhuis merged 2 commits intoquickjs-ng:masterfrom
bnoordhuis:array-fromasync-classic

Conversation

@bnoordhuis
Copy link
Copy Markdown
Contributor

Store it as classic JS instead of an ES module that we need to pull
apart first.

Added benefit is that it shrinks the serialized representation by 5%.


First commit is #978, necessary for the -C flag to qjsc.

Add -C as the complementary to the -m flag to qjsc that compiles
the input as an ES module.

Add -C as a shorthand alias for --script to qjs and harmonize the
qjs and qjsc help messages.

Capital C because -c is already taken.
Store it as classic JS instead of an ES module that we need to pull
apart first.

Added benefit is that it shrinks the serialized representation by 5%.
@saghul
Copy link
Copy Markdown
Contributor

saghul commented Mar 17, 2025

Unrelated: shall we move this one header file to the root, since it simplifies the "copy a bunch of c and h files" build method?

@bnoordhuis
Copy link
Copy Markdown
Contributor Author

Will the make codegen CI step still catch it when it's out of sync?

@bnoordhuis bnoordhuis merged commit 97e6ef9 into quickjs-ng:master Mar 17, 2025
128 checks passed
@bnoordhuis bnoordhuis deleted the array-fromasync-classic branch March 17, 2025 10:32
@bnoordhuis
Copy link
Copy Markdown
Contributor Author

Will the make codegen CI step still catch it when it's out of sync?

Replying to myself: yes, it will.

I don't strongly object but I like about the current setup that gen/ clearly indicates it's auto-generated.

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

Labels

None yet

2 participants