Reviewers: Jakob,

Description:
Fix map check removal issue in r13488.

The removal of HCheckMaps is invalid when the instruction has a virtual
usage, which can happen e.g. for HLoadElements or HJSArrayLength.

[email protected]
TEST=webkit:fast/js/regress/Float32Array-matrix-mult.html


Please review this at https://chromiumcodereview.appspot.com/12033073/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/hydrogen-instructions.cc


Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 9c808c78f2e74e5f94649a5e0b9b369d82b38607..0bf208b733b48514c6c5468376c2ee8a66122c15 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -1173,7 +1173,7 @@ void HCheckMaps::SetSideEffectDominator(GVNFlag side_effect,
   // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once
   // type information is rich enough we should generalize this to any HType
   // for which the map is known.
-  if (dominator->IsStoreNamedField()) {
+  if (HasNoUses() && dominator->IsStoreNamedField()) {
     HStoreNamedField* store = HStoreNamedField::cast(dominator);
     Handle<Map> map = store->transition();
     if (map.is_null() || store->object() != value()) return;


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev


Reply via email to