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

Side by Side Diff: test/mjsunit/es6/tail-call-simple.js

Issue 1814433002: Revert of [crankshaft] Fixing ES6 tail call elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « test/mjsunit/es6/tail-call-megatest-shard9.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --allow-natives-syntax --harmony-tailcalls --stack-size=100 5 // Flags: --allow-natives-syntax --harmony-tailcalls --stack-size=100
6 // TODO(v8:4698), TODO(ishell): support these cases.
7 // Flags: --nostress-opt
6 8
7 // 9 //
8 // Tail calls work only in strict mode. 10 // Tail calls work only in strict mode.
9 // 11 //
10 (function() { 12 (function() {
11 function f(n) { 13 function f(n) {
12 if (n <= 0) { 14 if (n <= 0) {
13 return "foo"; 15 return "foo";
14 } 16 }
15 return f(n - 1); 17 return f(n - 1);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 var g_bound = g0.bind({}); 136 var g_bound = g0.bind({});
135 function f(n) { 137 function f(n) {
136 return f_bound(n); 138 return f_bound(n);
137 } 139 }
138 assertEquals("foo", f(1e5)); 140 assertEquals("foo", f(1e5));
139 assertEquals("bar", f(1e5 + 1)); 141 assertEquals("bar", f(1e5 + 1));
140 %OptimizeFunctionOnNextCall(f); 142 %OptimizeFunctionOnNextCall(f);
141 assertEquals("foo", f(1e5)); 143 assertEquals("foo", f(1e5));
142 assertEquals("bar", f(1e5 + 1)); 144 assertEquals("bar", f(1e5 + 1));
143 })(); 145 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/tail-call-megatest-shard9.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698