Skip to content

Make compiling regular expressions zero copy - #1342

Merged
bnoordhuis merged 3 commits into
quickjs-ng:masterfrom
bnoordhuis:zero-copy-re-compile
Feb 11, 2026
Merged

bnoordhuis merged 3 commits into
quickjs-ng:masterfrom
bnoordhuis:zero-copy-re-compile

Conversation

@bnoordhuis

Copy link
Copy Markdown
Contributor

This is noticeable when compiling large regular expressions when there is a memory limit in effect: lre_compile succeeds but subsequently trying to copy its output to a new string fails.

The new indirect string kind will likely be useful in more places.

This is noticeable when compiling large regular expressions when there
is a memory limit in effect: lre_compile succeeds but subsequently
trying to copy its output to a new string fails.

The new indirect string kind will likely be useful in more places.
@bnoordhuis

Copy link
Copy Markdown
Contributor Author
/home/runner/work/quickjs/quickjs/quickjs.c:2222:13: error: label followed by a declaration is a C23 extension [-Werror,-Wc23-extensions]

🙄

Comment thread quickjs.c Resolved
@bnoordhuis
bnoordhuis merged commit 5beca15 into quickjs-ng:master Feb 11, 2026
122 checks passed
@bnoordhuis
bnoordhuis deleted the zero-copy-re-compile branch February 11, 2026 20:36
mochaaP pushed a commit to mcha-forks/quickjs that referenced this pull request May 20, 2026
This is noticeable when compiling large regular expressions when there
is a memory limit in effect: lre_compile succeeds but subsequently
trying to copy its output to a new string fails.

The new indirect string kind will likely be useful in more places.

(cherry picked from commit 5beca15)
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