Reviewers: Benedikt Meurer,
Message:
Could you take a look, please?
Description:
[turbofan] Fix deferred replacement in simplified lowering.
Deferred replacement must also replace in the pending node vector.
BUG=chromium:463056
LOG=n
[email protected]
Please review this at https://codereview.chromium.org/966423002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+6, -4 lines):
M src/compiler/simplified-lowering.cc
A + test/mjsunit/compiler/regress-463056.js
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc
b/src/compiler/simplified-lowering.cc
index
b3050719883c0467bf97f8d0610e494a3142c014..f0d1241559975b02a02904a6f2dbbaeb7d2a3bc9
100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -124,6 +124,11 @@ class RepresentationSelector {
Node* node = *i;
Node* replacement = *(++i);
node->ReplaceUses(replacement);
+ // We also need to replace the node in the rest of the vector.
+ for (NodeVector::iterator j = i + 1; j != replacements_.end(); ++j) {
+ ++j;
+ if (*j == node) *j = replacement;
+ }
}
}
Index: test/mjsunit/compiler/regress-463056.js
diff --git a/test/mjsunit/compiler/regress-451012.js
b/test/mjsunit/compiler/regress-463056.js
similarity index 79%
copy from test/mjsunit/compiler/regress-451012.js
copy to test/mjsunit/compiler/regress-463056.js
index
bffc8bc5bdfac32bb561a24153d00157b26ac3a5..fb871618e42c9387d38a445522bfd01cfbbe9bfa
100644
--- a/test/mjsunit/compiler/regress-451012.js
+++ b/test/mjsunit/compiler/regress-463056.js
@@ -2,11 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-"use strict";
function f() {
- for (let v; v; ) {
- let x;
- }
+ return ((0%0)&1) + (1>>>(0%0));
}
f();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.