fix(engine): materialize heavyweight globals lazily#790
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Benchmark Results430 benchmarks Interpreted: 🟢 32 improved · 🔴 29 regressed · 369 unchanged · avg +1.2% arraybuffer.js — Interp: 14 unch. · avg -0.1% · Bytecode: 🟢 3, 11 unch. · avg +5.8%
arrays.js — Interp: 🔴 2, 17 unch. · avg -0.9% · Bytecode: 🟢 10, 9 unch. · avg +10.3%
async-await.js — Interp: 6 unch. · avg +0.4% · Bytecode: 🟢 1, 5 unch. · avg +10.7%
async-generators.js — Interp: 2 unch. · avg +1.8% · Bytecode: 2 unch. · avg +9.2%
atomics.js — Interp: 🔴 1, 5 unch. · avg -1.9% · Bytecode: 🟢 3, 3 unch. · avg +10.8%
base64.js — Interp: 🔴 1, 9 unch. · avg -2.8% · Bytecode: 🟢 8, 2 unch. · avg +9.5%
classes.js — Interp: 🟢 1, 🔴 1, 29 unch. · avg +0.2% · Bytecode: 🟢 11, 20 unch. · avg +4.7%
closures.js — Interp: 🟢 1, 10 unch. · avg +2.5% · Bytecode: 🟢 6, 5 unch. · avg +11.1%
collections.js — Interp: 🟢 1, 11 unch. · avg -0.9% · Bytecode: 🟢 5, 7 unch. · avg +10.6%
csv.js — Interp: 🔴 2, 11 unch. · avg +1.2% · Bytecode: 🟢 8, 5 unch. · avg +7.5%
destructuring.js — Interp: 🟢 3, 🔴 3, 16 unch. · avg -1.3% · Bytecode: 🟢 10, 12 unch. · avg +9.7%
fibonacci.js — Interp: 🟢 1, 🔴 1, 6 unch. · avg -0.4% · Bytecode: 🟢 3, 5 unch. · avg +13.8%
float16array.js — Interp: 🟢 2, 🔴 2, 28 unch. · avg +1.0% · Bytecode: 🟢 17, 15 unch. · avg +9.9%
for-of.js — Interp: 🟢 1, 🔴 1, 5 unch. · avg -0.5% · Bytecode: 🟢 6, 1 unch. · avg +13.3%
generators.js — Interp: 🟢 1, 🔴 1, 2 unch. · avg +3.8% · Bytecode: 🟢 2, 2 unch. · avg +9.3%
intl.js — Interp: 🟢 1, 5 unch. · avg -0.3% · Bytecode: 🟢 5, 1 unch. · avg +13.6%
iterators.js — Interp: 🟢 8, 34 unch. · avg +4.7% · Bytecode: 🟢 20, 22 unch. · avg +6.9%
json.js — Interp: 🔴 2, 18 unch. · avg -1.7% · Bytecode: 🟢 12, 8 unch. · avg +9.3%
jsx.jsx — Interp: 21 unch. · avg -1.1% · Bytecode: 🟢 6, 15 unch. · avg +5.9%
modules.js — Interp: 9 unch. · avg +1.3% · Bytecode: 9 unch. · avg +3.3%
numbers.js — Interp: 11 unch. · avg +1.9% · Bytecode: 🟢 5, 6 unch. · avg +10.7%
objects.js — Interp: 🔴 2, 5 unch. · avg -1.5% · Bytecode: 🟢 1, 6 unch. · avg +1.1%
promises.js — Interp: 12 unch. · avg -0.6% · Bytecode: 🟢 1, 11 unch. · avg +4.7%
property-access.js — Interp: 5 unch. · avg +2.0% · Bytecode: 🟢 3, 2 unch. · avg +15.4%
regexp.js — Interp: 🟢 1, 10 unch. · avg -1.9% · Bytecode: 🟢 2, 9 unch. · avg +8.6%
strings.js — Interp: 🔴 1, 18 unch. · avg +1.3% · Bytecode: 🟢 10, 9 unch. · avg +10.6%
temporal.js — Interp: 6 unch. · avg +0.7% · Bytecode: 🟢 3, 3 unch. · avg +12.1%
tsv.js — Interp: 9 unch. · avg -2.1% · Bytecode: 🟢 3, 6 unch. · avg +6.3%
typed-arrays.js — Interp: 🟢 9, 13 unch. · avg +17.3% · Bytecode: 🟢 10, 🔴 6, 6 unch. · avg -1.8%
uint8array-encoding.js — Interp: 🟢 2, 🔴 1, 15 unch. · avg +8.6% · Bytecode: 🟢 5, 🔴 1, 12 unch. · avg +5.9%
weak-collections.js — Interp: 🔴 8, 7 unch. · avg -10.3% · Bytecode: 🟢 12, 3 unch. · avg +28.6%
Deterministic profile diffDeterministic profile diff: no significant changes. Measured on ubuntu-latest x64. Benchmark ranges compare cached main-branch min/max ops/sec with the PR run; overlapping ranges are treated as unchanged noise. Percentage deltas are secondary context. |
Suite TimingTest Runner (interpreted: 10,804 passed; bytecode: 10,804 passed)
MemoryGC rows aggregate the main thread plus all worker thread-local GCs. Test runner worker shutdown frees thread-local heaps in bulk; that shutdown reclamation is not counted as GC collections or collected objects.
Benchmarks (interpreted: 430; bytecode: 430)
MemoryGC rows aggregate the main thread plus all worker thread-local GCs. Benchmark runner performs explicit between-file collections, so collection and collected-object counts can be much higher than the test runner.
Measured on ubuntu-latest x64. |
test262 Conformance
Areas closest to 100%
Per-test deltas (+36 / -4)Newly failing (4):
Newly passing (36):
Steady-state failures are non-blocking; regressions vs the cached main baseline (lower total pass count, or any PASS → non-PASS transition) fail the conformance gate. Measured on ubuntu-latest x64, bytecode mode. Areas grouped by the first two test262 path components; minimum 25 attempted tests, areas already at 100% excluded. Δ vs main compares against the most recent cached |
Summary
Closes #788
Testing
Verification run:
./build.pas --clean testrunner./build/GocciaTestRunner tests/built-ins/global-properties/lazy-builtins.js./build/GocciaTestRunner tests/built-ins/global-properties/lazy-builtins.js --mode=bytecode./build/GocciaTestRunner tests/built-ins/global-properties/global-this.js tests/built-ins/Number/prototype/toLocaleString.js tests/language/declarations/let/global-shadow-configurable-builtin.js tests/language/var/shadow-builtin-globals.js./build/GocciaTestRunner tests/built-ins/global-properties/global-this.js tests/built-ins/Number/prototype/toLocaleString.js tests/language/declarations/let/global-shadow-configurable-builtin.js tests/language/var/shadow-builtin-globals.js --mode=bytecode./build/GocciaTestRunner tests./build/GocciaTestRunner tests --mode=bytecode./format.pas --check./build.pas benchmarkrunner./build/GocciaBenchmarkRunner benchmarks/temporal.js benchmarks/intl.js benchmarks/atomics.js --no-progress --format compact-json --output=/tmp/goccia-788-bench-interpreted.json./build/GocciaBenchmarkRunner benchmarks/temporal.js benchmarks/intl.js benchmarks/atomics.js --mode=bytecode --no-progress --format compact-json --output=/tmp/goccia-788-bench-bytecode.json./build.pas testrunner./build/GocciaTestRunner tests/built-ins/global-properties/lazy-builtins.js./build/GocciaTestRunner tests/built-ins/global-properties/lazy-builtins.js --mode=bytecodeNote: i386-win32 peak memory was not directly measured in this macOS worker, but the 32-bit large-address-aware flag was removed and the first-party interpreted/bytecode suites passed without conformance regressions.