7106774: JSR 292: nightly test inlineMHTarget fails with wrong result

Thu, 03 Nov 2011 01:43:26 -0700

author
twisti
date
Thu, 03 Nov 2011 01:43:26 -0700
changeset 3251
e342a5110bed
parent 3250
71699e9d8673
child 3252
448691f285a5

7106774: JSR 292: nightly test inlineMHTarget fails with wrong result
Reviewed-by: kvn

src/share/vm/interpreter/bytecode.hpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/deoptimization.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/interpreter/bytecode.hpp	Mon Oct 31 15:52:11 2011 -0700
     1.2 +++ b/src/share/vm/interpreter/bytecode.hpp	Thu Nov 03 01:43:26 2011 -0700
     1.3 @@ -234,6 +234,13 @@
     1.4                                                            is_invokespecial()   ||
     1.5                                                            is_invokedynamic(); }
     1.6  
     1.7 +  bool is_method_handle_invoke() const {
     1.8 +    return (is_invokedynamic() ||
     1.9 +            (is_invokevirtual() &&
    1.10 +             method()->constants()->klass_ref_at_noresolve(index()) == vmSymbols::java_lang_invoke_MethodHandle() &&
    1.11 +             methodOopDesc::is_method_handle_invoke_name(name())));
    1.12 +  }
    1.13 +
    1.14    // Helper to skip verification.   Used is_valid() to check if the result is really an invoke
    1.15    inline friend Bytecode_invoke Bytecode_invoke_check(methodHandle method, int bci);
    1.16  };
     2.1 --- a/src/share/vm/runtime/deoptimization.cpp	Mon Oct 31 15:52:11 2011 -0700
     2.2 +++ b/src/share/vm/runtime/deoptimization.cpp	Thu Nov 03 01:43:26 2011 -0700
     2.3 @@ -388,12 +388,8 @@
     2.4    bool caller_was_method_handle = false;
     2.5    if (deopt_sender.is_interpreted_frame()) {
     2.6      methodHandle method = deopt_sender.interpreter_frame_method();
     2.7 -    Bytecode_invoke cur = Bytecode_invoke_check(method,
     2.8 -                                                deopt_sender.interpreter_frame_bci());
     2.9 -    if (cur.code() == Bytecodes::_invokedynamic ||
    2.10 -        (cur.code() == Bytecodes::_invokevirtual &&
    2.11 -         method->constants()->klass_ref_at_noresolve(cur.index()) == vmSymbols::java_lang_invoke_MethodHandle() &&
    2.12 -         methodOopDesc::is_method_handle_invoke_name(cur.name()))) {
    2.13 +    Bytecode_invoke cur = Bytecode_invoke_check(method, deopt_sender.interpreter_frame_bci());
    2.14 +    if (cur.is_method_handle_invoke()) {
    2.15        // Method handle invokes may involve fairly arbitrary chains of
    2.16        // calls so it's impossible to know how much actual space the
    2.17        // caller has for locals.

mercurial