Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions src/hotspot/share/opto/library_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ bool LibraryCallKit::try_to_inline(int predicate) {
case vmIntrinsics::_scopedValueCache: return inline_native_scopedValueCache();
case vmIntrinsics::_setScopedValueCache: return inline_native_setScopedValueCache();

case vmIntrinsics::_Continuation_pin: return inline_native_Continuation_pin();
case vmIntrinsics::_Continuation_unpin: return inline_native_Continuation_unpin();
case vmIntrinsics::_Continuation_pin: return inline_native_Continuation_pinning(false);
case vmIntrinsics::_Continuation_unpin: return inline_native_Continuation_pinning(true);

#if INCLUDE_JVMTI
case vmIntrinsics::_notifyJvmtiVThreadStart: return inline_native_notify_jvmti_funcs(CAST_FROM_FN_PTR(address, OptoRuntime::notify_jvmti_vthread_start()),
Expand Down Expand Up @@ -3721,7 +3721,7 @@ bool LibraryCallKit::inline_native_setScopedValueCache() {
//------------------------inline_native_Continuation_pin and unpin-----------

// Shared implementation routine for both pin and unpin.
bool LibraryCallKit::inline_native_Continuation_pinning_shared_impl(bool unpin) {
bool LibraryCallKit::inline_native_Continuation_pinning(bool unpin) {
enum { _true_path = 1, _false_path = 2, PATH_LIMIT };

// Save input memory.
Expand Down Expand Up @@ -3777,14 +3777,13 @@ bool LibraryCallKit::inline_native_Continuation_pinning_shared_impl(bool unpin)
// True branch, pin count over/underflow.
Node* pin_count_over_underflow = _gvn.transform(new IfTrueNode(iff_pin_count_over_underflow));
{
// Deoptimize and reexecute in the interpreter to throw IllegalStateException for pin count over/underflow.
// Trap (but not deoptimize (Action_none)) and continue in the interpreter
// which will throw IllegalStateException for pin count over/underflow.
PreserveJVMState pjvms(this);
PreserveReexecuteState preexecs(this);
jvms()->set_should_reexecute(true);
set_control(pin_count_over_underflow);
set_all_memory(input_memory_state);
uncommon_trap_exact(Deoptimization::Reason_intrinsic,
Deoptimization::Action_reinterpret);
Deoptimization::Action_none);
assert(stopped(), "invariant");
}

Expand All @@ -3806,14 +3805,6 @@ bool LibraryCallKit::inline_native_Continuation_pinning_shared_impl(bool unpin)
return true;
}

bool LibraryCallKit::inline_native_Continuation_pin() {
return inline_native_Continuation_pinning_shared_impl(false);
}

bool LibraryCallKit::inline_native_Continuation_unpin() {
return inline_native_Continuation_pinning_shared_impl(true);
}

//---------------------------load_mirror_from_klass----------------------------
// Given a klass oop, load its java mirror (a java.lang.Class oop).
Node* LibraryCallKit::load_mirror_from_klass(Node* klass) {
Expand Down
5 changes: 1 addition & 4 deletions src/hotspot/share/opto/library_call.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,7 @@ class LibraryCallKit : public GraphKit {
const Type* scopedValueCache_type();
Node* scopedValueCache_helper();
bool inline_native_setScopedValueCache();

bool inline_native_Continuation_pinning_shared_impl(bool unpin);
bool inline_native_Continuation_pin();
bool inline_native_Continuation_unpin();
bool inline_native_Continuation_pinning(bool unpin);

bool inline_native_time_funcs(address method, const char* funcName);
#if INCLUDE_JVMTI
Expand Down