Skip to content
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

Merged
merged 1 commit into from
Oct 10, 2018

Conversation

tajila
Copy link
Contributor

@tajila tajila commented Jun 1, 2018

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]

@DanHeidinga
Copy link
Member

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.

@tajila
Copy link
Contributor Author

tajila commented Sep 13, 2018

@DanHeidinga the JIT changes are in, please review this PR

cathyzhyi pushed a commit to cathyzhyi/openj9 that referenced this pull request Sep 19, 2018
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]>
@DanHeidinga DanHeidinga requested a review from gacholio October 4, 2018 17:26
@@ -150,6 +150,7 @@
#define J9StaticFieldRefFlagBits 0x1F
#define J9StaticFieldRefIsolated 0x8
#define J9StaticFieldRefPutResolved 0x10
#define J9StaticFieldRefBoolean 0x20
Copy link
Contributor

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.

Copy link
Contributor

@gacholio gacholio left a 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.

@gacholio gacholio self-assigned this Oct 4, 2018
@DanHeidinga
Copy link
Member

@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]>
@tajila
Copy link
Contributor Author

tajila commented Oct 10, 2018

@gacholio I've made the flag change

@gacholio
Copy link
Contributor

@tajila - I assume the boolean flag for instance fields was already being set?

@gacholio
Copy link
Contributor

jenkins test sanity zlinux jdk11

@DanHeidinga
Copy link
Member

JIT side is merged - #2285

This needs to be in 0.11.0 for consistency between interpreter and jit

@DanHeidinga DanHeidinga added this to the Release 0.11.0 milestone Oct 10, 2018
@gacholio
Copy link
Contributor

jenkins test sanity zlinux jdk11

@AdamBrousseau
Copy link
Contributor

jenkins test sanity zlinux jdk8

@AdamBrousseau
Copy link
Contributor

Jenkins copyright check

@AdamBrousseau
Copy link
Contributor

Status is slow to come back to GH
Copyright passed
https://ci.eclipse.org/openj9/job/PullRequest-CopyrightCheck-OpenJ9/8768/

@AdamBrousseau
Copy link
Contributor

Jenkins line endings check

@gacholio
Copy link
Contributor

jenkins test sanity zlinux jdk11

@tajila
Copy link
Contributor Author

tajila commented Oct 10, 2018

@gacholio yes, this is set in ROMClassWriter::writeFields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants