Mercurial > hg > graal-compiler
comparison src/share/vm/utilities/exceptions.hpp @ 8328:6b6cbd8b8914
Support deoptimizing before the entry to a synchronized method.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 17 Mar 2013 21:20:39 +0100 |
parents | aefb345d3f5e |
children | 37977d1dcedc |
comparison
equal
deleted
inserted
replaced
8327:e24fb475bdec | 8328:6b6cbd8b8914 |
---|---|
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 bool _pending_monitorenter; | |
64 oop _pending_exception; // Thread has gc actions. | 65 oop _pending_exception; // Thread has gc actions. |
65 const char* _exception_file; // file information for exception (debugging only) | 66 const char* _exception_file; // file information for exception (debugging only) |
66 int _exception_line; // line information for exception (debugging only) | 67 int _exception_line; // line information for exception (debugging only) |
67 friend void check_ThreadShadow(); // checks _pending_exception offset | 68 friend void check_ThreadShadow(); // checks _pending_exception offset |
68 | 69 |
77 public: | 78 public: |
78 oop pending_exception() const { return _pending_exception; } | 79 oop pending_exception() const { return _pending_exception; } |
79 bool has_pending_exception() const { return _pending_exception != NULL; } | 80 bool has_pending_exception() const { return _pending_exception != NULL; } |
80 const char* exception_file() const { return _exception_file; } | 81 const char* exception_file() const { return _exception_file; } |
81 int exception_line() const { return _exception_line; } | 82 int exception_line() const { return _exception_line; } |
83 bool has_pending_monitorenter() const { return _pending_monitorenter; } | |
82 | 84 |
83 // Code generation support | 85 // Code generation support |
84 static ByteSize pending_exception_offset() { return byte_offset_of(ThreadShadow, _pending_exception); } | 86 static ByteSize pending_exception_offset() { return byte_offset_of(ThreadShadow, _pending_exception); } |
87 static ByteSize pending_monitorenter_offset() { return byte_offset_of(ThreadShadow, _pending_monitorenter); } | |
88 | |
89 bool set_pending_monitorenter(bool b) { return _pending_monitorenter = b; } | |
85 | 90 |
86 // use THROW whenever possible! | 91 // use THROW whenever possible! |
87 void set_pending_exception(oop exception, const char* file, int line); | 92 void set_pending_exception(oop exception, const char* file, int line); |
88 | 93 |
89 // use CLEAR_PENDING_EXCEPTION whenever possible! | 94 // use CLEAR_PENDING_EXCEPTION whenever possible! |
90 void clear_pending_exception(); | 95 void clear_pending_exception(); |
91 | 96 |
92 ThreadShadow() : _pending_exception(NULL), | 97 ThreadShadow() : _pending_exception(NULL), |
93 _exception_file(NULL), _exception_line(0) {} | 98 _exception_file(NULL), _exception_line(0), _pending_monitorenter(false) {} |
94 }; | 99 }; |
95 | 100 |
96 | 101 |
97 // Exceptions is a helper class that encapsulates all operations | 102 // Exceptions is a helper class that encapsulates all operations |
98 // that require access to the thread interface and which are | 103 // that require access to the thread interface and which are |