--- old/src/hotspot/share/runtime/javaCalls.cpp 2019-03-11 14:27:15.846354192 +0100 +++ new/src/hotspot/share/runtime/javaCalls.cpp 2019-03-11 14:27:15.610354195 +0100 @@ -32,6 +32,7 @@ #include "memory/universe.hpp" #include "oops/method.inline.hpp" #include "oops/oop.inline.hpp" +#include "oops/valueKlass.hpp" #include "prims/jniCheck.hpp" #include "runtime/compilationPolicy.hpp" #include "runtime/handles.inline.hpp" @@ -158,22 +159,24 @@ // Helper methods static BasicType runtime_type_from(JavaValue* result) { switch (result->get_type()) { - case T_BOOLEAN: // fall through - case T_CHAR : // fall through - case T_SHORT : // fall through - case T_INT : // fall through + case T_BOOLEAN : // fall through + case T_CHAR : // fall through + case T_SHORT : // fall through + case T_INT : // fall through #ifndef _LP64 - case T_OBJECT : // fall through - case T_ARRAY : // fall through + case T_OBJECT : // fall through + case T_ARRAY : // fall through + case T_VALUETYPE: // fall through #endif - case T_BYTE : // fall through - case T_VOID : return T_INT; - case T_LONG : return T_LONG; - case T_FLOAT : return T_FLOAT; - case T_DOUBLE : return T_DOUBLE; + case T_BYTE : // fall through + case T_VOID : return T_INT; + case T_LONG : return T_LONG; + case T_FLOAT : return T_FLOAT; + case T_DOUBLE : return T_DOUBLE; #ifdef _LP64 - case T_ARRAY : // fall through - case T_OBJECT: return T_OBJECT; + case T_ARRAY : // fall through + case T_OBJECT : return T_OBJECT; + case T_VALUETYPE: return T_VALUETYPE; #endif default: ShouldNotReachHere(); @@ -397,7 +400,8 @@ // Figure out if the result value is an oop or not (Note: This is a different value // than result_type. result_type will be T_INT of oops. (it is about size) BasicType result_type = runtime_type_from(result); - bool oop_result_flag = (result->get_type() == T_OBJECT || result->get_type() == T_ARRAY); + bool oop_result_flag = (result->get_type() == T_OBJECT || result->get_type() == T_ARRAY + || result->get_type() == T_VALUETYPE); // NOTE: if we move the computation of the result_val_address inside // the call to call_stub, the optimizer produces wrong code. @@ -617,6 +621,7 @@ void do_long() { check_long(T_LONG); } void do_void() { check_return_type(T_VOID); } void do_object(int begin, int end) { check_obj(T_OBJECT); } + void do_valuetype(int begin, int end){ check_obj(T_VALUETYPE); } void do_array(int begin, int end) { check_obj(T_OBJECT); } };