-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check for boolean when running putfield/static bytecode #2057
Conversation
Are there any additional free bits we can use in the fieldRef to mark fields as booleans? A bit check would be significantly cheaper (touching memory already in the cache vs loading up the ROMClass) than digging the signature out of the romfield ref. |
c02f577
to
b5f54ab
Compare
eb014ef
to
880582a
Compare
@DanHeidinga the JIT changes are in, please review this PR |
The JVM spec states "If the value is of type int and the field descriptor type is boolean, then the int value is narrowed by taking the bitwise AND of value and 1, resulting in value'" This is the JIT part of the change. The VM part is eclipse-openj9#2057 issue: eclipse-openj9#2049 Signed-off-by: Yi Zhang <[email protected]>
runtime/oti/j9nonbuilder.h
Outdated
@@ -150,6 +150,7 @@ | |||
#define J9StaticFieldRefFlagBits 0x1F | |||
#define J9StaticFieldRefIsolated 0x8 | |||
#define J9StaticFieldRefPutResolved 0x10 | |||
#define J9StaticFieldRefBoolean 0x20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is outside of the range of J9StaticFieldRefFlagBits. Suggest re-using the isolated value as that is no longer used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flag value needs to be changed.
@tajila Are you going to be able to resolve the review comments in the next day or so? We're rapidly coming up on the 0.11.0 release |
The JVM spec states "If the value is of type int and the field descriptor type is boolean, then the int value is narrowed by taking the bitwise AND of value and 1, resulting in value'" Signed-off-by: tajila <[email protected]>
@gacholio I've made the flag change |
@tajila - I assume the boolean flag for instance fields was already being set? |
jenkins test sanity zlinux jdk11 |
JIT side is merged - #2285 This needs to be in 0.11.0 for consistency between interpreter and jit |
jenkins test sanity zlinux jdk11 |
jenkins test sanity zlinux jdk8 |
Jenkins copyright check |
Status is slow to come back to GH |
Jenkins line endings check |
jenkins test sanity zlinux jdk11 |
@gacholio yes, this is set in |
The JVM spec states "If the value is of type int and the field
descriptor type is boolean, then the int value is narrowed by taking the
bitwise AND of value and 1, resulting in value'"
issue: #2049
Signed-off-by: tajila [email protected]