Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 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: --turbo-deoptimization --allow-natives-syntax | |
| 6 | |
| 7 var a = function() { | |
| 8 return %GetCallerJSFunction(); | |
|
Sven Panne
2015/05/20 14:05:48
This will *always* call the runtime function, do y
danno
2015/05/22 11:21:35
Good catch. Will fix.
| |
| 9 } | |
| 10 var b = function() { | |
| 11 return a(); | |
| 12 } | |
| 13 assertEquals(b, b()); | |
| 14 | |
| 15 var c = function() { | |
| 16 return a(); | |
| 17 } | |
| 18 c(); | |
|
Michael Starzinger
2015/05/20 14:25:18
nit: Can we wrap all three calls to "c" into an as
danno
2015/05/22 11:21:35
Done.
| |
| 19 c(); | |
| 20 %SetForceInlineFlag(a); | |
| 21 %OptimizeFunctionOnNextCall(c); | |
| 22 c(); | |
| 23 | |
| 24 %SetForceInlineFlag(b); | |
| 25 var d = function() { | |
| 26 return b(); | |
| 27 } | |
| 28 d(); | |
|
Michael Starzinger
2015/05/20 14:25:18
nit: Likewise.
danno
2015/05/22 11:21:35
Done.
| |
| 29 d(); | |
| 30 %OptimizeFunctionOnNextCall(d); | |
| 31 d(); | |
| 32 assertEquals(b, d()); | |
| OLD | NEW |