parallelize script loads

This commit is contained in:
Brian Beck 2025-12-02 22:06:20 -08:00
parent 9d3554de02
commit 2f23934de0
17 changed files with 561 additions and 68 deletions

View file

@ -6,8 +6,9 @@
// Collect exec() script paths during parsing (deduplicated)
const execScriptPathsSet = new Set();
let hasDynamicExec = false;
// These are reset in the per-parse initializer below
let execScriptPathsSet;
let hasDynamicExec;
function buildBinaryExpression(head, tail) {
return tail.reduce((left, [op, right]) => ({
@ -6407,6 +6408,10 @@ function peg$parse(input, options) {
return s0;
}
execScriptPathsSet = new Set();
hasDynamicExec = false;
peg$result = peg$startRuleFunction();
const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length);