Index: test/mjsunit/function-var.js |
diff --git a/test/mjsunit/compiler/regress-loop-variable-unsigned.js b/test/mjsunit/function-var.js |
similarity index 50% |
copy from test/mjsunit/compiler/regress-loop-variable-unsigned.js |
copy to test/mjsunit/function-var.js |
index 751136eb131f53a3dc2daa01eba734eef643f51f..607cbe730eada659b8f00eb73279b9039ae071d8 100644 |
--- a/test/mjsunit/compiler/regress-loop-variable-unsigned.js |
+++ b/test/mjsunit/function-var.js |
@@ -2,22 +2,22 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-// Flags: --turbo-loop-variable |
- |
(function() { |
function f() { |
- for (var i = 0; i < 4294967295; i += 2) { |
- if (i === 10) break; |
+ { |
+ function f() { return 42 } |
} |
+ function g() { return f } |
+ return g; |
} |
- f(); |
+ |
+ var g = f(); |
+ var inner_f = g(); |
+ assertEquals(42, inner_f()); |
})(); |
(function() { |
- function f() { |
- for (var i = 0; i < 4294967293; i += 2) { |
- if (i === 10) break; |
- } |
- } |
- f(); |
+ var y = 100; |
+ var z = (function y() { return y; }); |
+ assertEquals(z, z()); |
})(); |