Reviewers: jarin,

Description:
Add test that triggers liveness analysis bug.

[email protected]
BUG=

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

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+22, -0 lines):
  A test/mjsunit/compiler/deopt-liveness.js


Index: test/mjsunit/compiler/deopt-liveness.js
diff --git a/test/mjsunit/compiler/deopt-liveness.js b/test/mjsunit/compiler/deopt-liveness.js
new file mode 100644
index 0000000000000000000000000000000000000000..e18741d96e089c144678f833ebada65980322c29
--- /dev/null
+++ b/test/mjsunit/compiler/deopt-liveness.js
@@ -0,0 +1,22 @@
+// Copyright 2015 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
+
+function foo(x) {
+  %DeoptimizeFunction(run);
+  return x;
+}
+
+function run() {
+  var line = new Array(2);
+  for (var n = 3; n > 0; n = n - 1) {
+    if (n < foo(line.length)) line = new Array(n);
+    line[0] = n;
+  }
+}
+
+assertEquals(void 0, run());
+%OptimizeFunctionOnNextCall(run);
+assertEquals(void 0, run());


--
--
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/d/optout.

Reply via email to