[lworld] RFR: object methods in VM for lworld value type
David Simms
david.simms at oracle.com
Thu Apr 26 15:20:46 UTC 2018
Greetings,
Here is a patch that for the most part ensures Object methods
implemented by the JVM do not crash (as some do today):
http://cr.openjdk.java.net/~dsimms/valhalla/object_methods/webrev0/
Summary of changes, interpreter only (-Xint):
* "Object.getClass()": sanity test
* "Object.hashCode()" / "System.identityHashCode()": simply return 0
o should be revisited for "System.identityHashCode()", once we
have BSM hashCode generation in place
* "Object.clone()": disallow "Cloneable" value types, throws
ClassFormatError
o implicit cloning via "pass by value" does not allow user code
(as clone does), so no clone
* "Object.wait()", "notify()" and monitorenter byte-code: throw
IllegalMonitorStateException
o missing test for monitorexit (whoops)
This change is primarily to enable further prototyping with -Xint,
giving JIT implementation further time to adjust to lworld, and ignoring
JDK methods whom may or may not provide alternative implementations for
lworld "objectification" of value types.
Cheers
/David Simms
More information about the valhalla-dev
mailing list