comparison src/share/vm/code/vtableStubs.hpp @ 6275:957c266d8bc5

Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Tue, 21 Aug 2012 10:39:19 +0200
parents 1d7922586cf6
children da91efe96a93
comparison
equal deleted inserted replaced
5891:fd8832ae511d 6275:957c266d8bc5
53 _index(index), _ame_offset(-1), _npe_offset(-1) {} 53 _index(index), _ame_offset(-1), _npe_offset(-1) {}
54 VtableStub* next() const { return _next; } 54 VtableStub* next() const { return _next; }
55 int index() const { return _index; } 55 int index() const { return _index; }
56 static VMReg receiver_location() { return _receiver_location; } 56 static VMReg receiver_location() { return _receiver_location; }
57 void set_next(VtableStub* n) { _next = n; } 57 void set_next(VtableStub* n) { _next = n; }
58
59 public:
58 address code_begin() const { return (address)(this + 1); } 60 address code_begin() const { return (address)(this + 1); }
59 address code_end() const { return code_begin() + pd_code_size_limit(_is_vtable_stub); } 61 address code_end() const { return code_begin() + pd_code_size_limit(_is_vtable_stub); }
60 address entry_point() const { return code_begin(); } 62 address entry_point() const { return code_begin(); }
61 static int entry_offset() { return sizeof(class VtableStub); } 63 static int entry_offset() { return sizeof(class VtableStub); }
62 64
63 bool matches(bool is_vtable_stub, int index) const { 65 bool matches(bool is_vtable_stub, int index) const {
64 return _index == index && _is_vtable_stub == is_vtable_stub; 66 return _index == index && _is_vtable_stub == is_vtable_stub;
65 } 67 }
66 bool contains(address pc) const { return code_begin() <= pc && pc < code_end(); } 68 bool contains(address pc) const { return code_begin() <= pc && pc < code_end(); }
67 69
70 private:
68 void set_exception_points(address npe_addr, address ame_addr) { 71 void set_exception_points(address npe_addr, address ame_addr) {
69 _npe_offset = npe_addr - code_begin(); 72 _npe_offset = npe_addr - code_begin();
70 _ame_offset = ame_addr - code_begin(); 73 _ame_offset = ame_addr - code_begin();
71 assert(is_abstract_method_error(ame_addr), "offset must be correct"); 74 assert(is_abstract_method_error(ame_addr), "offset must be correct");
72 assert(is_null_pointer_exception(npe_addr), "offset must be correct"); 75 assert(is_null_pointer_exception(npe_addr), "offset must be correct");