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

Unified Diff: test/mjsunit/compiler/regress-closures-with-eval.js

Issue 6910022: Replace long running loops by OptimizeFunctionOnNextCall in some tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 years, 8 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 | « test/mjsunit/closures.js ('k') | test/mjsunit/compiler/regress-intoverflow.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/regress-closures-with-eval.js
diff --git a/test/mjsunit/compiler/regress-closures-with-eval.js b/test/mjsunit/compiler/regress-closures-with-eval.js
index 507d74f33ea54f8028f446586b6e1a8a41e5d0b4..57afb1643efcdcf9ea3aef981769259a49e7d5fb 100644
--- a/test/mjsunit/compiler/regress-closures-with-eval.js
+++ b/test/mjsunit/compiler/regress-closures-with-eval.js
@@ -25,12 +25,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --allow-natives-syntax
+
// Verifies that closures in presence of eval work fine.
function withEval(expr, filter) {
function walk(v) {
for (var i in v) {
for (var i in v) {}
}
+ %OptimizeFunctionOnNextCall(filter);
return filter(v);
}
@@ -46,6 +49,8 @@ function makeTagInfoJSON(n) {
var expr = '([' + makeTagInfoJSON(128).join(', ') + '])'
-for (var n = 0; n < 300; n++) {
+for (var n = 0; n < 5; n++) {
withEval(expr, function(a) { return a; });
}
+%OptimizeFunctionOnNextCall(withEval);
+withEval(expr, function(a) { return a; });
« no previous file with comments | « test/mjsunit/closures.js ('k') | test/mjsunit/compiler/regress-intoverflow.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698