src/share/vm/opto/graphKit.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/opto/graphKit.cpp

src/share/vm/opto/graphKit.cpp

Print this page
rev 8008 : 8073866: Fix for 8064703 is not sufficient
Summary: side effects between allocation and arraycopy can be reexecuted, unreachable uninitialized array can be seen by GCs
Reviewed-by:

*** 2793,2814 **** * @param type type to cast the node to * @param not_null true if we know node cannot be null */ Node* GraphKit::maybe_cast_profiled_obj(Node* obj, ciKlass* type, ! bool not_null, ! SafePointNode* sfpt) { // type == NULL if profiling tells us this object is always null if (type != NULL) { Deoptimization::DeoptReason class_reason = Deoptimization::Reason_speculate_class_check; Deoptimization::DeoptReason null_reason = Deoptimization::Reason_speculate_null_check; - ciMethod* trap_method = (sfpt == NULL) ? method() : sfpt->jvms()->method(); - int trap_bci = (sfpt == NULL) ? bci() : sfpt->jvms()->bci(); if (!too_many_traps(null_reason) && !too_many_recompiles(null_reason) && ! !C->too_many_traps(trap_method, trap_bci, class_reason) && ! !C->too_many_recompiles(trap_method, trap_bci, class_reason)) { Node* not_null_obj = NULL; // not_null is true if we know the object is not null and // there's no need for a null check if (!not_null) { Node* null_ctl = top(); --- 2793,2811 ---- * @param type type to cast the node to * @param not_null true if we know node cannot be null */ Node* GraphKit::maybe_cast_profiled_obj(Node* obj, ciKlass* type, ! bool not_null) { // type == NULL if profiling tells us this object is always null if (type != NULL) { Deoptimization::DeoptReason class_reason = Deoptimization::Reason_speculate_class_check; Deoptimization::DeoptReason null_reason = Deoptimization::Reason_speculate_null_check; if (!too_many_traps(null_reason) && !too_many_recompiles(null_reason) && ! !too_many_traps(class_reason) && ! !too_many_recompiles(class_reason)) { Node* not_null_obj = NULL; // not_null is true if we know the object is not null and // there's no need for a null check if (!not_null) { Node* null_ctl = top();
*** 2820,2835 **** Node* exact_obj = not_null_obj; ciKlass* exact_kls = type; Node* slow_ctl = type_check_receiver(exact_obj, exact_kls, 1.0, &exact_obj); ! if (sfpt != NULL) { ! GraphKit kit(sfpt->jvms()); ! PreserveJVMState pjvms(&kit); ! kit.set_control(slow_ctl); ! kit.uncommon_trap_exact(class_reason, Deoptimization::Action_maybe_recompile); ! } else { PreserveJVMState pjvms(this); set_control(slow_ctl); uncommon_trap_exact(class_reason, Deoptimization::Action_maybe_recompile); } replace_in_map(not_null_obj, exact_obj); --- 2817,2827 ---- Node* exact_obj = not_null_obj; ciKlass* exact_kls = type; Node* slow_ctl = type_check_receiver(exact_obj, exact_kls, 1.0, &exact_obj); ! { PreserveJVMState pjvms(this); set_control(slow_ctl); uncommon_trap_exact(class_reason, Deoptimization::Action_maybe_recompile); } replace_in_map(not_null_obj, exact_obj);
src/share/vm/opto/graphKit.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File