Introduce oversized-array type to enforce max number of HasOffsetValueType accessory types#1666
Conversation
|
Hi, did you accidentally tried to implement the same thing as I already did here? :) e06f6f0 Or is this achieving a different optimization in a different place? Yours might be a bit more precise, because mine simply keeps the last 32 HasOffsetValueTypes, but yours simply attaches a new type. If you agree, feel free to revert my commit and keep only your logic in this PR. Also, I'd argue this actually doesn't solve phpstan/phpstan#7581 (which is the issue I'm trying to solve in phpstan/phpstan#7666 (but no one actually attempted it yet). phpstan/phpstan#7581 is about optimizing TypeCombinator::reduceArrays() so that it doesn't compare everything with everything, but does something smarter with the arrays, like putting them into smaller buckets before, or something like that. |
8b8b90c to
92feaf3
Compare
…Type accessory types
92feaf3 to
505f674
Compare
|
I don't really like the name, but I couldn't come up with something better. |
|
Thank you! |
This is a generalization of e06f6f0 that replaces "too many"
HasOffsetValueTypes with an "oversized array" type.