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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 10876072: Use type propagation to eliminate store barriers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 11354)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -920,12 +920,12 @@
__ j(ABOVE_EQUAL, deopt);
// Note that index is Smi, i.e, times 4.
ASSERT(kSmiTagShift == 1);
- if (this->value()->BindsToConstant()) {
- // Compile time constants are Smi or allocated in the old space.
- __ movq(FieldAddress(receiver, index, TIMES_4, sizeof(RawArray)),
+ if (this->value()->NeedsStoreBuffer()) {
+ __ StoreIntoObject(receiver,
+ FieldAddress(receiver, index, TIMES_4, sizeof(RawArray)),
value);
} else {
- __ StoreIntoObject(receiver,
+ __ StoreIntoObjectNoBarrier(receiver,
FieldAddress(receiver, index, TIMES_4, sizeof(RawArray)),
value);
}
@@ -939,12 +939,12 @@
__ movq(temp, FieldAddress(receiver, GrowableObjectArray::data_offset()));
// Note that index is Smi, i.e, times 4.
ASSERT(kSmiTagShift == 1);
- if (this->value()->BindsToConstant()) {
- // Compile time constants are Smi or allocated in the old space.
- __ movq(FieldAddress(temp, index, TIMES_4, sizeof(RawArray)),
+ if (this->value()->NeedsStoreBuffer()) {
+ __ StoreIntoObject(temp,
+ FieldAddress(temp, index, TIMES_4, sizeof(RawArray)),
value);
} else {
- __ StoreIntoObject(temp,
+ __ StoreIntoObjectNoBarrier(temp,
FieldAddress(temp, index, TIMES_4, sizeof(RawArray)),
value);
}
@@ -1018,12 +1018,12 @@
ASSERT(ic_data() != NULL);
compiler->EmitClassChecksNoSmi(*ic_data(), instance_reg, temp_reg, deopt);
}
- if (this->value()->BindsToConstant()) {
- // Compile time constants are Smi or allocated in the old space.
- __ movq(FieldAddress(instance_reg, field().Offset()), value_reg);
- } else {
+ if (this->value()->NeedsStoreBuffer()) {
__ StoreIntoObject(instance_reg,
FieldAddress(instance_reg, field().Offset()), value_reg);
+ } else {
+ __ StoreIntoObjectNoBarrier(instance_reg,
+ FieldAddress(instance_reg, field().Offset()), value_reg);
}
}
@@ -1057,11 +1057,11 @@
ASSERT(locs()->out().reg() == value);
__ LoadObject(temp, field());
- if (this->value()->BindsToConstant()) {
- // Compile time constants are Smi or allocated in the old space.
- __ movq(FieldAddress(temp, Field::value_offset()), value);
+ if (this->value()->NeedsStoreBuffer()) {
+ __ StoreIntoObject(temp, FieldAddress(temp, Field::value_offset()), value);
} else {
- __ StoreIntoObject(temp, FieldAddress(temp, Field::value_offset()), value);
+ __ StoreIntoObjectNoBarrier(
+ temp, FieldAddress(temp, Field::value_offset()), value);
}
}
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698