Reviewers: Sven Panne,

Message:
Sven: PTAL.

Danno: FYI.

Description:
Regression test for issue 2813 / r16008

BUG=v8:2813

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

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

Affected files:
  A + test/mjsunit/regress/regress-2813.js


Index: test/mjsunit/regress/regress-2813.js
diff --git a/test/mjsunit/regress/regress-171641.js b/test/mjsunit/regress/regress-2813.js
similarity index 89%
copy from test/mjsunit/regress/regress-171641.js
copy to test/mjsunit/regress/regress-2813.js
index 8db6781821325f8f6253eb2df4abb2b362b001c0..97ae43b316a2177596927cf5465fa2214cc11c61 100644
--- a/test/mjsunit/regress/regress-171641.js
+++ b/test/mjsunit/regress/regress-2813.js
@@ -27,14 +27,18 @@

 // Flags: --allow-natives-syntax

-function foo(k, p) {
-  for (var i = 0; i < 1; i++) {
-    p = Math.min(p, i);
+function foo(x) {
+  var a = x + 1;
+  var b = x + 2;
+  if (x != 0) {
+    if (x > 0 & x < 100) {
+      return a;
+    }
   }
-  m = Math.floor((k | 0) / p);
+  return 0;
 }

-foo(0, 1);
-foo(0, 1);
+assertEquals(0, foo(0));
+assertEquals(0, foo(0));
 %OptimizeFunctionOnNextCall(foo);
-foo(0, 1);
+assertEquals(3, foo(2));


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