8140650: Method::is_accessor should cover getters and setters for all types

Reviewed-by: vlivanov, coleenp, sgehwolf
This commit is contained in:
Aleksey Shipilev 2015-11-11 01:27:36 +03:00
parent 6ed8c23581
commit ac09d8a135
8 changed files with 196 additions and 6 deletions

View file

@ -497,12 +497,15 @@ int CppInterpreter::accessor_entry(Method* method, intptr_t UNUSED, TRAPS) {
// 1: getfield
// 2: index
// 3: index
// 4: ireturn/areturn
// 4: ireturn/areturn/freturn/lreturn/dreturn
// NB this is not raw bytecode: index is in machine order
u1 *code = method->code_base();
assert(code[0] == Bytecodes::_aload_0 &&
code[1] == Bytecodes::_getfield &&
(code[4] == Bytecodes::_ireturn ||
code[4] == Bytecodes::_freturn ||
code[4] == Bytecodes::_lreturn ||
code[4] == Bytecodes::_dreturn ||
code[4] == Bytecodes::_areturn), "should do");
u2 index = Bytes::get_native_u2(&code[2]);