changeset 3699:67e92894d065

Set catch all to true if the caught class is java.lang.Throwable.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 24 Nov 2011 17:45:19 +0100
parents 7c26db3259c6
children b5c649e4e700
files src/share/vm/graal/graalVMEntries.cpp
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/graal/graalVMEntries.cpp	Thu Nov 24 16:14:33 2011 +0100
+++ b/src/share/vm/graal/graalVMEntries.cpp	Thu Nov 24 17:45:19 2011 +0100
@@ -91,7 +91,12 @@
       constantPoolOop cp = instanceKlass::cast(method->method_holder())->constants();
       KlassHandle loading_klass = method->method_holder();
       Handle catch_class = GraalCompiler::get_RiType(cp, catch_class_index, loading_klass, CHECK_NULL);
-      HotSpotExceptionHandler::set_catchClass(entry, catch_class());
+      if (catch_class->klass() == HotSpotTypeResolved::klass() && java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(catch_class)) == SystemDictionary::Throwable_klass()) {
+        HotSpotExceptionHandler::set_catchClass(entry, NULL);
+        HotSpotExceptionHandler::set_catchClassIndex(entry, 0);
+      } else {
+        HotSpotExceptionHandler::set_catchClass(entry, catch_class());
+      }
     }
     array->obj_at_put(i, entry());
   }