Commit 1ecf6e0
Let the compositional-key shortcut clear virtual-node keys on the invalidated side
The invalidation pre-filters treated every '__phpstan' occurrence in the
INVALIDATED expression's key as non-compositional: invalidating a
virtual-keyed expression disabled the substring shortcut and swept the
scope's whole holder population through the per-holder containment work.
The holder side already consulted keyMayHideSubExpressions(); the
invalidated side now does too, and ForeachValueByRef,
IntertwinedVariableByReference and PropertyInitialization join
COMPOSITIONAL_VIRTUAL_KEY_PREFIXES - their printers emit every walked
sub-node (or the node walks none). The foreach and parameter
original-value markers stay out deliberately: they hide a synthesized
Variable child that containment-based invalidation must keep finding
when the variable is reassigned.
src/Analyser+src/Rules run: shouldInvalidateExpression() calls
759k -> 433k, containment scans 629k -> 297k. Mirrored in the native
twin.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DaBZjgksga4c5s6Q9FniY71 parent 4c8b9ac commit 1ecf6e0
2 files changed
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| |||
611 | 616 | | |
612 | 617 | | |
613 | 618 | | |
614 | | - | |
| 619 | + | |
615 | 620 | | |
616 | 621 | | |
617 | 622 | | |
| |||
735 | 740 | | |
736 | 741 | | |
737 | 742 | | |
738 | | - | |
| 743 | + | |
739 | 744 | | |
740 | 745 | | |
741 | 746 | | |
| |||
844 | 849 | | |
845 | 850 | | |
846 | 851 | | |
847 | | - | |
| 852 | + | |
848 | 853 | | |
849 | 854 | | |
850 | 855 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
795 | 795 | | |
796 | 796 | | |
797 | 797 | | |
798 | | - | |
| 798 | + | |
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
| |||
1006 | 1006 | | |
1007 | 1007 | | |
1008 | 1008 | | |
1009 | | - | |
| 1009 | + | |
1010 | 1010 | | |
1011 | 1011 | | |
1012 | 1012 | | |
| |||
1657 | 1657 | | |
1658 | 1658 | | |
1659 | 1659 | | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
1660 | 1664 | | |
| 1665 | + | |
| 1666 | + | |
1661 | 1667 | | |
| 1668 | + | |
1662 | 1669 | | |
1663 | 1670 | | |
1664 | 1671 | | |
| |||
1901 | 1908 | | |
1902 | 1909 | | |
1903 | 1910 | | |
1904 | | - | |
| 1911 | + | |
1905 | 1912 | | |
1906 | 1913 | | |
1907 | 1914 | | |
| |||
0 commit comments