275 virtual address stub_end() const = 0;
276 bool stub_contains(address addr) const { return stub_begin() <= addr && addr < stub_end(); }
277 int stub_size() const { return stub_end() - stub_begin(); }
278
279 virtual address handler_table_begin() const = 0;
280 virtual address handler_table_end() const = 0;
281 bool handler_table_contains(address addr) const { return handler_table_begin() <= addr && addr < handler_table_end(); }
282 int handler_table_size() const { return handler_table_end() - handler_table_begin(); }
283
284 virtual address exception_begin() const = 0;
285
286 virtual address nul_chk_table_begin() const = 0;
287 virtual address nul_chk_table_end() const = 0;
288 bool nul_chk_table_contains(address addr) const { return nul_chk_table_begin() <= addr && addr < nul_chk_table_end(); }
289 int nul_chk_table_size() const { return nul_chk_table_end() - nul_chk_table_begin(); }
290
291 virtual oop* oop_addr_at(int index) const = 0;
292 virtual Metadata** metadata_addr_at(int index) const = 0;
293 virtual void set_original_pc(const frame* fr, address pc) = 0;
294
295 // Exception cache support
296 // Note: _exception_cache may be read and cleaned concurrently.
297 ExceptionCache* exception_cache() const { return _exception_cache; }
298 ExceptionCache* exception_cache_acquire() const;
299 void set_exception_cache(ExceptionCache *ec) { _exception_cache = ec; }
300 void release_set_exception_cache(ExceptionCache *ec);
301 address handler_for_exception_and_pc(Handle exception, address pc);
302 void add_handler_for_exception_and_pc(Handle exception, address pc, address handler);
303 void clean_exception_cache();
304 static void purge_exception_cache_free_list();
305
306 void add_exception_cache_entry(ExceptionCache* new_entry);
307 ExceptionCache* exception_cache_entry_for_exception(Handle exception);
308
309 // MethodHandle
310 bool is_method_handle_return(address return_pc);
311 address deopt_mh_handler_begin() const { return _deopt_mh_handler_begin; }
312
313 address deopt_handler_begin() const { return _deopt_handler_begin; }
314 virtual address get_original_pc(const frame* fr) = 0;
315 // Deopt
316 // Return true is the PC is one would expect if the frame is being deopted.
317 inline bool is_deopt_pc(address pc);
318 bool is_deopt_mh_entry(address pc) { return pc == deopt_mh_handler_begin(); }
319 inline bool is_deopt_entry(address pc);
320
321 virtual bool can_convert_to_zombie() = 0;
322 virtual const char* compile_kind() const = 0;
323 virtual int get_state() const = 0;
|
275 virtual address stub_end() const = 0;
276 bool stub_contains(address addr) const { return stub_begin() <= addr && addr < stub_end(); }
277 int stub_size() const { return stub_end() - stub_begin(); }
278
279 virtual address handler_table_begin() const = 0;
280 virtual address handler_table_end() const = 0;
281 bool handler_table_contains(address addr) const { return handler_table_begin() <= addr && addr < handler_table_end(); }
282 int handler_table_size() const { return handler_table_end() - handler_table_begin(); }
283
284 virtual address exception_begin() const = 0;
285
286 virtual address nul_chk_table_begin() const = 0;
287 virtual address nul_chk_table_end() const = 0;
288 bool nul_chk_table_contains(address addr) const { return nul_chk_table_begin() <= addr && addr < nul_chk_table_end(); }
289 int nul_chk_table_size() const { return nul_chk_table_end() - nul_chk_table_begin(); }
290
291 virtual oop* oop_addr_at(int index) const = 0;
292 virtual Metadata** metadata_addr_at(int index) const = 0;
293 virtual void set_original_pc(const frame* fr, address pc) = 0;
294
295 protected:
296 // Exception cache support
297 // Note: _exception_cache may be read and cleaned concurrently.
298 ExceptionCache* exception_cache() const { return _exception_cache; }
299 ExceptionCache* exception_cache_acquire() const;
300 void set_exception_cache(ExceptionCache *ec) { _exception_cache = ec; }
301
302 public:
303 address handler_for_exception_and_pc(Handle exception, address pc);
304 void add_handler_for_exception_and_pc(Handle exception, address pc, address handler);
305 void clean_exception_cache();
306
307 void add_exception_cache_entry(ExceptionCache* new_entry);
308 ExceptionCache* exception_cache_entry_for_exception(Handle exception);
309
310 // MethodHandle
311 bool is_method_handle_return(address return_pc);
312 address deopt_mh_handler_begin() const { return _deopt_mh_handler_begin; }
313
314 address deopt_handler_begin() const { return _deopt_handler_begin; }
315 virtual address get_original_pc(const frame* fr) = 0;
316 // Deopt
317 // Return true is the PC is one would expect if the frame is being deopted.
318 inline bool is_deopt_pc(address pc);
319 bool is_deopt_mh_entry(address pc) { return pc == deopt_mh_handler_begin(); }
320 inline bool is_deopt_entry(address pc);
321
322 virtual bool can_convert_to_zombie() = 0;
323 virtual const char* compile_kind() const = 0;
324 virtual int get_state() const = 0;
|