Warn when creating a new ivar table on JavaProxy wrapper#8613
Merged
headius merged 4 commits intojruby:masterfrom Feb 6, 2025
Merged
Warn when creating a new ivar table on JavaProxy wrapper#8613headius merged 4 commits intojruby:masterfrom
headius merged 4 commits intojruby:masterfrom
Conversation
Member
Author
|
Do not merge until tests have been added. |
The logic here was identical between NonVolatile and Stamped accessors except for the full fence. Since these two are never used at the same time, passing a fence flag in will constant fold away and not impact behavior or performance.
The implementations of VariableAccessor bypass RubyBasicObject's getVariable and setVariable, missing the warning check for non- persistent Java objects. This duplicates that check along all VariableAccessor paths to ensure we properly warn for ivars on a non-persistent wrapper. Fixes jruby#8611
1d1fa3d to
f58c347
Compare
Member
Author
|
Specs added for ivar warning and singleton warning. I did not test the different modes because we're likely to remove all but one soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This warning was lost when we optimized variable updates to skip RubyBasicObject's
setVariableas reported in #8611. The changes here restore the warning:Note that field-based variable access does not have this same proxy check because JavaProxy will never use field-based variables.