Skip to content

Commit 3eae851

Browse files
committed
support for hashCode on inline types
1 parent ef71950 commit 3eae851

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/hotspot/share/jvmci/jvmciRuntime.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,18 @@ JRT_ENTRY(jboolean, JVMCIRuntime::substitutability_check(JavaThread* current, oo
427427
return result.get_jboolean();
428428
JRT_END
429429

430+
JRT_ENTRY(jint, JVMCIRuntime::value_object_hashCode(JavaThread* current, oopDesc* obj))
431+
JavaCallArguments args;
432+
args.push_oop(Handle(THREAD, obj));
433+
JavaValue result(T_INT);
434+
JavaCalls::call_static(&result,
435+
vmClasses::ValueObjectMethods_klass(),
436+
vmSymbols::valueObjectHashCode_name(),
437+
vmSymbols::object_int_signature(),
438+
&args, CHECK_0);
439+
return result.get_jint();
440+
JRT_END
441+
430442
// Object.notifyAll() fast path, caller does slow path
431443
JRT_LEAF(jboolean, JVMCIRuntime::object_notifyAll(JavaThread* current, oopDesc* obj))
432444
assert(current == JavaThread::current(), "pre-condition");

src/hotspot/share/jvmci/jvmciRuntime.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,13 +521,14 @@ class JVMCIRuntime: public CHeapObj<mtJVMCI> {
521521

522522
static void vm_message(jboolean vmError, jlong format, jlong v1, jlong v2, jlong v3);
523523
static jint identity_hash_code(JavaThread* current, oopDesc* obj);
524+
static jint value_object_hashCode(JavaThread* current, oopDesc* obj);
524525
static address exception_handler_for_pc(JavaThread* current);
525526
static void monitorenter(JavaThread* current, oopDesc* obj, BasicLock* lock);
526527
static void monitorexit (JavaThread* current, oopDesc* obj, BasicLock* lock);
527528
static jboolean object_notify(JavaThread* current, oopDesc* obj);
528529
static jboolean object_notifyAll(JavaThread* current, oopDesc* obj);
529530
static jboolean substitutability_check(JavaThread* current, oopDesc* left, oopDesc* right);
530-
531+
531532
static void vm_error(JavaThread* current, jlong where, jlong format, jlong value);
532533
static oopDesc* load_and_clear_exception(JavaThread* thread);
533534
static void log_printf(JavaThread* thread, const char* format, jlong v1, jlong v2, jlong v3);

src/hotspot/share/jvmci/vmStructs_jvmci.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@
878878
declare_function(JVMCIRuntime::monitorenter) \
879879
declare_function(JVMCIRuntime::monitorexit) \
880880
declare_function(JVMCIRuntime::substitutability_check) \
881+
declare_function(JVMCIRuntime::value_object_hashCode) \
881882
declare_function(JVMCIRuntime::object_notify) \
882883
declare_function(JVMCIRuntime::object_notifyAll) \
883884
declare_function(JVMCIRuntime::throw_and_post_jvmti_exception) \

0 commit comments

Comments
 (0)