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

Unified Diff: src/compiler/node.cc

Issue 1132353004: [turbofan] Fix Node::TrimInputCount() followed by Node::AppendInput() bug. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update comments. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/node.h ('k') | test/unittests/compiler/node-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node.cc
diff --git a/src/compiler/node.cc b/src/compiler/node.cc
index 724c9f173ec55bff234a8de7db7eddcfd06b7c75..e1802b8d10b8a01540565319f5752873d7c161db 100644
--- a/src/compiler/node.cc
+++ b/src/compiler/node.cc
@@ -100,7 +100,9 @@ void Node::TrimInputCount(int new_input_count) {
for (int index = new_input_count; index < input_count(); ++index) {
ReplaceInput(index, nullptr);
}
- if (!has_appendable_inputs()) {
+ if (has_appendable_inputs()) {
+ inputs_.appendable_->resize(new_input_count);
+ } else {
set_reserved_input_count(std::min<int>(
ReservedInputCountField::kMax,
reserved_input_count() + (input_count() - new_input_count)));
« no previous file with comments | « src/compiler/node.h ('k') | test/unittests/compiler/node-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698