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

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

Issue 11438042: Allow lazy compilation (and thus optimisation) of functions inside eval. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 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
« no previous file with comments | « src/scopes.cc ('k') | test/mjsunit/regress/regress-492.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-2315.js
diff --git a/test/mjsunit/regress/regress-110509.js b/test/mjsunit/regress/regress-2315.js
similarity index 91%
copy from test/mjsunit/regress/regress-110509.js
copy to test/mjsunit/regress/regress-2315.js
index 132bd233bee32f6c84061049224ea43901dae06a..a3f9182c95b5e0409443fa3bf6c3f8c5b8669902 100644
--- a/test/mjsunit/regress/regress-110509.js
+++ b/test/mjsunit/regress/regress-2315.js
@@ -27,15 +27,14 @@
// Flags: --allow-natives-syntax
-// Verify that LRandom preserves rsi correctly.
+var foo = (function() {
+ return eval("(function bar() { return 1; })");
+})();
-function foo() {
- Math.random();
- new Function("");
-}
-
-foo();
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();
+
+// Function should be optimized now.
+assertTrue(%GetOptimizationStatus(foo) != 2);
« no previous file with comments | « src/scopes.cc ('k') | test/mjsunit/regress/regress-492.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698