Revision: 16146
Author:   [email protected]
Date:     Mon Aug 12 02:26:18 2013
Log:      Break typecheck dependency in escape analysis.

[email protected]

Review URL: https://chromiumcodereview.appspot.com/22803002
http://code.google.com/p/v8/source/detail?r=16146

Modified:
 /branches/bleeding_edge/src/hydrogen-escape-analysis.cc
 /branches/bleeding_edge/src/hydrogen-instructions.h

=======================================
--- /branches/bleeding_edge/src/hydrogen-escape-analysis.cc Fri Aug 9 08:18:23 2013 +++ /branches/bleeding_edge/src/hydrogen-escape-analysis.cc Mon Aug 12 02:26:18 2013
@@ -212,7 +212,14 @@
           if (mapcheck->value() != allocate) continue;
// TODO(mstarzinger): This approach breaks if the tracked map value
           // is not a HConstant. Find a repro test case and fix this.
+ for (HUseIterator it(mapcheck->uses()); !it.Done(); it.Advance()) {
+            if (!it.value()->IsLoadNamedField()) continue;
+            HLoadNamedField* load = HLoadNamedField::cast(it.value());
+            ASSERT(load->typecheck() == mapcheck);
+            load->ClearTypeCheck();
+          }
           ASSERT(mapcheck->HasNoUses());
+
           mapcheck->DeleteAndReplaceWith(NULL);
           break;
         }
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Fri Aug 9 08:18:23 2013 +++ /branches/bleeding_edge/src/hydrogen-instructions.h Mon Aug 12 02:26:18 2013
@@ -5568,6 +5568,7 @@
   }

   bool HasTypeCheck() const { return OperandAt(0) != OperandAt(1); }
+  void ClearTypeCheck() { SetOperandAt(1, object()); }
   HObjectAccess access() const { return access_; }
   Representation field_representation() const {
       return access_.representation();

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to