Closed hangshao0 closed 3 weeks ago
@theresa-m
Before closing this issue please re-enable ValueTypeSystemArraycopyTests, ValueTypeArrayTests and ValueTypeArrayTestsJIT in the functional/Valhalla test suite. They are disabled https://github.com/eclipse-openj9/openj9/pull/19646 due to reliance on these JNI functions.
Reopening since the fixing change was reverted https://github.com/eclipse-openj9/openj9/pull/20109
There are 3 new JNI functions added in Valhalla:
OpenJ9 needs to add implementation for them.
Support for
JVM_IsImplicitlyConstructibleClass()
We just need to check the ImplicitCreation attribute added in https://github.com/eclipse-openj9/openj9/issues/17234Support for
JVM_IsNullRestrictedArray()
andJVM_NewNullRestrictedArray()
Currently, eachJ9Class
has a pointer to its arrayClass andJ9arrayClass
has a pointer to leafComponentType. We need to create 2 array classes for null-restricted value type. One nullable array class and one null restricted array class. The exitingJ9Class->arrayClass
can be used as nullable arrayClass. We can create a new field inJ9Class
callednullrestrictedArrayClass
, and let it point to null restricted array class(which is created byJVM_NewNullRestrictedArray()
). We can use a bit inJ9ArrayClass->classFlags
to indicate if it is null restricted array (prohibiting storingnull
to its element). The implementation ofJVM_IsNullRestrictedArray()
can check this bit. The implementation ofJVM_NewNullRestrictedArray()
might follow the exampleJVM_NewArray()
.