< prev index next > src/hotspot/share/code/vtableStubs.hpp
Print this page
friend class VtableStub;
static VtableStub* volatile _table[N]; // table of existing stubs
static int _vtab_stub_size; // current size estimate for vtable stub (quasi-constant)
static int _itab_stub_size; // current size estimate for itable stub (quasi-constant)
- static VtableStub* create_vtable_stub(int vtable_index);
- static VtableStub* create_itable_stub(int vtable_index);
- static VtableStub* lookup (bool is_vtable_stub, int vtable_index);
- static void enter (bool is_vtable_stub, int vtable_index, VtableStub* s);
- static inline uint hash (bool is_vtable_stub, int vtable_index);
- static inline uint unsafe_hash (address entry_point);
- static address find_stub (bool is_vtable_stub, int vtable_index);
+ static VtableStub* create_vtable_stub(int vtable_index, bool caller_is_c1);
+ static VtableStub* create_itable_stub(int vtable_index, bool caller_is_c1);
+ static VtableStub* lookup (bool is_vtable_stub, int vtable_index, bool caller_is_c1);
+ static void enter (bool is_vtable_stub, int vtable_index, bool caller_is_c1, VtableStub* s);
+ static inline uint hash (bool is_vtable_stub, int vtable_index, bool caller_is_c1);
+ static inline uint unsafe_hash (address entry_point, bool caller_is_c1);
+ static address find_stub (bool is_vtable_stub, int vtable_index, bool caller_is_c1);
static void bookkeeping(MacroAssembler* masm, outputStream* out, VtableStub* s,
address npe_addr, address ame_addr, bool is_vtable_stub,
int index, int slop_bytes, int index_dependent_slop);
static int code_size_limit(bool is_vtable_stub);
static void check_and_set_size_limit(bool is_vtable_stub,
int code_size,
int padding);
public:
- static address find_vtable_stub(int vtable_index) { return find_stub(true, vtable_index); }
- static address find_itable_stub(int itable_index) { return find_stub(false, itable_index); }
+ static address find_vtable_stub(int vtable_index, bool caller_is_c1) { return find_stub(true, vtable_index, caller_is_c1); }
+ static address find_itable_stub(int itable_index, bool caller_is_c1) { return find_stub(false, itable_index, caller_is_c1); }
static VtableStub* entry_point(address pc); // vtable stub entry point for a pc
static bool contains(address pc); // is pc within any stub?
static VtableStub* stub_containing(address pc); // stub containing pc or nullptr
static void initialize();
VtableStub* _next; // Pointer to next entry in hash table
const short _index; // vtable index
short _ame_offset; // Where an AbstractMethodError might occur
short _npe_offset; // Where a NullPointerException might occur
Type _type; // Type, either vtable stub or itable stub
+ bool _caller_is_c1; // True if this is for a caller compiled by C1,
+ // which doesn't scalarize parameters.
/* code follows here */ // The vtableStub code
void* operator new(size_t size, int code_size) throw();
- VtableStub(bool is_vtable_stub, short index)
+ VtableStub(bool is_vtable_stub, short index, bool caller_is_c1)
: _next(nullptr), _index(index), _ame_offset(-1), _npe_offset(-1),
- _type(is_vtable_stub ? Type::vtable_stub : Type::itable_stub) {}
+ _type(is_vtable_stub ? Type::vtable_stub : Type::itable_stub), _caller_is_c1(caller_is_c1) {}
VtableStub* next() const { return _next; }
int index() const { return _index; }
static VMReg receiver_location() { return _receiver_location; }
void set_next(VtableStub* n) { _next = n; }
address code_begin() const { return (address)(this + 1); }
address code_end() const { return code_begin() + VtableStubs::code_size_limit(is_vtable_stub()); }
address entry_point() const { return code_begin(); }
static int entry_offset() { return sizeof(class VtableStub); }
- bool matches(bool is_vtable_stub, int index) const {
- return _index == index && this->is_vtable_stub() == is_vtable_stub;
+ bool matches(bool is_vtable_stub, int index, bool caller_is_c1) const {
+ return _index == index && this->is_vtable_stub() == is_vtable_stub && _caller_is_c1 == caller_is_c1;
}
bool contains(address pc) const { return code_begin() <= pc && pc < code_end(); }
private:
void set_exception_points(address npe_addr, address ame_addr) {
public:
// Query
bool is_itable_stub() const { return _type == Type::itable_stub; }
bool is_vtable_stub() const { return _type == Type::vtable_stub; }
+ bool caller_is_c1() { return _caller_is_c1; }
bool is_abstract_method_error(address epc) { return epc == code_begin()+_ame_offset; }
bool is_null_pointer_exception(address epc) { return epc == code_begin()+_npe_offset; }
void print_on(outputStream* st) const;
void print() const;
< prev index next >