diff options
author | kvn <none@none> | 2010-02-12 15:27:36 -0800 |
---|---|---|
committer | kvn <none@none> | 2010-02-12 15:27:36 -0800 |
commit | 5f7269d8063a500d3c63c4376250a9c0d42e26b3 (patch) | |
tree | a0ecf920364c570987bb33afe99c70771bebf6fa /src/share/vm/opto/graphKit.cpp | |
parent | 6d82830906c576b8d0c35fe3009846468bce0851 (diff) | |
parent | 362fea2bff5f92e417d2f2f28416cf19aa6e46d0 (diff) |
Merge
Diffstat (limited to 'src/share/vm/opto/graphKit.cpp')
-rw-r--r-- | src/share/vm/opto/graphKit.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/share/vm/opto/graphKit.cpp b/src/share/vm/opto/graphKit.cpp index d70fe1eef..3d5505514 100644 --- a/src/share/vm/opto/graphKit.cpp +++ b/src/share/vm/opto/graphKit.cpp @@ -780,12 +780,20 @@ bool GraphKit::dead_locals_are_killed() { // Helper function for enforcing certain bytecodes to reexecute if // deoptimization happens -static bool should_reexecute_implied_by_bytecode(JVMState *jvms) { +static bool should_reexecute_implied_by_bytecode(JVMState *jvms, bool is_anewarray) { ciMethod* cur_method = jvms->method(); int cur_bci = jvms->bci(); if (cur_method != NULL && cur_bci != InvocationEntryBci) { Bytecodes::Code code = cur_method->java_code_at_bci(cur_bci); - return Interpreter::bytecode_should_reexecute(code); + return Interpreter::bytecode_should_reexecute(code) || + is_anewarray && code == Bytecodes::_multianewarray; + // Reexecute _multianewarray bytecode which was replaced with + // sequence of [a]newarray. See Parse::do_multianewarray(). + // + // Note: interpreter should not have it set since this optimization + // is limited by dimensions and guarded by flag so in some cases + // multianewarray() runtime calls will be generated and + // the bytecode should not be reexecutes (stack will not be reset). } else return false; } @@ -836,7 +844,7 @@ void GraphKit::add_safepoint_edges(SafePointNode* call, bool must_throw) { // For a known set of bytecodes, the interpreter should reexecute them if // deoptimization happens. We set the reexecute state for them here if (out_jvms->is_reexecute_undefined() && //don't change if already specified - should_reexecute_implied_by_bytecode(out_jvms)) { + should_reexecute_implied_by_bytecode(out_jvms, call->is_AllocateArray())) { out_jvms->set_should_reexecute(true); //NOTE: youngest_jvms not changed } |