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

Prepare for value objects to be created with new bytecode #18790

Closed

Conversation

hzongaro
Copy link
Member

This change sets up changes to the JIT compiler that will be needed to permit value objects to be created with the new bytecode. Previously they could only be created with the aconst_init and withfield bytecode instructions. The new bytecode will be translated to the TR::New opcode in IL, but existing optimizations that create value type instances will continue to use the TR::newvalue opcode, so optimizations need to be prepared for both possibilities for now.

A new J9::ObjectModel::areValueTypeInstancesCreatedWithBCNew method is used to enable creation of value type instances with the new bytecode.

This change will require a co-ordinated merge with OMR pull request eclipse-omr/omr#7239

This change sets up changes to the JIT compiler that will be needed to
permit value objects to be created with the new bytecode.  Previously
they could only be created with the aconst_init and withfield bytecode
instructions.  The new bytecode will be translated to the TR::New opcode
in IL, but existing optimizations that create value type instances will
continue to use the TR::newvalue opcode, so optimizations need to be
prepared for both possibilities for now.

A new J9::ObjectModel::areValueTypeInstancesCreatedWithBCNew method is
used to enable creation of value type instances with the new bytecode.
@hzongaro hzongaro added comp:jit depends:omr Pull request is dependent on a corresponding change in OMR project:valhalla Used to track Project Valhalla related work labels Jan 22, 2024
@hzongaro
Copy link
Member Author

I will leave this pull request in draft state for now, as it depends upon JVM changes that are part of pull request #18558.

Further, the implementation of J9::ObjectModel::areValueTypeInstancesCreatedWithBCNew currently returns false unconditionally. It will need to be updated to return true once the new bytecode is used to create value type instances.

@hzongaro
Copy link
Member Author

@a7ehuo - FYI

@hzongaro
Copy link
Member Author

hzongaro commented Jul 5, 2024

Superseded by pull request #19812

@hzongaro hzongaro closed this Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jit depends:omr Pull request is dependent on a corresponding change in OMR project:valhalla Used to track Project Valhalla related work
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant