Skip to content

Conversation

@wendigo
Copy link
Contributor

@wendigo wendigo commented Aug 25, 2025

According to the https://github.com/openjdk/jdk/blob/5cc86738411c36378b89d8f4932a54b3089cf22e/src/hotspot/share/ci/ciField.cpp#L216 record fields are treated as trusted final, which makes them eliglble for inlining/constant folding.

According to the https://github.com/openjdk/jdk/blob/5cc86738411c36378b89d8f4932a54b3089cf22e/src/hotspot/share/ci/ciField.cpp#L216
record fields are treated as trusted final, which makes them eliglble for inlining/constant folding.
@wendigo wendigo changed the title Make Slice a record Make Slice a record using StableValue Aug 25, 2025
@wendigo
Copy link
Contributor Author

wendigo commented Aug 25, 2025

This requires a preview API of Stable Values (https://openjdk.org/jeps/502)

@wendigo
Copy link
Contributor Author

wendigo commented Aug 25, 2025

cc @dain @martint

@wendigo wendigo changed the title Make Slice a record using StableValue Make Slice a record using StableValue (JDK25 preview) Aug 25, 2025
@dain
Copy link
Member

dain commented Jan 31, 2026

BTW, this looks great. We should do this when the API stablizes a bit more... 26 updated the api

@wendigo
Copy link
Contributor Author

wendigo commented Jan 31, 2026

@dain it won't stabilize before 28. 27 targets 3rd preview

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.

2 participants