Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: test/mjsunit/function-var.js

Issue 2274133002: Add function-var to variables_ so LookupRecursive doesn't need to special-case it (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
})();
« no previous file with comments | « src/parsing/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698