Skip to content

Reference the original chain in ExistingArrayDimFetch, delete DeepNodeCloner - #6151

Merged
ondrejmirtes merged 1 commit into
2.2.xfrom
eadf-originals
Jul 30, 2026
Merged

Reference the original chain in ExistingArrayDimFetch, delete DeepNodeCloner#6151
ondrejmirtes merged 1 commit into
2.2.xfrom
eadf-originals

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

Extracted from the resolve-type-rewrite-2 branch: the unset() handling deep-cloned the already-processed offset chain plus ran a NodeTraverser visitor over the clone just to wrap its levels in ExistingArrayDimFetch nodes. The wrappers now reference the original sub-expressions - the unset statement's own walk already processed them, and the assign target preparation prices the chain through the scope without walking it (scope-keyed memoization), so sharing the nodes is safe. DeepNodeCloner had no other consumer and is deleted along with its five construction sites.

Full test suite, make phpstan and make cs green; zero analysis-output churn.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DaBZjgksga4c5s6Q9FniY7

…eCloner

The unset() handling deep-cloned the already-processed offset chain and
ran a NodeTraverser over the clone to wrap its levels in
ExistingArrayDimFetch nodes. The wrappers now reference the original
sub-expressions directly - the unset statement's own walk already
processed them, and the assign target preparation prices the chain
through the scope without walking it, so nothing re-processes the shared
nodes. DeepNodeCloner had no other consumer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DaBZjgksga4c5s6Q9FniY7
@ondrejmirtes
ondrejmirtes merged commit 4c8b9ac into 2.2.x Jul 30, 2026
413 of 415 checks passed
@ondrejmirtes
ondrejmirtes deleted the eadf-originals branch July 30, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant