OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Flags: --allow-natives-syntax --harmony-tailcalls --ignition --turbo |
| 6 |
| 7 // The {f} function is compiled using TurboFan. |
| 8 // 1) The call to {Reflect.set} has no arguments adaptation. |
| 9 // 2) The call to {Reflect.set} is in tail position. |
| 10 function f(a, b, c) { |
| 11 "use strict"; |
| 12 return Reflect.set({}); |
| 13 } |
| 14 |
| 15 // The {g} function is compiled using Ignition. |
| 16 // 1) The call to {f} requires arguments adaptation. |
| 17 // 2) The call to {f} is not in tail position. |
| 18 function g() { |
| 19 return f() + "-no-tail"; |
| 20 } |
| 21 |
| 22 assertEquals("true-no-tail", g()); |
| 23 %OptimizeFunctionOnNextCall(f); |
| 24 assertEquals("true-no-tail", g()); |
OLD | NEW |