Repository navigation
perf(optimizer): hoist stable buffer property loops - #2066
Merged
Merged
Conversation
…d record addresses
…into perf/property-buffer-reuse
…f buffer properties
Contributor
[Medium impact] The reviewed changes appear safe to merge after the stated dependency, #2044, lands. SummaryThe latest changes fix the order of buffer optimizations.
The previous finding is addressed. No new actionable issues were found. Static checks only; builds and runtime tests were not run.
|
github-merge-queue
Bot
removed this pull request from the merge queue due to invalid changes in the merge commit
Oct 25, 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.
Loops over a stable buffer property on
$thiscurrently repeat the property read and handle resolution at every element access. Move a guaranteed property read into a preheader and reuse the existing descriptor hoist. Body-only reads get a scalar entry guard, preserving zero-trip uninitialized-property behavior and the first entered error.Calls, stores, frees, conditional reads, faulting prefixes and live-out header SSA values retain their existing form. Property instruction IDs and lexical metadata stay intact. Raw packed-record addresses are shared before descriptor conversion, preserving reuse of an address checked before the loop. Adds CFG and exception regressions, optimizer-on/off fixtures, five-target emission coverage, an example and updated compiler documentation. Tracks CJ task
ad0374ba.Depends on #2044. This branch starts at its exact head
d256479dfdb749b06b41774d437bfb3658583ca3; review this follow-up delta separately. Do not enqueue before #2044 has merged.Validation:
git diff --checkpasses. Local builds and tests were explicitly disabled by the user; CI supplies compilation/runtime coverage. Claude static review is clean on31e1fd557564b7c48f1ac74b8ae5c51bdea1d88a(delegationfc911e56-3316-4db4-9f48-e173b0a7c364).