Repository navigation
Protos eliminates redundant Closure roots and recursive bytecode expansion #1303
guillermomolina
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Repeated references to a Closure definition should not cause the compiler to emit its bytecode again and again.
PERF061 extends the existing per-parse reuse mechanism so that each Closure definition emits its physical root once within a Bytecode group. Later references reuse the same execution plan cell, while fresh Closure instances keep their own lexical environments. This prevents redundant root emission from recursively expanding nested code.
Structural validation
The Standard Library Scanner now produces the following structure in the validated candidate:
Generated serializer traversal completes successfully for the principal group and all four independent selected-callback groups. The earlier bootstrap investigation exposed an overflow in the serializer's local identifier encoding; integrating and validating the fix on that bootstrap branch remains separate work.
Correctness and integration
Deterministic root identity during reparsing, lexical captures, mutable slots, default arguments, non-local returns, suspension, and specialized execution paths are preserved. Regression tests cover repeated references, nested control flow, distinct Closure definitions and serializer replay.
Local validation reported 782 focused tests with no failures or errors and one skip, followed by a successful final check-all. All 20 jobs of the exhaustive pull-request CI passed, including Native Image validation, before integration into main.
These are structural measurements, not a runtime speed benchmark. Serializer traversal uses placeholder constant data and does not establish a complete artifact roundtrip. The change is available in the development branch, not announced as a new binary release.
All reactions