src/share/vm/opto/graphKit.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/graphKit.cpp Fri Jun 16 14:34:20 2017
--- new/src/share/vm/opto/graphKit.cpp Fri Jun 16 14:34:20 2017
*** 578,588 ****
--- 578,588 ----
break;
case Deoptimization::Reason_range_check:
ex_obj = env()->ArrayIndexOutOfBoundsException_instance();
break;
case Deoptimization::Reason_class_check:
! if (java_bc() == Bytecodes::_aastore || java_bc() == Bytecodes::_vastore) {
ex_obj = env()->ArrayStoreException_instance();
} else {
ex_obj = env()->ClassCastException_instance();
}
break;
*** 2639,2655 ****
--- 2639,2649 ----
Node* GraphKit::type_check_receiver(Node* receiver, ciKlass* klass,
float prob,
Node* *casted_receiver) {
const TypeKlassPtr* tklass = TypeKlassPtr::make(klass);
Node* recv_klass = load_object_klass(receiver);
! Node* want_klass = makecon(tklass);
Node* cmp = _gvn.transform( new CmpPNode(recv_klass, want_klass) );
Node* bol = _gvn.transform( new BoolNode(cmp, BoolTest::eq) );
IfNode* iff = create_and_xform_if(control(), bol, prob, COUNT_UNKNOWN);
set_control( _gvn.transform( new IfTrueNode (iff) ));
Node* fail = _gvn.transform( new IfFalseNode(iff) );
! Node* fail = type_check(recv_klass, tklass, prob);
const TypeOopPtr* recv_xtype = tklass->as_instance_type();
assert(recv_xtype->klass_is_exact(), "");
// Subsume downstream occurrences of receiver with a cast to
// recv_xtype, since now we know what the type will be.
*** 2658,2667 ****
--- 2652,2673 ----
// (User must make the replace_in_map call.)
return fail;
}
+ Node* GraphKit::type_check(Node* recv_klass, const TypeKlassPtr* tklass,
+ float prob) {
+ //const TypeKlassPtr* tklass = TypeKlassPtr::make(klass);
+ Node* want_klass = makecon(tklass);
+ Node* cmp = _gvn.transform( new CmpPNode(recv_klass, want_klass));
+ Node* bol = _gvn.transform( new BoolNode(cmp, BoolTest::eq) );
+ IfNode* iff = create_and_xform_if(control(), bol, prob, COUNT_UNKNOWN);
+ set_control( _gvn.transform( new IfTrueNode (iff)));
+ Node* fail = _gvn.transform( new IfFalseNode(iff));
+ return fail;
+ }
+
//------------------------------seems_never_null-------------------------------
// Use null_seen information if it is available from the profile.
// If we see an unexpected null at a type check we record it and force a
// recompile; the offending check will be recompiled to handle NULLs.
*** 3395,3405 ****
--- 3401,3411 ----
return set_output_for_allocation(alloc, oop_type, deoptimize_on_exception);
}
//-------------------------------new_array-------------------------------------
! // helper for newarray, anewarray and vnewarray
! // helper for newarray and anewarray
// The 'length' parameter is (obviously) the length of the array.
// See comments on new_instance for the meaning of the other arguments.
Node* GraphKit::new_array(Node* klass_node, // array klass (maybe variable)
Node* length, // number of array elements
int nargs, // number of arguments to push back for uncommon trap
src/share/vm/opto/graphKit.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File