--- old/src/share/vm/opto/parse1.cpp 2017-07-25 14:58:48.367764291 +0200 +++ new/src/share/vm/opto/parse1.cpp 2017-07-25 14:58:43.386774679 +0200 @@ -818,53 +818,6 @@ } } -// Helper function to create a ValueTypeNode from its fields passed as -// arguments. Fields are passed in order of increasing offsets. -Node* Compile::create_vt_node(Node* n, ciValueKlass* vk, ciValueKlass* base_vk, int base_offset, int base_input, bool in) { - assert(base_offset >= 0, "offset in value type always positive"); - PhaseGVN& gvn = *initial_gvn(); - ValueTypeNode* vt = ValueTypeNode::make(gvn, vk); - for (uint i = 0; i < vt->field_count(); i++) { - ciType* field_type = vt->field_type(i); - int offset = base_offset + vt->field_offset(i) - (base_offset > 0 ? vk->first_field_offset() : 0); - if (field_type->is_valuetype()) { - ciValueKlass* embedded_vk = field_type->as_value_klass(); - Node* embedded_vt = create_vt_node(n, embedded_vk, base_vk, offset, base_input, in); - vt->set_field_value(i, embedded_vt); - } else { - int j = 0; int extra = 0; - for (; j < base_vk->nof_nonstatic_fields(); j++) { - ciField* f = base_vk->nonstatic_field_at(j); - if (offset == f->offset()) { - assert(f->type() == field_type, "inconsistent field type"); - break; - } - BasicType bt = f->type()->basic_type(); - if (bt == T_LONG || bt == T_DOUBLE) { - extra++; - } - } - assert(j != base_vk->nof_nonstatic_fields(), "must find"); - Node* parm = NULL; - if (n->is_Start()) { - assert(in, "return from start?"); - parm = gvn.transform(new ParmNode(n->as_Start(), base_input + j + extra)); - } else { - if (in) { - assert(n->is_Call(), "nothing else here"); - parm = n->in(base_input + j + extra); - } else { - parm = gvn.transform(new ProjNode(n->as_Call(), base_input + j + extra)); - } - } - vt->set_field_value(i, parm); - // Record all these guys for later GVN. - record_for_igvn(parm); - } - } - return gvn.transform(vt); -} - //----------------------------build_start_state------------------------------- // Construct a state which contains only the incoming arguments from an // unknown caller. The method & bci will be NULL & InvocationEntryBci. @@ -903,7 +856,7 @@ const Type* t = tf->domain_sig()->field_at(i); if (t->isa_valuetypeptr() && t->is_valuetypeptr()->klass() != C->env()->___Value_klass()) { ciValueKlass* vk = t->is_valuetypeptr()->value_type()->value_klass(); - Node* vt = create_vt_node(start, vk, vk, 0, j, true); + Node* vt = ValueTypeNode::make(gvn, start, vk, j, true); map->init_req(i, gvn.transform(vt)); j += vk->value_arg_slots(); } else {