Mercurial > hg > truffle
comparison src/share/vm/utilities/exceptions.hpp @ 13220:2b43fcc68add
Put _pending_deoptimization and _pending_monitorenter under ifdef GRAAL
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Mon, 02 Dec 2013 18:06:00 +0100 |
parents | 3cce976666d9 |
children | 5a9afbf72714 |
comparison
equal
deleted
inserted
replaced
13219:fdc3925a8e74 | 13220:2b43fcc68add |
---|---|
59 | 59 |
60 class ThreadShadow: public CHeapObj<mtThread> { | 60 class ThreadShadow: public CHeapObj<mtThread> { |
61 friend class VMStructs; | 61 friend class VMStructs; |
62 | 62 |
63 protected: | 63 protected: |
64 #ifdef GRAAL | |
64 int _pending_deoptimization; | 65 int _pending_deoptimization; |
65 bool _pending_monitorenter; | 66 bool _pending_monitorenter; |
67 #endif | |
66 oop _pending_exception; // Thread has gc actions. | 68 oop _pending_exception; // Thread has gc actions. |
67 const char* _exception_file; // file information for exception (debugging only) | 69 const char* _exception_file; // file information for exception (debugging only) |
68 int _exception_line; // line information for exception (debugging only) | 70 int _exception_line; // line information for exception (debugging only) |
69 friend void check_ThreadShadow(); // checks _pending_exception offset | 71 friend void check_ThreadShadow(); // checks _pending_exception offset |
70 | 72 |
76 // notice that Thread has a vtable but ThreadShadow does not. | 78 // notice that Thread has a vtable but ThreadShadow does not. |
77 virtual void unused_initial_virtual() { } | 79 virtual void unused_initial_virtual() { } |
78 | 80 |
79 public: | 81 public: |
80 oop pending_exception() const { return _pending_exception; } | 82 oop pending_exception() const { return _pending_exception; } |
81 int pending_deoptimization() const { return _pending_deoptimization; } | |
82 bool has_pending_exception() const { return _pending_exception != NULL; } | 83 bool has_pending_exception() const { return _pending_exception != NULL; } |
83 const char* exception_file() const { return _exception_file; } | 84 const char* exception_file() const { return _exception_file; } |
84 int exception_line() const { return _exception_line; } | 85 int exception_line() const { return _exception_line; } |
86 #ifdef GRAAL | |
87 int pending_deoptimization() const { return _pending_deoptimization; } | |
85 bool has_pending_monitorenter() const { return _pending_monitorenter; } | 88 bool has_pending_monitorenter() const { return _pending_monitorenter; } |
89 #endif | |
86 | 90 |
87 // Code generation support | 91 // Code generation support |
92 static ByteSize pending_exception_offset() { return byte_offset_of(ThreadShadow, _pending_exception); } | |
93 #ifdef GRAAL | |
88 static ByteSize pending_deoptimization_offset() { return byte_offset_of(ThreadShadow, _pending_deoptimization); } | 94 static ByteSize pending_deoptimization_offset() { return byte_offset_of(ThreadShadow, _pending_deoptimization); } |
89 static ByteSize pending_exception_offset() { return byte_offset_of(ThreadShadow, _pending_exception); } | |
90 static ByteSize pending_monitorenter_offset() { return byte_offset_of(ThreadShadow, _pending_monitorenter); } | 95 static ByteSize pending_monitorenter_offset() { return byte_offset_of(ThreadShadow, _pending_monitorenter); } |
91 | 96 |
92 void set_pending_monitorenter(bool b) { _pending_monitorenter = b; } | 97 void set_pending_monitorenter(bool b) { _pending_monitorenter = b; } |
93 void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; } | 98 void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; } |
99 #endif | |
94 | 100 |
95 // use THROW whenever possible! | 101 // use THROW whenever possible! |
96 void set_pending_exception(oop exception, const char* file, int line); | 102 void set_pending_exception(oop exception, const char* file, int line); |
97 | 103 |
98 // use CLEAR_PENDING_EXCEPTION whenever possible! | 104 // use CLEAR_PENDING_EXCEPTION whenever possible! |
99 void clear_pending_exception(); | 105 void clear_pending_exception(); |
100 | 106 |
101 ThreadShadow() : _pending_exception(NULL), | 107 ThreadShadow() : _pending_exception(NULL), |
102 _exception_file(NULL), _exception_line(0), _pending_monitorenter(false), _pending_deoptimization(-1) {} | 108 _exception_file(NULL), _exception_line(0) |
109 #ifdef GRAAL | |
110 , _pending_monitorenter(false), _pending_deoptimization(-1) | |
111 #endif | |
112 {} | |
103 }; | 113 }; |
104 | 114 |
105 | 115 |
106 // Exceptions is a helper class that encapsulates all operations | 116 // Exceptions is a helper class that encapsulates all operations |
107 // that require access to the thread interface and which are | 117 // that require access to the thread interface and which are |