diff --git a/src/cpu/zero/vm/cppInterpreter_zero.cpp b/src/cpu/zero/vm/cppInterpreter_zero.cpp --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -497,12 +497,15 @@ // 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]); diff --git a/src/share/vm/interpreter/interpreter.cpp b/src/share/vm/interpreter/interpreter.cpp --- a/src/share/vm/interpreter/interpreter.cpp +++ b/src/share/vm/interpreter/interpreter.cpp @@ -300,10 +300,10 @@ } // Accessor method? - if (m->is_simple_getter()) { - // TODO: We should have used ::is_accessor above, but fast accessors in Zero expect only getters - // with a|i_return. See CppInterpreter::accessor_entry in cppInterpreter_zero.cpp. This should be - // fixed in Zero, then the call above updated to ::is_accessor, and ::is_simple_getter removed. + if (m->is_getter()) { + // TODO: We should have used ::is_accessor above, but fast accessors in Zero expect only getters. + // See CppInterpreter::accessor_entry in cppInterpreter_zero.cpp. This should be fixed in Zero, + // then the call above updated to ::is_accessor assert(m->size_of_parameters() == 1, "fast code for accessors assumes parameter size = 1"); return accessor; } diff --git a/src/share/vm/oops/method.cpp b/src/share/vm/oops/method.cpp --- a/src/share/vm/oops/method.cpp +++ b/src/share/vm/oops/method.cpp @@ -621,16 +621,6 @@ return true; } -bool Method::is_simple_getter() const { - if (code_size() != 5) return false; - if (size_of_parameters() != 1) return false; - if (java_code_at(0) != Bytecodes::_aload_0 ) return false; - if (java_code_at(1) != Bytecodes::_getfield) return false; - if (java_code_at(4) != Bytecodes::_areturn && - java_code_at(4) != Bytecodes::_ireturn ) return false; - return true; -} - bool Method::is_constant_getter() const { int last_index = code_size() - 1; // Check if the first 1-3 bytecodes are a constant push diff --git a/src/share/vm/oops/method.hpp b/src/share/vm/oops/method.hpp --- a/src/share/vm/oops/method.hpp +++ b/src/share/vm/oops/method.hpp @@ -601,9 +601,6 @@ // returns true if the method is a setter bool is_setter() const; - // returns true if the method is a simple getter function: returns int/reference - bool is_simple_getter() const; - // returns true if the method does nothing but return a constant of primitive type bool is_constant_getter() const;