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

Side by Side Diff: test/mjsunit/get-caller-js-function.js

Issue 1146963002: Add %GetCallerJSFunction intrinsic (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merge with ToT Created 5 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
(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());
OLDNEW
« src/compiler/simplified-lowering.cc ('K') | « src/runtime/runtime-internal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698