153 volatile uint8_t _is_unloading_state; // Local state used to keep track of whether unloading is happening or not
154
155 // set during construction
156 unsigned int _has_unsafe_access:1; // May fault due to unsafe access.
157 unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes?
158 unsigned int _lazy_critical_native:1; // Lazy JNI critical native
159 unsigned int _has_wide_vectors:1; // Preserve wide vectors at safepoints
160
161 Method* _method;
162 address _scopes_data_begin;
163 // All deoptee's will resume execution at this location described by
164 // this address.
165 address _deopt_handler_begin;
166 // All deoptee's at a MethodHandle call site will resume execution
167 // at this location described by this offset.
168 address _deopt_mh_handler_begin;
169
170 PcDescContainer _pc_desc_container;
171 ExceptionCache * volatile _exception_cache;
172
173 virtual void flush() = 0;
174 protected:
175 CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int fr
176 CompiledMethod(Method* method, const char* name, CompilerType type, int size, int header_size, CodeBuffer* cb, int frame_complete_o
177
178 public:
179 virtual bool is_compiled() const { return true; }
180
181 bool has_unsafe_access() const { return _has_unsafe_access; }
182 void set_has_unsafe_access(bool z) { _has_unsafe_access = z; }
183
184 bool has_method_handle_invokes() const { return _has_method_handle_invokes; }
185 void set_has_method_handle_invokes(bool z) { _has_method_handle_invokes = z; }
186
187 bool is_lazy_critical_native() const { return _lazy_critical_native; }
188 void set_lazy_critical_native(bool z) { _lazy_critical_native = z; }
189
190 bool has_wide_vectors() const { return _has_wide_vectors; }
191 void set_has_wide_vectors(bool z) { _has_wide_vectors = z; }
192
193 enum { not_installed = -1, // in construction, only the owner doing the construction is
194 // allowed to advance state
195 in_use = 0, // executable nmethod
196 not_used = 1, // not entrant, but revivable
197 not_entrant = 2, // marked for deoptimization but activations may still exist,
198 // will be transformed to zombie when all activations are gone
|
153 volatile uint8_t _is_unloading_state; // Local state used to keep track of whether unloading is happening or not
154
155 // set during construction
156 unsigned int _has_unsafe_access:1; // May fault due to unsafe access.
157 unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes?
158 unsigned int _lazy_critical_native:1; // Lazy JNI critical native
159 unsigned int _has_wide_vectors:1; // Preserve wide vectors at safepoints
160
161 Method* _method;
162 address _scopes_data_begin;
163 // All deoptee's will resume execution at this location described by
164 // this address.
165 address _deopt_handler_begin;
166 // All deoptee's at a MethodHandle call site will resume execution
167 // at this location described by this offset.
168 address _deopt_mh_handler_begin;
169
170 PcDescContainer _pc_desc_container;
171 ExceptionCache * volatile _exception_cache;
172
173 void* _gc_data;
174
175 virtual void flush() = 0;
176 protected:
177 CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int fr
178 CompiledMethod(Method* method, const char* name, CompilerType type, int size, int header_size, CodeBuffer* cb, int frame_complete_o
179
180 public:
181 virtual bool is_compiled() const { return true; }
182
183 template<typename T>
184 T* gc_data() const { return reinterpret_cast<T*>(_gc_data); }
185 template<typename T>
186 void set_gc_data(T* gc_data) { _gc_data = reinterpret_cast<void*>(gc_data); }
187
188 bool has_unsafe_access() const { return _has_unsafe_access; }
189 void set_has_unsafe_access(bool z) { _has_unsafe_access = z; }
190
191 bool has_method_handle_invokes() const { return _has_method_handle_invokes; }
192 void set_has_method_handle_invokes(bool z) { _has_method_handle_invokes = z; }
193
194 bool is_lazy_critical_native() const { return _lazy_critical_native; }
195 void set_lazy_critical_native(bool z) { _lazy_critical_native = z; }
196
197 bool has_wide_vectors() const { return _has_wide_vectors; }
198 void set_has_wide_vectors(bool z) { _has_wide_vectors = z; }
199
200 enum { not_installed = -1, // in construction, only the owner doing the construction is
201 // allowed to advance state
202 in_use = 0, // executable nmethod
203 not_used = 1, // not entrant, but revivable
204 not_entrant = 2, // marked for deoptimization but activations may still exist,
205 // will be transformed to zombie when all activations are gone
|