feat(engine): introduce 'arena lifetime plumbing and eager AST compilation#4930
Open
akash-R-A-J wants to merge 10 commits intoboa-dev:mainfrom
Open
feat(engine): introduce 'arena lifetime plumbing and eager AST compilation#4930akash-R-A-J wants to merge 10 commits intoboa-dev:mainfrom
akash-R-A-J wants to merge 10 commits intoboa-dev:mainfrom
Conversation
Test262 conformance changes
Tested main commit: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4930 +/- ##
===========================================
+ Coverage 47.24% 57.60% +10.36%
===========================================
Files 476 556 +80
Lines 46892 61074 +14182
===========================================
+ Hits 22154 35184 +13030
- Misses 24738 25890 +1152 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Hey @jedel1043, could you review this PR when you get a chance? Happy to address any questions or requested changes. Here are the benchmark results: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This Pull Request fixes/closes #4929 .
It introduces
'arenalifetime plumbing across the AST, parser, and engine and adjusts the compilation architecture to ensure arena-bound AST lifetimes do not escape into runtime structures.It changes the following:
Eager Compilation Architecture: Refactored the engine to compile AST nodes to bytecode immediately after parsing. This allows the AST (and its
'arenalifetime) to be dropped before execution begins.Lifetime Isolation: Prevents the
'arenalifetime from leaking into long-lived runtime structures such asScriptandModule, keeping them compatible with Boa's GC-managed runtime.AST Architecture: Introduced the
'arenalifetime parameter to core AST nodes and structures inboa_ast.Parser Integration: Propagated the
'arenalifetime throughboa_parser, allowing the parser to return arena-bound AST structures that are immediately consumed by the compiler.Engine Support: Updated
ByteCompiler, optimizer infrastructure, and module compilation paths to propagate the'arenalifetime through the compilation pipeline.Verification:
cargo check --workspacepassescargo test --workspacepassescargo clippy --workspace --all-targets --all-features -- -D warningscleanThis PR establishes the foundation for arena-allocated AST nodes by ensuring
'arenareferences remain confined to the parsing and compilation stages and do not escape into runtime state.