Skip to content

Commit a8a9562

Browse files
committed
deps: V8: cherry-pick abb4d0a431c0
Original commit message: Merged: [turbofan] Fix bug in inlining Revision: 219b28bfe2ea76de63f034eb75b67e8ded339d94 BUG=chromium:1127319 NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true [email protected] Change-Id: I98e77bac81e2cf822a4a4987115e0cf01b1dbc52 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2416383 Reviewed-by: Tobias Tebbi <[email protected]> Commit-Queue: Georg Neis <[email protected]> Cr-Commit-Position: refs/branch-heads/8.6@{#12} Cr-Branched-From: a64aed2333abf49e494d2a5ce24bbd14fff19f60-refs/heads/8.6.395@{#1} Cr-Branched-From: a626bc036236c9bf92ac7b87dc40c9e538b087e3-refs/heads/master@{#69472} Refs: v8/v8@abb4d0a
1 parent 8e9415c commit a8a9562

File tree

3 files changed

+44
-5
lines changed

3 files changed

+44
-5
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.31',
39+
'v8_embedder_string': '-node.32',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/compiler/js-inlining-heuristic.cc

+3-4
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,9 @@ void JSInliningHeuristic::Finalize() {
259259
Candidate candidate = *i;
260260
candidates_.erase(i);
261261

262-
// Make sure we don't try to inline dead candidate nodes.
263-
if (candidate.node->IsDead()) {
264-
continue;
265-
}
262+
// Ignore this candidate if it's no longer valid.
263+
if (!IrOpcode::IsInlineeOpcode(candidate.node->opcode())) continue;
264+
if (candidate.node->IsDead()) continue;
266265

267266
// Make sure we have some extra budget left, so that any small functions
268267
// exposed by this function would be given a chance to inline.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Copyright 2020 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: --interrupt-budget=1024
6+
7+
function v1() {
8+
const v4 = Reflect;
9+
const v8 = [11.11];
10+
const v10 = {__proto__:1111, a:-1, c:RegExp, f:v8, d:1111, e:-1};
11+
const v12 = [11.11];
12+
function v13() {}
13+
const v16 = {a:v13, b:v13, c:v13, d:v13, e:v13, f:v13, g:v13, h:v13, i:v13, j:v13};
14+
}
15+
16+
function foo() {
17+
let v22 = Number;
18+
v22 = v1;
19+
const v23 = false;
20+
if (v23) {
21+
v22 = Number;
22+
} else {
23+
function v24() {
24+
const v28 = ".Cactus"[0];
25+
for (let v32 = 0; v32 < 7; v32++) {}
26+
}
27+
new Promise(v24);
28+
try {
29+
for (const v37 of v36) {
30+
const v58 = [cactus,cactus,[] = cactus] = v117;
31+
}
32+
} catch(v119) {
33+
}
34+
}
35+
v22();
36+
}
37+
38+
for (let i = 0; i < 10; i++) {
39+
foo();
40+
}

0 commit comments

Comments
 (0)