< prev index next >

src/hotspot/share/code/vtableStubs.hpp

Print this page
@@ -86,27 +86,27 @@
    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 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 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();

@@ -125,17 +125,19 @@
    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
    bool           _is_vtable_stub;    // True if vtable stub, false, is 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),
-           _is_vtable_stub(is_vtable_stub) {}
+           _is_vtable_stub(is_vtable_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; }
  

@@ -143,12 +145,12 @@
    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 && _is_vtable_stub == is_vtable_stub;
+   bool matches(bool is_vtable_stub, int index, bool caller_is_c1) const {
+     return _index == index && _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) {

@@ -172,10 +174,11 @@
  
   public:
    // Query
    bool is_itable_stub()                          { return !_is_vtable_stub; }
    bool is_vtable_stub()                          { return  _is_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 >