< prev index next >

src/share/vm/opto/macroArrayCopy.cpp

Print this page
rev 8961 : [mq]: diff-shenandoah.patch


 530 
 531       // (At this point we can assume disjoint_bases, since types differ.)
 532       int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset());
 533       Node* p1 = basic_plus_adr(dest_klass, ek_offset);
 534       Node* n1 = LoadKlassNode::make(_igvn, NULL, C->immutable_memory(), p1, TypeRawPtr::BOTTOM);
 535       Node* dest_elem_klass = transform_later(n1);
 536       Node* cv = generate_checkcast_arraycopy(&local_ctrl, &local_mem,
 537                                               adr_type,
 538                                               dest_elem_klass,
 539                                               src, src_offset, dest, dest_offset,
 540                                               ConvI2X(copy_length), dest_uninitialized);
 541       if (cv == NULL)  cv = intcon(-1);  // failure (no stub available)
 542       checked_control = local_ctrl;
 543       checked_i_o     = *io;
 544       checked_mem     = local_mem->memory_at(alias_idx);
 545       checked_value   = cv;
 546     }
 547     // At this point we know we do not need type checks on oop stores.
 548 
 549     // Let's see if we need card marks:
 550     if (alloc != NULL && GraphKit::use_ReduceInitialCardMarks()) {
 551       // If we do not need card marks, copy using the jint or jlong stub.
 552       copy_type = LP64_ONLY(UseCompressedOops ? T_INT : T_LONG) NOT_LP64(T_INT);
 553       assert(type2aelembytes(basic_elem_type) == type2aelembytes(copy_type),
 554              "sizes agree");
 555     }
 556   }
 557 
 558   if (!(*ctrl)->is_top()) {
 559     // Generate the fast path, if possible.
 560     Node* local_ctrl = *ctrl;
 561     MergeMemNode* local_mem = MergeMemNode::make(mem);
 562     transform_later(local_mem);
 563 
 564     generate_unchecked_arraycopy(&local_ctrl, &local_mem,
 565                                  adr_type, copy_type, disjoint_bases,
 566                                  src, src_offset, dest, dest_offset,
 567                                  ConvI2X(copy_length), dest_uninitialized);
 568 
 569     // Present the results of the fast call.
 570     result_region->init_req(fast_path, local_ctrl);




 530 
 531       // (At this point we can assume disjoint_bases, since types differ.)
 532       int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset());
 533       Node* p1 = basic_plus_adr(dest_klass, ek_offset);
 534       Node* n1 = LoadKlassNode::make(_igvn, NULL, C->immutable_memory(), p1, TypeRawPtr::BOTTOM);
 535       Node* dest_elem_klass = transform_later(n1);
 536       Node* cv = generate_checkcast_arraycopy(&local_ctrl, &local_mem,
 537                                               adr_type,
 538                                               dest_elem_klass,
 539                                               src, src_offset, dest, dest_offset,
 540                                               ConvI2X(copy_length), dest_uninitialized);
 541       if (cv == NULL)  cv = intcon(-1);  // failure (no stub available)
 542       checked_control = local_ctrl;
 543       checked_i_o     = *io;
 544       checked_mem     = local_mem->memory_at(alias_idx);
 545       checked_value   = cv;
 546     }
 547     // At this point we know we do not need type checks on oop stores.
 548 
 549     // Let's see if we need card marks:
 550     if (alloc != NULL && GraphKit::use_ReduceInitialCardMarks() && ! UseShenandoahGC) {
 551       // If we do not need card marks, copy using the jint or jlong stub.
 552       copy_type = LP64_ONLY(UseCompressedOops ? T_INT : T_LONG) NOT_LP64(T_INT);
 553       assert(type2aelembytes(basic_elem_type) == type2aelembytes(copy_type),
 554              "sizes agree");
 555     }
 556   }
 557 
 558   if (!(*ctrl)->is_top()) {
 559     // Generate the fast path, if possible.
 560     Node* local_ctrl = *ctrl;
 561     MergeMemNode* local_mem = MergeMemNode::make(mem);
 562     transform_later(local_mem);
 563 
 564     generate_unchecked_arraycopy(&local_ctrl, &local_mem,
 565                                  adr_type, copy_type, disjoint_bases,
 566                                  src, src_offset, dest, dest_offset,
 567                                  ConvI2X(copy_length), dest_uninitialized);
 568 
 569     // Present the results of the fast call.
 570     result_region->init_req(fast_path, local_ctrl);


< prev index next >