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

Side by Side Diff: test/mjsunit/regress/regress-crbug-635923.js

Issue 2278543002: [compiler] Make Compiler::EnsureBytecode not switch tiers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 4 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
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 --ignition --turbo-from-bytecode --turbo-filter =f
6
7 function f(x) { return x + 23 }
8 function g(x) { return f(x) + 42 }
9
10 assertEquals(23, f(0));
11 assertEquals(24, f(1));
12 assertEquals(67, g(2));
13 assertEquals(68, g(3));
14
15 // Optimize {g} with Crankshaft, causing {f} to be inlined.
16 %OptimizeFunctionOnNextCall(g);
17 assertEquals(65, g(0));
18
19 // Optimize {f} with Turbofan, after it has been inlined.
20 %OptimizeFunctionOnNextCall(f);
21 assertEquals(23, f(0));
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698