changeset 46630 | 75aa3e39d02c |
parent 46620 | 750c6edff33b |
46629:8eeacdc76bf2 | 46630:75aa3e39d02c |
---|---|
1 /* |
1 /* |
2 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
582 ex_obj = env()->ArrayStoreException_instance(); |
582 ex_obj = env()->ArrayStoreException_instance(); |
583 } else { |
583 } else { |
584 ex_obj = env()->ClassCastException_instance(); |
584 ex_obj = env()->ClassCastException_instance(); |
585 } |
585 } |
586 break; |
586 break; |
587 default: |
|
588 break; |
|
587 } |
589 } |
588 if (failing()) { stop(); return; } // exception allocation might fail |
590 if (failing()) { stop(); return; } // exception allocation might fail |
589 if (ex_obj != NULL) { |
591 if (ex_obj != NULL) { |
590 // Cheat with a preallocated exception object. |
592 // Cheat with a preallocated exception object. |
591 if (C->log() != NULL) |
593 if (C->log() != NULL) |
819 ciMethod* cur_method = jvms->method(); |
821 ciMethod* cur_method = jvms->method(); |
820 int cur_bci = jvms->bci(); |
822 int cur_bci = jvms->bci(); |
821 if (cur_method != NULL && cur_bci != InvocationEntryBci) { |
823 if (cur_method != NULL && cur_bci != InvocationEntryBci) { |
822 Bytecodes::Code code = cur_method->java_code_at_bci(cur_bci); |
824 Bytecodes::Code code = cur_method->java_code_at_bci(cur_bci); |
823 return Interpreter::bytecode_should_reexecute(code) || |
825 return Interpreter::bytecode_should_reexecute(code) || |
824 is_anewarray && code == Bytecodes::_multianewarray; |
826 (is_anewarray && code == Bytecodes::_multianewarray); |
825 // Reexecute _multianewarray bytecode which was replaced with |
827 // Reexecute _multianewarray bytecode which was replaced with |
826 // sequence of [a]newarray. See Parse::do_multianewarray(). |
828 // sequence of [a]newarray. See Parse::do_multianewarray(). |
827 // |
829 // |
828 // Note: interpreter should not have it set since this optimization |
830 // Note: interpreter should not have it set since this optimization |
829 // is limited by dimensions and guarded by flag so in some cases |
831 // is limited by dimensions and guarded by flag so in some cases |
1104 case Bytecodes::_checkcast: assert(inputs == 1 && outputs == 1, ""); break; |
1106 case Bytecodes::_checkcast: assert(inputs == 1 && outputs == 1, ""); break; |
1105 case Bytecodes::_athrow: assert(inputs == 1 && outputs == 0, ""); break; |
1107 case Bytecodes::_athrow: assert(inputs == 1 && outputs == 0, ""); break; |
1106 case Bytecodes::_aload_0: assert(inputs == 0 && outputs == 1, ""); break; |
1108 case Bytecodes::_aload_0: assert(inputs == 0 && outputs == 1, ""); break; |
1107 case Bytecodes::_return: assert(inputs == 0 && outputs == 0, ""); break; |
1109 case Bytecodes::_return: assert(inputs == 0 && outputs == 0, ""); break; |
1108 case Bytecodes::_drem: assert(inputs == 4 && outputs == 2, ""); break; |
1110 case Bytecodes::_drem: assert(inputs == 4 && outputs == 2, ""); break; |
1111 default: break; |
|
1109 } |
1112 } |
1110 #endif //ASSERT |
1113 #endif //ASSERT |
1111 |
1114 |
1112 return true; |
1115 return true; |
1113 } |
1116 } |
1498 ld = LoadDNode::make_atomic(ctl, mem, adr, adr_type, t, mo, control_dependency, unaligned, mismatched); |
1501 ld = LoadDNode::make_atomic(ctl, mem, adr, adr_type, t, mo, control_dependency, unaligned, mismatched); |
1499 } else { |
1502 } else { |
1500 ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo, control_dependency, unaligned, mismatched); |
1503 ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo, control_dependency, unaligned, mismatched); |
1501 } |
1504 } |
1502 ld = _gvn.transform(ld); |
1505 ld = _gvn.transform(ld); |
1503 if ((bt == T_OBJECT) && C->do_escape_analysis() || C->eliminate_boxing()) { |
1506 if (((bt == T_OBJECT) && C->do_escape_analysis()) || C->eliminate_boxing()) { |
1504 // Improve graph before escape analysis and boxing elimination. |
1507 // Improve graph before escape analysis and boxing elimination. |
1505 record_for_igvn(ld); |
1508 record_for_igvn(ld); |
1506 } |
1509 } |
1507 return ld; |
1510 return ld; |
1508 } |
1511 } |
2022 } |
2025 } |
2023 break; |
2026 break; |
2024 case Deoptimization::Action_make_not_entrant: |
2027 case Deoptimization::Action_make_not_entrant: |
2025 C->set_trap_can_recompile(true); |
2028 C->set_trap_can_recompile(true); |
2026 break; |
2029 break; |
2027 #ifdef ASSERT |
|
2028 case Deoptimization::Action_none: |
2030 case Deoptimization::Action_none: |
2029 case Deoptimization::Action_make_not_compilable: |
2031 case Deoptimization::Action_make_not_compilable: |
2030 break; |
2032 break; |
2031 default: |
2033 default: |
2034 #ifdef ASSERT |
|
2032 fatal("unknown action %d: %s", action, Deoptimization::trap_action_name(action)); |
2035 fatal("unknown action %d: %s", action, Deoptimization::trap_action_name(action)); |
2036 #endif |
|
2033 break; |
2037 break; |
2034 #endif |
|
2035 } |
2038 } |
2036 |
2039 |
2037 if (TraceOptoParse) { |
2040 if (TraceOptoParse) { |
2038 char buf[100]; |
2041 char buf[100]; |
2039 tty->print_cr("Uncommon trap %s at bci:%d", |
2042 tty->print_cr("Uncommon trap %s at bci:%d", |