Skip to content

Unbreak CachingCallSite.isBuiltin#6629

Merged
enebo merged 1 commit intojruby:jruby-9.2from
headius:unbreak_isbuiltin
Mar 26, 2021
Merged

Unbreak CachingCallSite.isBuiltin#6629
enebo merged 1 commit intojruby:jruby-9.2from
headius:unbreak_isbuiltin

Conversation

@headius
Copy link
Member

@headius headius commented Mar 24, 2021

During the various deprecations and undeprecations of this method,
it was inadvertently broken due to switching to a cacheAndGet path
that does not set the builtinCache field. Since call sites used
for isBuiltin are usually only used for isBuiltin, I modified
this to just use the standard cache field.

Relates to #6628

During the various deprecations and undeprecations of this method,
it was inadvertently broken due to switching to a cacheAndGet path
that does not set the builtinCache field. Since call sites used
for isBuiltin are usually *only* used for isBuiltin, I modified
this to just use the standard cache field.

Relates to jruby#6628
@headius
Copy link
Member Author

headius commented Mar 24, 2021

@kares Need your input here... you deprecated these some time ago, I believe when you were improving how we check isBuiltin for Fixnum and Float. Be my second pair of eyes and help me confirm this fix is ok and appropriate?

@headius headius added this to the JRuby 9.2.17.0 milestone Mar 24, 2021
@headius
Copy link
Member Author

headius commented Mar 24, 2021

Note that dig does not use this version of isBuiltin, so I am not sure it is the cause of the caching issues seen in #6628.

@headius
Copy link
Member Author

headius commented Mar 26, 2021

This change likely has little to no effect on #6628 but is still valid. We need to clean up all these paths and either delete them or make them solid.

@enebo enebo merged commit 197af21 into jruby:jruby-9.2 Mar 26, 2021
@kares
Copy link
Member

kares commented Mar 29, 2021

believe the deprecation was to prefer the public methods without the additional String methodName argument,
e.g. retrieveCache(RubyClass selfType) instead of retrieveCache(RubyClass selfType, String methodName)

a bit confused why 2 caches would be needed here, the 'new' builtinCache seems to be coming from
660b6d8#diff-00eb72e55361b6fc7fdd5f21e190c18f9c43a66620abf58a1629ef219d78b7be
... would rather drop it's usage completely (on master) since with this change it's no longer read

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.

3 participants