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

Side by Side Diff: test/mjsunit/regress/regress-unlink-closures-on-deopt.js

Issue 2730323002: [deoptimizer] When deoptimizing code, unlink all functions referring to that code. (Closed)
Patch Set: Fix typo Created 3 years, 9 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/runtime/runtime-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 2017 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 --noalways-opt
6
7 function foo() {
8 function g(o) {
9 return o.f;
10 }
11 return g;
12 }
13
14 let g1 = foo();
15 let g2 = foo();
16
17 g1({ f : 1});
18 g1({ f : 2});
19 g2({ f : 2});
20 g2({ f : 2});
21
22 %OptimizeFunctionOnNextCall(g1);
23 %OptimizeFunctionOnNextCall(g2);
24
25 g1({ f : 1});
26 g2({ f : 2});
27 g1({});
28
29 assertUnoptimized(g1);
30
31 // Deoptimization of g1 should also deoptimize g2 because they should share
32 // the optimized code object. (Unfortunately, this test bakes in various
33 // other assumptions about dealing with optimized code, and thus might break
34 // in future.)
35 assertUnoptimized(g2);
36
37 g2({});
OLDNEW
« no previous file with comments | « src/runtime/runtime-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698