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

Unified Diff: runtime/vm/intermediate_language_ia32.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.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 11354)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -901,12 +901,12 @@
__ j(ABOVE_EQUAL, deopt);
// Note that index is Smi, i.e, times 2.
ASSERT(kSmiTagShift == 1);
- if (this->value()->BindsToConstant()) {
- // Compile time constants are Smi or allocated in the old space.
- __ movl(FieldAddress(receiver, index, TIMES_2, sizeof(RawArray)),
+ if (this->value()->NeedsStoreBuffer()) {
+ __ StoreIntoObject(receiver,
+ FieldAddress(receiver, index, TIMES_2, sizeof(RawArray)),
value);
} else {
- __ StoreIntoObject(receiver,
+ __ StoreIntoObjectNoBarrier(receiver,
FieldAddress(receiver, index, TIMES_2, sizeof(RawArray)),
value);
}
@@ -919,12 +919,12 @@
__ movl(temp, FieldAddress(receiver, GrowableObjectArray::data_offset()));
// Note that index is Smi, i.e, times 2.
ASSERT(kSmiTagShift == 1);
- if (this->value()->BindsToConstant()) {
- // Compile time constants are Smi or allocated in the old space.
- __ movl(FieldAddress(temp, index, TIMES_2, sizeof(RawArray)),
+ if (this->value()->NeedsStoreBuffer()) {
+ __ StoreIntoObject(temp,
+ FieldAddress(temp, index, TIMES_2, sizeof(RawArray)),
value);
} else {
- __ StoreIntoObject(temp,
+ __ StoreIntoObjectNoBarrier(temp,
FieldAddress(temp, index, TIMES_2, sizeof(RawArray)),
value);
}
@@ -998,12 +998,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.
- __ movl(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);
}
}
@@ -1037,11 +1037,11 @@
ASSERT(locs()->out().reg() == value);
__ LoadObject(temp, field());
- if (this->value()->BindsToConstant()) {
- // Compile time constants are Smi or allocated in the old space.
- __ movl(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.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698