hotspot/src/share/vm/code/icBuffer.hpp
changeset 46620 750c6edff33b
parent 22234 da823d78ad65
child 46625 edefffab74e2
equal deleted inserted replaced
46619:a3919f5e8d2b 46620:750c6edff33b
    53                      CodeStrings strings)        { _size = size; _ic_site = NULL; }
    53                      CodeStrings strings)        { _size = size; _ic_site = NULL; }
    54   void    finalize(); // called when a method is removed
    54   void    finalize(); // called when a method is removed
    55 
    55 
    56   // General info
    56   // General info
    57   int     size() const                           { return _size; }
    57   int     size() const                           { return _size; }
    58   static  int code_size_to_size(int code_size)   { return round_to(sizeof(ICStub), CodeEntryAlignment) + code_size; }
    58   static  int code_size_to_size(int code_size)   { return align_up((int)sizeof(ICStub), CodeEntryAlignment) + code_size; }
    59 
    59 
    60  public:
    60  public:
    61   // Creation
    61   // Creation
    62   void set_stub(CompiledIC *ic, void* cached_value, address dest_addr);
    62   void set_stub(CompiledIC *ic, void* cached_value, address dest_addr);
    63 
    63 
    64   // Code info
    64   // Code info
    65   address code_begin() const                     { return (address)this + round_to(sizeof(ICStub), CodeEntryAlignment); }
    65   address code_begin() const                     { return (address)this + align_up(sizeof(ICStub), CodeEntryAlignment); }
    66   address code_end() const                       { return (address)this + size(); }
    66   address code_end() const                       { return (address)this + size(); }
    67 
    67 
    68   // Call site info
    68   // Call site info
    69   address ic_site() const                        { return _ic_site; }
    69   address ic_site() const                        { return _ic_site; }
    70   void    clear();
    70   void    clear();
    82   friend ICStub* ICStub_from_destination_address(address destination_address);
    82   friend ICStub* ICStub_from_destination_address(address destination_address);
    83 };
    83 };
    84 
    84 
    85 // ICStub Creation
    85 // ICStub Creation
    86 inline ICStub* ICStub_from_destination_address(address destination_address) {
    86 inline ICStub* ICStub_from_destination_address(address destination_address) {
    87   ICStub* stub = (ICStub*) (destination_address - round_to(sizeof(ICStub), CodeEntryAlignment));
    87   ICStub* stub = (ICStub*) (destination_address - align_up(sizeof(ICStub), CodeEntryAlignment));
    88   #ifdef ASSERT
    88   #ifdef ASSERT
    89   stub->verify();
    89   stub->verify();
    90   #endif
    90   #endif
    91   return stub;
    91   return stub;
    92 }
    92 }