Skip to content

Commit edfe391

Browse files
bmeurerCommit bot
authored andcommitted
[turbofan] Fix effect chain for polymorphic array access.
We accidently dropped the effect on the floor that we have for the polymorphic map check in case of array elements access. BUG=chromium:655004 [email protected] Review-Url: https://codereview.chromium.org/2411273002 Cr-Commit-Position: refs/heads/master@{#40201}
1 parent 36ebaf2 commit edfe391

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

src/compiler/js-native-context-specialization.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
604604
fallthrough_control);
605605
this_controls.push_back(
606606
graph()->NewNode(common()->IfTrue(), branch));
607-
this_effects.push_back(effect);
607+
this_effects.push_back(this_effect);
608608
fallthrough_control =
609609
graph()->NewNode(common()->IfFalse(), branch);
610610
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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
6+
7+
function foo(a) {
8+
a.x = 0;
9+
if (a.x === 0) a[1] = 0.1;
10+
a.x = {};
11+
}
12+
foo(new Array(1));
13+
foo(new Array(1));
14+
%OptimizeFunctionOnNextCall(foo);
15+
foo(new Array(1));

0 commit comments

Comments
 (0)