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

Unified Diff: src/hydrogen-check-elimination.cc

Issue 292993003: Revert "Refactor transitioning stores." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | « src/hydrogen.cc ('k') | src/hydrogen-escape-analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-check-elimination.cc
diff --git a/src/hydrogen-check-elimination.cc b/src/hydrogen-check-elimination.cc
index c4e24e246edf6fafa2d18d4d673232931e1622cd..f3c5cbe151e3e7e1615834bf3834927158e03f78 100644
--- a/src/hydrogen-check-elimination.cc
+++ b/src/hydrogen-check-elimination.cc
@@ -451,7 +451,15 @@ class HCheckTable : public ZoneObject {
void ReduceStoreNamedField(HStoreNamedField* instr) {
HValue* object = instr->object()->ActualValue();
- if (instr->access().IsMap()) {
+ if (instr->has_transition()) {
+ // This store transitions the object to a new map.
+ Kill(object);
+ HConstant* c_transition = HConstant::cast(instr->transition());
+ HCheckTableEntry::State state = c_transition->HasStableMapValue()
+ ? HCheckTableEntry::CHECKED_STABLE
+ : HCheckTableEntry::CHECKED;
+ Insert(object, NULL, c_transition->MapValue(), state);
+ } else if (instr->access().IsMap()) {
// This is a store directly to the map field of the object.
Kill(object);
if (!instr->value()->IsConstant()) return;
@@ -706,7 +714,7 @@ class HCheckMapsEffects : public ZoneObject {
switch (instr->opcode()) {
case HValue::kStoreNamedField: {
HStoreNamedField* store = HStoreNamedField::cast(instr);
- if (store->access().IsMap()) {
+ if (store->access().IsMap() || store->has_transition()) {
objects_.Add(store->object(), zone);
}
break;
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-escape-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698