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

Side by Side Diff: test/mjsunit/regress/regress-673242.js

Issue 2575333003: [Complier] Only optimize a function marked for tier-up if it is compiled. (Closed)
Patch Set: Created 4 years 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: --mark-shared-functions-for-tier-up --allow-natives-syntax --expose-g c
6
7 function foo() {
8 function bar() {
9 }
10 return bar;
11 }
12
13 // Mark bar's shared function info for tier-up
14 // (but don't optimize).
15 var bar = foo();
16 %OptimizeFunctionOnNextCall(bar);
17
18 // Avoid flushing foo (and thereby making bar's shared function info
19 // dead) by marking it to be optimized.
20 %OptimizeFunctionOnNextCall(foo);
21
22 // Throw away the JSFunction we have for bar and GC until its code has
23 // been flushed.
24 bar = null;
25 for (var i = 0; i < 6; i++) {
26 gc();
27 }
28
29 // Now create a new JSFunction from bar's shared function info and call it,
30 // we should not optimize without recompiling the baseline code.
31 foo()();
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