< prev index next >

src/share/vm/ci/ciUtilities.hpp

Print this page
rev 4131 : 8014431: cleanup warnings indicated by the -Wunused-value compiler option on linux
8015265: revise the fix for 8007037
Reviewed-by: sspitsyn, dholmes, dcubed, coleenp
Contributed-by: jeremymanson@google.com, calvin.cheung@oracle.com


  76 
  77 #define ASSERT_IN_VM                        \
  78   assert(IS_IN_VM, "must be in vm state");
  79 
  80 #define GUARDED_VM_ENTRY(action)            \
  81   {if (IS_IN_VM) { action } else { VM_ENTRY_MARK; { action }}}
  82 
  83 // Redefine this later.
  84 #define KILL_COMPILE_ON_FATAL_(result)           \
  85   THREAD);                                       \
  86   if (HAS_PENDING_EXCEPTION) {                   \
  87     if (PENDING_EXCEPTION->klass() ==            \
  88         SystemDictionary::ThreadDeath_klass()) { \
  89       /* Kill the compilation. */                \
  90       fatal("unhandled ci exception");           \
  91       return (result);                           \
  92     }                                            \
  93     CLEAR_PENDING_EXCEPTION;                     \
  94     return (result);                             \
  95   }                                              \
  96   (0
  97 
  98 #define KILL_COMPILE_ON_ANY                      \
  99   THREAD);                                       \
 100   if (HAS_PENDING_EXCEPTION) {                   \
 101     fatal("unhandled ci exception");             \
 102     CLEAR_PENDING_EXCEPTION;                     \
 103   }                                              \
 104 (0
 105 
 106 
 107 inline const char* bool_to_str(bool b) {
 108   return ((b) ? "true" : "false");
 109 }
 110 
 111 const char* basictype_to_str(BasicType t);
 112 const char  basictype_to_char(BasicType t);
 113 
 114 #endif // SHARE_VM_CI_CIUTILITIES_HPP


  76 
  77 #define ASSERT_IN_VM                        \
  78   assert(IS_IN_VM, "must be in vm state");
  79 
  80 #define GUARDED_VM_ENTRY(action)            \
  81   {if (IS_IN_VM) { action } else { VM_ENTRY_MARK; { action }}}
  82 
  83 // Redefine this later.
  84 #define KILL_COMPILE_ON_FATAL_(result)           \
  85   THREAD);                                       \
  86   if (HAS_PENDING_EXCEPTION) {                   \
  87     if (PENDING_EXCEPTION->klass() ==            \
  88         SystemDictionary::ThreadDeath_klass()) { \
  89       /* Kill the compilation. */                \
  90       fatal("unhandled ci exception");           \
  91       return (result);                           \
  92     }                                            \
  93     CLEAR_PENDING_EXCEPTION;                     \
  94     return (result);                             \
  95   }                                              \
  96   (void)(0
  97 
  98 #define KILL_COMPILE_ON_ANY                      \
  99   THREAD);                                       \
 100   if (HAS_PENDING_EXCEPTION) {                   \
 101     fatal("unhandled ci exception");             \
 102     CLEAR_PENDING_EXCEPTION;                     \
 103   }                                              \
 104 (void)(0
 105 
 106 
 107 inline const char* bool_to_str(bool b) {
 108   return ((b) ? "true" : "false");
 109 }
 110 
 111 const char* basictype_to_str(BasicType t);
 112 const char  basictype_to_char(BasicType t);
 113 
 114 #endif // SHARE_VM_CI_CIUTILITIES_HPP
< prev index next >