Plan checked ASTs without wrapper conversion - #924
Merged
Conversation
Pass checked expression metadata directly into the interpreter planner during program creation. This avoids constructing a temporary CheckedExpr on the hot compile-to-program path while preserving the existing checked-expression API.
XN137
previously approved these changes
Jul 20, 2026
| Interpretable newInterpretable(CheckedExpr checked, InterpretableDecorator... decorators); | ||
|
|
||
| /** | ||
| * NewInterpretable creates an Interpretable from a checked expression and its metadata without |
Contributor
There was a problem hiding this comment.
nit: newInterpretable (but maybe javadocs shouldnt repeat the method name at all)
| return p.plan(checked.getExpr()); | ||
| } | ||
|
|
||
| /** NewIntepretable implements the Interpreter interface method. */ |
Contributor
There was a problem hiding this comment.
nit: typo Intepret and lowercase n
(looks like the Intepretable typo exists below as well)
| // When the AST has been checked it contains metadata that can be used to speed up program | ||
| // execution. | ||
| CheckedExpr checked = astToCheckedExpr(ast); | ||
| p.interpretable = p.interpreter.newInterpretable(checked, decs); |
Contributor
There was a problem hiding this comment.
is there still a valid use case for the old method? should we remove or deprecate it?
Member
Author
There was a problem hiding this comment.
The existing CheckedExpr overload appears useful, it has direct callers, and is the abstract compatibility point for external Interpreter implementations (if those exist 🤷). The new overload is deliberately a default method.
XN137
approved these changes
Jul 20, 2026
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.
Pass checked expression metadata directly into the interpreter planner during program creation.
This avoids constructing a temporary CheckedExpr on the hot compile-to-program path while preserving the existing checked-expression API.