# HG changeset patch # User stuefe # Date 1501095085 25200 # Node ID a4653c2a4e65c26b49368d9e01142a27f2650746 # Parent 5c418c5fcade1cd4c2ce5031e2aaaacefd09339b 8185263: Fix zero build after 8169881, 8175318, 8178350 Reviewed-by: iklam, coleenp diff -r 5c418c5fcade -r a4653c2a4e65 hotspot/src/cpu/zero/vm/methodHandles_zero.cpp --- a/hotspot/src/cpu/zero/vm/methodHandles_zero.cpp Wed Jul 26 11:47:11 2017 +0200 +++ b/hotspot/src/cpu/zero/vm/methodHandles_zero.cpp Wed Jul 26 11:51:25 2017 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright 2009, 2010, 2011 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -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 -r 5c418c5fcade -r a4653c2a4e65 hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp --- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Wed Jul 26 11:47:11 2017 +0200 +++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Wed Jul 26 11:51:25 2017 -0700 @@ -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 -r 5c418c5fcade -r a4653c2a4e65 hotspot/src/share/vm/runtime/jniHandles.hpp --- a/hotspot/src/share/vm/runtime/jniHandles.hpp Wed Jul 26 11:47:11 2017 +0200 +++ b/hotspot/src/share/vm/runtime/jniHandles.hpp Wed Jul 26 11:51:25 2017 -0700 @@ -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);