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

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

Issue 1928203002: [es8] More spec compliant syntactic tail calls implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar tests Created 4 years, 7 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
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-explicit-tailcalls --stack-size=100 5 // Flags: --allow-natives-syntax --harmony-explicit-tailcalls --stack-size=100
6 6
7 // 7 //
8 // Tail call normal functions. 8 // Tail call normal functions.
9 // 9 //
10 (function() { 10 (function() {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 var g_bound = g0.bind({}); 112 var g_bound = g0.bind({});
113 function f(n) { 113 function f(n) {
114 return continue f_bound(n); 114 return continue f_bound(n);
115 } 115 }
116 assertEquals("foo", f(1e5)); 116 assertEquals("foo", f(1e5));
117 assertEquals("bar", f(1e5 + 1)); 117 assertEquals("bar", f(1e5 + 1));
118 %OptimizeFunctionOnNextCall(f); 118 %OptimizeFunctionOnNextCall(f);
119 assertEquals("foo", f(1e5)); 119 assertEquals("foo", f(1e5));
120 assertEquals("bar", f(1e5 + 1)); 120 assertEquals("bar", f(1e5 + 1));
121 })(); 121 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698