diff src/share/vm/runtime/sharedRuntime.cpp @ 8968:e41c32a4d573

Change the register_finalizer stub to not overwrite any registers.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 09 Apr 2013 19:28:34 +0200
parents 37977d1dcedc
children f94bb5d20e5d
line wrap: on
line diff
--- a/src/share/vm/runtime/sharedRuntime.cpp	Tue Apr 09 15:26:29 2013 +0200
+++ b/src/share/vm/runtime/sharedRuntime.cpp	Tue Apr 09 19:28:34 2013 +0200
@@ -969,6 +969,11 @@
 
 
 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::register_finalizer(JavaThread* thread, oopDesc* obj))
+#ifdef GRAAL
+  if (!obj->klass()->has_finalizer()) {
+    return;
+  }
+#endif
   assert(obj->is_oop(), "must be a valid oop");
   assert(obj->klass()->has_finalizer(), "shouldn't be here otherwise");
   InstanceKlass::register_finalizer(instanceOop(obj), CHECK);