Mercurial > hg > graal-compiler
comparison src/share/vm/code/vtableStubs.hpp @ 6266:1d7922586cf6
7023639: JSR 292 method handle invocation needs a fast path for compiled code
6984705: JSR 292 method handle creation should not go through JNI
Summary: remove assembly code for JDK 7 chained method handles
Reviewed-by: jrose, twisti, kvn, mhaupt
Contributed-by: John Rose <john.r.rose@oracle.com>, Christian Thalinger <christian.thalinger@oracle.com>, Michael Haupt <michael.haupt@oracle.com>
author | twisti |
---|---|
date | Tue, 24 Jul 2012 10:51:00 -0700 |
parents | c760f78e0a53 |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
6241:aba91a731143 | 6266:1d7922586cf6 |
---|---|
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"); |