# HG changeset patch # User stuefe # Date 1500979376 -7200 # Node ID 87a56e5244d77d8f0e6f037c18ad41c57d921b54 # Parent 0a22e4ef496e290dc1f4d87b87763c551f72cf23 8185263: Fix zero build after 8169881, 8175318, 8178350 Reviewed-by: diff --git a/src/cpu/zero/vm/methodHandles_zero.cpp b/src/cpu/zero/vm/methodHandles_zero.cpp --- a/src/cpu/zero/vm/methodHandles_zero.cpp +++ b/src/cpu/zero/vm/methodHandles_zero.cpp @@ -147,8 +147,8 @@ Klass* clazz = recv->klass(); Klass* klass_part = InstanceKlass::cast(clazz); ResourceMark rm(THREAD); - klassVtable* vtable = klass_part->vtable(); - Method* vmtarget = vtable->method_at(vmindex); + klassVtable vtable = klass_part->vtable(); + Method* vmtarget = vtable.method_at(vmindex); invoke_target(vmtarget, THREAD); diff --git a/src/share/vm/interpreter/bytecodeInterpreter.cpp b/src/share/vm/interpreter/bytecodeInterpreter.cpp --- a/src/share/vm/interpreter/bytecodeInterpreter.cpp +++ b/src/share/vm/interpreter/bytecodeInterpreter.cpp @@ -2790,7 +2790,7 @@ CALL_VM(continuation_bci = (intptr_t)InterpreterRuntime::exception_handler_for_exception(THREAD, except_oop()), handle_exception); - except_oop = THREAD->vm_result(); + except_oop = Handle(THREAD, THREAD->vm_result()); THREAD->set_vm_result(NULL); if (continuation_bci >= 0) { // Place exception on top of stack @@ -2994,7 +2994,7 @@ CALL_VM_NOCHECK(InterpreterRuntime::throw_illegal_monitor_state_exception(THREAD)); } assert(THREAD->has_pending_exception(), "Lost our exception!"); - illegal_state_oop = THREAD->pending_exception(); + illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); } } @@ -3011,7 +3011,7 @@ CALL_VM_NOCHECK(InterpreterRuntime::throw_illegal_monitor_state_exception(THREAD)); } assert(THREAD->has_pending_exception(), "Lost our exception!"); - illegal_state_oop = THREAD->pending_exception(); + illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); } } else { @@ -3028,7 +3028,7 @@ if (rcvr == NULL) { if (!suppress_error) { VM_JAVA_ERROR_NO_JUMP(vmSymbols::java_lang_NullPointerException(), "", note_nullCheck_trap); - illegal_state_oop = THREAD->pending_exception(); + illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); } } else if (UseHeavyMonitors) { @@ -3038,7 +3038,7 @@ CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(THREAD, base)); } if (THREAD->has_pending_exception()) { - if (!suppress_error) illegal_state_oop = THREAD->pending_exception(); + if (!suppress_error) illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); } } else { @@ -3059,7 +3059,7 @@ CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(THREAD, base)); } if (THREAD->has_pending_exception()) { - if (!suppress_error) illegal_state_oop = THREAD->pending_exception(); + if (!suppress_error) illegal_state_oop = Handle(THREAD, THREAD->pending_exception()); THREAD->clear_pending_exception(); } } diff --git a/src/share/vm/runtime/jniHandles.hpp b/src/share/vm/runtime/jniHandles.hpp --- a/src/share/vm/runtime/jniHandles.hpp +++ b/src/share/vm/runtime/jniHandles.hpp @@ -152,6 +152,9 @@ // Free list computation void rebuild_free_list(); + // No more handles in the both the current and following blocks + void clear() { _top = 0; } + public: // Handle allocation jobject allocate_handle(oop obj);