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

Unified Diff: test/mjsunit/regress/regress-540.js

Issue 469006: The toplevel code generator assumed that declarations did not shadow... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years 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
« src/ia32/fast-codegen-ia32.cc ('K') | « src/x64/fast-codegen-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-540.js
===================================================================
--- test/mjsunit/regress/regress-540.js (revision 3424)
+++ test/mjsunit/regress/regress-540.js (working copy)
@@ -29,6 +29,19 @@
// See http://code.google.com/p/v8/issues/detail?id=540
function f(x, y) { eval(x); return y(); }
-assertEquals(1, f("function y() { return 1; }",
- function () { return 0; }));
+var result = f("function y() { return 1; }", function () { return 0; })
+assertEquals(1, result);
+result =
+ (function (x) {
fschneider 2009/12/07 13:09:01 This function won't hit the top-level compiler. Yo
+ function x() { return 3; }
+ return x();
+ })(function () { return 2; });
+assertEquals(3, result);
+
+result =
+ (function (x) {
+ function x() { return 5; }
+ return arguments[0]();
+ })(function () { return 4; });
+assertEquals(4, result);
« src/ia32/fast-codegen-ia32.cc ('K') | « src/x64/fast-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698