comparison src/share/vm/utilities/exceptions.hpp @ 22460:f27c163d7dc2

moved JVMCI fields from ThreadShadow to Thread
author Doug Simon <doug.simon@oracle.com>
date Mon, 24 Aug 2015 22:35:47 +0200
parents c28cb37b2e1d
children fc0a5a73fa56
comparison
equal deleted inserted replaced
22459:0dd2b79625b3 22460:f27c163d7dc2
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 #if INCLUDE_JVMCI
65 int _pending_deoptimization;
66 oop _pending_failed_speculation;
67 bool _pending_monitorenter;
68 bool _pending_transfer_to_interpreter;
69 #endif
70 oop _pending_exception; // Thread has gc actions. 64 oop _pending_exception; // Thread has gc actions.
71 const char* _exception_file; // file information for exception (debugging only) 65 const char* _exception_file; // file information for exception (debugging only)
72 int _exception_line; // line information for exception (debugging only) 66 int _exception_line; // line information for exception (debugging only)
73 friend void check_ThreadShadow(); // checks _pending_exception offset 67 friend void check_ThreadShadow(); // checks _pending_exception offset
74 68
83 public: 77 public:
84 oop pending_exception() const { return _pending_exception; } 78 oop pending_exception() const { return _pending_exception; }
85 bool has_pending_exception() const { return _pending_exception != NULL; } 79 bool has_pending_exception() const { return _pending_exception != NULL; }
86 const char* exception_file() const { return _exception_file; } 80 const char* exception_file() const { return _exception_file; }
87 int exception_line() const { return _exception_line; } 81 int exception_line() const { return _exception_line; }
88 #if INCLUDE_JVMCI
89 int pending_deoptimization() const { return _pending_deoptimization; }
90 oop pending_failed_speculation() const { return _pending_failed_speculation; }
91 bool has_pending_monitorenter() const { return _pending_monitorenter; }
92 #endif
93 82
94 // Code generation support 83 // Code generation support
95 static ByteSize pending_exception_offset() { return byte_offset_of(ThreadShadow, _pending_exception); } 84 static ByteSize pending_exception_offset() { return byte_offset_of(ThreadShadow, _pending_exception); }
96 #if INCLUDE_JVMCI
97 static ByteSize pending_deoptimization_offset() { return byte_offset_of(ThreadShadow, _pending_deoptimization); }
98 static ByteSize pending_monitorenter_offset() { return byte_offset_of(ThreadShadow, _pending_monitorenter); }
99 static ByteSize pending_failed_speculation_offset() { return byte_offset_of(ThreadShadow, _pending_failed_speculation); }
100
101 void set_pending_monitorenter(bool b) { _pending_monitorenter = b; }
102 void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; }
103 void set_pending_failed_speculation(oop failed_speculation) { _pending_failed_speculation = failed_speculation; }
104 void set_pending_transfer_to_interpreter(bool b) { _pending_transfer_to_interpreter = b; }
105 #endif
106 85
107 // use THROW whenever possible! 86 // use THROW whenever possible!
108 void set_pending_exception(oop exception, const char* file, int line); 87 void set_pending_exception(oop exception, const char* file, int line);
109 88
110 // use CLEAR_PENDING_EXCEPTION whenever possible! 89 // use CLEAR_PENDING_EXCEPTION whenever possible!
111 void clear_pending_exception(); 90 void clear_pending_exception();
112 91
113 ThreadShadow() : _pending_exception(NULL), 92 ThreadShadow() : _pending_exception(NULL),
114 _exception_file(NULL), _exception_line(0) 93 _exception_file(NULL), _exception_line(0)
115 #if INCLUDE_JVMCI
116 , _pending_monitorenter(false), _pending_deoptimization(-1), _pending_failed_speculation(NULL), _pending_transfer_to_interpreter(false)
117 #endif
118 {} 94 {}
119 }; 95 };
120 96
121 97
122 // Exceptions is a helper class that encapsulates all operations 98 // Exceptions is a helper class that encapsulates all operations