Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 842953002: x64 port of r42717. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 42717)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -1928,11 +1928,19 @@
if (locs()->in(1).IsConstant()) {
__ StoreIntoObjectNoBarrier(instance_reg,
FieldAddress(instance_reg, offset_in_bytes_),
- locs()->in(1).constant(), PP);
+ locs()->in(1).constant(),
+ PP,
+ is_object_reference_initialization_ ?
+ Assembler::kEmptyOrSmiOrNull :
+ Assembler::kHeapObjectOrSmi);
} else {
Register value_reg = locs()->in(1).reg();
__ StoreIntoObjectNoBarrier(instance_reg,
- FieldAddress(instance_reg, offset_in_bytes_), value_reg);
+ FieldAddress(instance_reg, offset_in_bytes_),
+ value_reg,
+ is_object_reference_initialization_ ?
+ Assembler::kEmptyOrSmiOrNull :
+ Assembler::kHeapObjectOrSmi);
}
}
__ Bind(&skip_store);
@@ -2048,12 +2056,12 @@
// RAX: new object start as a tagged pointer.
// Store the type argument field.
- __ StoreIntoObjectNoBarrier(RAX,
+ __ InitializeFieldNoBarrier(RAX,
FieldAddress(RAX, Array::type_arguments_offset()),
kElemTypeReg);
// Set the length field.
- __ StoreIntoObjectNoBarrier(RAX,
+ __ InitializeFieldNoBarrier(RAX,
FieldAddress(RAX, Array::length_offset()),
kLengthReg);
@@ -2069,13 +2077,13 @@
if (array_size < (kInlineArraySize * kWordSize)) {
intptr_t current_offset = 0;
while (current_offset < array_size) {
- __ StoreIntoObjectNoBarrier(RAX, Address(RDI, current_offset), R12);
+ __ InitializeFieldNoBarrier(RAX, Address(RDI, current_offset), R12);
current_offset += kWordSize;
}
} else {
Label init_loop;
__ Bind(&init_loop);
- __ StoreIntoObjectNoBarrier(RAX, Address(RDI, 0), R12);
+ __ InitializeFieldNoBarrier(RAX, Address(RDI, 0), R12);
__ addq(RDI, Immediate(kWordSize));
__ cmpq(RDI, RCX);
__ j(BELOW, &init_loop, Assembler::kNearJump);

Powered by Google App Engine
This is Rietveld 408576698