Reviewers: mvstanton,

Message:
PTAL.

Description:
Let HTransitionElementsKind take part in RestoreActualValues phase

BUG=chromium:349853
LOG=n

Please review this at https://codereview.chromium.org/183753005/

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

Affected files (+23, -0 lines):
  M src/hydrogen-instructions.h
  A test/mjsunit/regress/regress-crbug-349853.js


Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 3712dc769a01e5719048f5e56eef153fb2c827dd..5aedf46a9ba291be2cb446d6f41f35950dda20c3 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -6885,6 +6885,8 @@ class HTransitionElementsKind V8_FINAL : public HTemplateInstruction<2> {
            transitioned_map_ == instr->transitioned_map_;
   }

+  virtual int RedefinedOperandIndex() { return 0; }
+
  private:
   HTransitionElementsKind(HValue* context,
                           HValue* object,
Index: test/mjsunit/regress/regress-crbug-349853.js
diff --git a/test/mjsunit/regress/regress-crbug-349853.js b/test/mjsunit/regress/regress-crbug-349853.js
new file mode 100644
index 0000000000000000000000000000000000000000..53af64c9d028d37d051fe559e7ee36554f93db8c
--- /dev/null
+++ b/test/mjsunit/regress/regress-crbug-349853.js
@@ -0,0 +1,21 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var a = ["string"];
+function funky(array) { return array[0] = 1; }
+funky(a);
+
+function crash() {
+  var q = [0];
+  // The failing ASSERT was only triggered when compiling for OSR.
+  for (var i = 0; i < 100000; i++) {
+    funky(q);
+  }
+  q[0] = 0;
+  funky(q)
+}
+
+crash();


--
--
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