OLD | NEW |
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 Loading... |
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 })(); |
OLD | NEW |