You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because these do not redefine Integer#==, etc, we should avoid invalidating in that case.
Since we have the fine-grained method invalidation, the idea is to replace ModuleFields#inlinedBuiltinsAssumptions by the assumptions in MethodEntry, as those are not invalidated on prepend but only if the method is overridden/removed/undefined.
Specifically, we would still have ModuleFields#inlinedBuiltinsAssumptions but it would point to the initial Assumption in MethodEntry for the corresponding method, and there would be no need invalidate them explicitly as that's already done for MethodEntry.
The text was updated successfully, but these errors were encountered:
eregon
changed the title
Prepending a module to Integer disbales many Inlined*Node
Prepending a module to Integer disables many Inlined*Node
Apr 22, 2024
And for instance ActiveSupport does this:
https://github.com/rails/rails/blob/d462fb54b459e222efc2e2480397af44a9c55361/activesupport/lib/active_support/core_ext/numeric/conversions.rb#L143
https://github.com/rails/rails/blob/d462fb54b459e222efc2e2480397af44a9c55361/activesupport/lib/active_support/core_ext/object/json.rb#L48-L50
(there is a question if that should be
include
instead ofprepend
in Rails, but we should try to handle prepend nicely anyway)Because these do not redefine
Integer#==
, etc, we should avoid invalidating in that case.Since we have the fine-grained method invalidation, the idea is to replace
ModuleFields#inlinedBuiltinsAssumptions
by the assumptions inMethodEntry
, as those are not invalidated onprepend
but only if the method is overridden/removed/undefined.Specifically, we would still have
ModuleFields#inlinedBuiltinsAssumptions
but it would point to the initial Assumption in MethodEntry for the corresponding method, and there would be no need invalidate them explicitly as that's already done for MethodEntry.An easy way to repro this is:
There should be no
'inlined ...'
assumptions invalidated, onlyProfiled Argument/Return Type
, i.e. same output as without theprepend
.Found together with @nirvdrum.
The text was updated successfully, but these errors were encountered: