diff src/share/vm/graal/graalRuntime.hpp @ 16428:78ddecd6255f

added CHECK macros in uses of SymbolTable::new_symbol; added CHECK_ABORT macros for TRAPS functions that must abort the VM if they throw an exception
author Doug Simon <doug.simon@oracle.com>
date Tue, 08 Jul 2014 21:38:21 +0200
parents ad431bf0de07
children addc0564e5b5
line wrap: on
line diff
--- a/src/share/vm/graal/graalRuntime.hpp	Tue Jul 08 21:35:46 2014 +0200
+++ b/src/share/vm/graal/graalRuntime.hpp	Tue Jul 08 21:38:21 2014 +0200
@@ -139,11 +139,23 @@
    */
   static void call_printStackTrace(Handle exception, Thread* thread);
 
-#define GUARANTEE_NO_PENDING_EXCEPTION(error_message) do { \
-    if (HAS_PENDING_EXCEPTION) { \
-      GraalRuntime::abort_on_pending_exception(PENDING_EXCEPTION, error_message); \
-    } \
-  } while (0);
+#define CHECK_ABORT THREAD); \
+  if (HAS_PENDING_EXCEPTION) { \
+    char buf[256]; \
+    jio_snprintf(buf, 256, "Uncaught exception at %s:%d", __FILE__, __LINE__); \
+    GraalRuntime::abort_on_pending_exception(PENDING_EXCEPTION, buf); \
+    return; \
+  } \
+  (void)(0
+
+#define CHECK_ABORT_(result) THREAD); \
+  if (HAS_PENDING_EXCEPTION) { \
+    char buf[256]; \
+    jio_snprintf(buf, 256, "Uncaught exception at %s:%d", __FILE__, __LINE__); \
+    GraalRuntime::abort_on_pending_exception(PENDING_EXCEPTION, buf); \
+    return result; \
+  } \
+  (void)(0
 
   /**
    * Same as SystemDictionary::resolve_or_null but uses the Graal loader.