comparison src/share/vm/c1x/c1x_VMExits.hpp @ 2285:762de4b26788

turn Compiler and HotSpotTypeResolved into interfaces
author Lukas Stadler <lukas.stadler@jku.at>
date Fri, 08 Apr 2011 13:43:05 +0200
parents 569d3fe7d65c
children 34354e2e40a3
comparison
equal deleted inserted replaced
2284:569d3fe7d65c 2285:762de4b26788
23 */ 23 */
24 24
25 class VMExits : public AllStatic { 25 class VMExits : public AllStatic {
26 26
27 private: 27 private:
28 static jobject _compilerPermObject;
28 static jobject _vmExitsPermObject; 29 static jobject _vmExitsPermObject;
29 static jobject _compilerPermKlass;
30 static jobject _compilerPermObject;
31 static jobject _vmExitsPermKlass; 30 static jobject _vmExitsPermKlass;
32 31
33 static KlassHandle compilerKlass();
34 static KlassHandle vmExitsKlass(); 32 static KlassHandle vmExitsKlass();
35 static Handle instance(); 33 static Handle instance();
36 34
37 public: 35 public:
38 static Handle compilerInstance(); 36 static Handle compilerInstance();
83 inline void check_pending_exception(const char* message, bool dump_core = false) { 81 inline void check_pending_exception(const char* message, bool dump_core = false) {
84 Thread* THREAD = Thread::current(); 82 Thread* THREAD = Thread::current();
85 if (THREAD->has_pending_exception()) { 83 if (THREAD->has_pending_exception()) {
86 Handle exception = PENDING_EXCEPTION; 84 Handle exception = PENDING_EXCEPTION;
87 CLEAR_PENDING_EXCEPTION; 85 CLEAR_PENDING_EXCEPTION;
86 tty->print_cr("%s", message);
88 java_lang_Throwable::print(exception, tty); 87 java_lang_Throwable::print(exception, tty);
89 tty->cr(); 88 tty->cr();
90 java_lang_Throwable::print_stack_trace(exception(), tty); 89 java_lang_Throwable::print_stack_trace(exception(), tty);
91 vm_abort(dump_core); 90 vm_abort(dump_core);
92 } 91 }
93 } 92 }
93
94 inline void check_not_null(void* value, const char* message, bool dump_core = false) {
95 if (value == NULL) {
96 tty->print_cr("%s", message);
97 vm_abort(dump_core);
98 }
99 }