[codegen] annotate member-access expressions with class/interface types#662
Merged
[codegen] annotate member-access expressions with class/interface types#662
Conversation
Contributor
Benchmark Results (Linux x86-64)
CLI Tool Benchmarks
|
This was referenced Apr 22, 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.
Before
The typeOf cache held only primitive literals and variable-read results (from #660/#661). Member-access expressions like `obj.field` fell through to live-resolution at every codegen site.
After
`member_access` expressions whose resolved type is a concrete class or interface are now annotated. Codegen sites reading `typeOf(obj.field)` get the cached answer.
Description
Step 2 of #658 gate-loosening plan.
Same source-kind filter as step 1 (`class` | `interface`). Unfiltered annotation (including primitives/arrays/Map/Set) segfaulted Stage 1 self-hosting; filtering to the shapes whose LLVM representation is fully determined by the base name sidesteps the symbol-table disagreement.
Verification
Refs #658.