changeset 13388:1cd12dd1d032

8185263: Fix zero build after 8169881, 8175318, 8178350 Reviewed-by: iklam, coleenp
author stuefe
date Wed, 26 Jul 2017 11:51:25 -0700
parents 136f607c4bba
children 56e0bffc30fe
files src/cpu/zero/vm/methodHandles_zero.cpp src/share/vm/interpreter/bytecodeInterpreter.cpp src/share/vm/runtime/jniHandles.hpp
diffstat 3 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/zero/vm/methodHandles_zero.cpp	Wed Jul 26 11:47:11 2017 +0200
+++ b/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);
 
--- a/src/share/vm/interpreter/bytecodeInterpreter.cpp	Wed Jul 26 11:47:11 2017 +0200
+++ b/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();
                   }
                 }
--- a/src/share/vm/runtime/jniHandles.hpp	Wed Jul 26 11:47:11 2017 +0200
+++ b/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);