Index: test/mjsunit/compiler/regress-4470-1.js |
diff --git a/test/mjsunit/compiler/regress-491578.js b/test/mjsunit/compiler/regress-4470-1.js |
similarity index 62% |
copy from test/mjsunit/compiler/regress-491578.js |
copy to test/mjsunit/compiler/regress-4470-1.js |
index c27570456c31e9a191fe1f4f1ea17b80f29de98e..91d26b7212d4ef6a7413bf7d19dcfa350fdf87ca 100644 |
--- a/test/mjsunit/compiler/regress-491578.js |
+++ b/test/mjsunit/compiler/regress-4470-1.js |
@@ -4,12 +4,13 @@ |
// Flags: --allow-natives-syntax |
-function foo(x) { |
- if (x === undefined) return; |
- while (true) { |
- while (1 || 2) { } |
- f(); |
- } |
+function Foo() {} |
+Foo.prototype.x = 0; |
+function foo(f) { |
+ f.x = 1; |
} |
+foo(new Foo); |
+foo(new Foo); |
%OptimizeFunctionOnNextCall(foo); |
-foo(); |
+foo(new Foo); |
+assertEquals(Foo.prototype.x, 0); |