src/share/vm/opto/stringopts.cpp
Print this page
rev 3898 : 8005031: Some cleanup in c2 to prepare for incremental inlining support
Summary: collection of small changes to prepare for incremental inlining.
Reviewed-by:
*** 742,752 ****
--- 742,754 ----
if (n->is_Call()) {
CallNode* cn = n->as_Call();
ctrl_path.push(cn);
ctrl_path.push(cn->proj_out(0));
ctrl_path.push(cn->proj_out(0)->unique_out());
+ if (cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0) != NULL) {
ctrl_path.push(cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0));
+ }
} else {
ShouldNotReachHere();
}
}
*** 760,769 ****
--- 762,777 ----
ptr = ptr->in(0)->in(0)->in(0);
assert(ctrl_path.member(ptr), "should be a known piece of control");
} else if (ptr->is_IfTrue()) {
IfNode* iff = ptr->in(0)->as_If();
BoolNode* b = iff->in(1)->isa_Bool();
+
+ if (b == NULL) {
+ fail = true;
+ break;
+ }
+
Node* cmp = b->in(1);
Node* v1 = cmp->in(1);
Node* v2 = cmp->in(2);
Node* otherproj = iff->proj_out(1 - ptr->as_Proj()->_con);
*** 1406,1415 ****
--- 1414,1426 ----
C->record_for_igvn(overflow);
kit.uncommon_trap(Deoptimization::Reason_intrinsic,
Deoptimization::Action_make_not_entrant);
}
+ Node* result;
+ if (!kit.stopped()) {
+
// length now contains the number of characters needed for the
// char[] so create a new AllocateArray for the char[]
Node* char_array = NULL;
{
PreserveReexecuteState preexecs(&kit);
*** 1454,1464 ****
ShouldNotReachHere();
}
}
// If we're not reusing an existing String allocation then allocate one here.
! Node* result = sc->string_alloc();
if (result == NULL) {
PreserveReexecuteState preexecs(&kit);
// The original jvms is for an allocation of either a String or
// StringBuffer so no stack adjustment is necessary for proper
// reexecution.
--- 1465,1475 ----
ShouldNotReachHere();
}
}
// If we're not reusing an existing String allocation then allocate one here.
! result = sc->string_alloc();
if (result == NULL) {
PreserveReexecuteState preexecs(&kit);
// The original jvms is for an allocation of either a String or
// StringBuffer so no stack adjustment is necessary for proper
// reexecution.
*** 1470,1480 ****
if (java_lang_String::has_offset_field()) {
kit.store_String_offset(kit.control(), result, __ intcon(0));
kit.store_String_length(kit.control(), result, length);
}
kit.store_String_value(kit.control(), result, char_array);
!
// hook up the outgoing control and result
kit.replace_call(sc->end(), result);
// Unhook any hook nodes
string_sizes->disconnect_inputs(NULL, C);
--- 1481,1493 ----
if (java_lang_String::has_offset_field()) {
kit.store_String_offset(kit.control(), result, __ intcon(0));
kit.store_String_length(kit.control(), result, length);
}
kit.store_String_value(kit.control(), result, char_array);
! } else {
! result = C->top();
! }
// hook up the outgoing control and result
kit.replace_call(sc->end(), result);
// Unhook any hook nodes
string_sizes->disconnect_inputs(NULL, C);