Repository navigation
Commit a88f398
Key types by their value where describe() was standing in for it
Two hot paths built a description only to use it as a key.
RecursionGuard::run() keys every operation it guards with
describe(VerbosityLevel::value()), and that level resolves the class name
through the ReflectionProvider - two round-trips per guarded call, for a
string that never changes. ObjectType now remembers it.
UnionType::getFiniteTypes() uniqued its members by description. They are
finite types, so FiniteTypeSet keys them by the value they stand for, which
is what the uniquing wants; floats have no such key, equals() not agreeing
with value identity for them, and keep describing themselves.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LDqrN1pcN3qWc7xzKfkJaF1 parent b234a39 commit a88f398
2 files changed
Lines changed: 23 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
127 | 135 | | |
128 | 136 | | |
129 | 137 | | |
| |||
742 | 750 | | |
743 | 751 | | |
744 | 752 | | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
745 | 757 | | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
746 | 762 | | |
747 | 763 | | |
748 | | - | |
| 764 | + | |
749 | 765 | | |
750 | 766 | | |
751 | | - | |
| 767 | + | |
752 | 768 | | |
753 | 769 | | |
754 | 770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1662 | 1662 | | |
1663 | 1663 | | |
1664 | 1664 | | |
1665 | | - | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
1666 | 1670 | | |
1667 | 1671 | | |
1668 | 1672 | | |
| |||
0 commit comments