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

Side by Side Diff: src/compiler/verifier.cc

Issue 1217553005: [turbofan] Fix value output count for the Start node. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test-run-stubs.cc Created 5 years, 5 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/compiler/common-operator.cc ('k') | test/cctest/compiler/simplified-graph-builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/verifier.h" 5 #include "src/compiler/verifier.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <sstream> 10 #include <sstream>
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 CHECK_EQ(2, input_count); 311 CHECK_EQ(2, input_count);
312 // Type is empty. 312 // Type is empty.
313 CheckNotTyped(node); 313 CheckNotTyped(node);
314 break; 314 break;
315 315
316 // Common operators 316 // Common operators
317 // ---------------- 317 // ----------------
318 case IrOpcode::kParameter: { 318 case IrOpcode::kParameter: {
319 // Parameters have the start node as inputs. 319 // Parameters have the start node as inputs.
320 CHECK_EQ(1, input_count); 320 CHECK_EQ(1, input_count);
321 CHECK_EQ(IrOpcode::kStart,
322 NodeProperties::GetValueInput(node, 0)->opcode());
323 // Parameter has an input that produces enough values. 321 // Parameter has an input that produces enough values.
324 int index = OpParameter<int>(node); 322 int const index = ParameterIndexOf(node->op());
325 Node* input = NodeProperties::GetValueInput(node, 0); 323 Node* const start = NodeProperties::GetValueInput(node, 0);
324 CHECK_EQ(IrOpcode::kStart, start->opcode());
326 // Currently, parameter indices start at -1 instead of 0. 325 // Currently, parameter indices start at -1 instead of 0.
327 CHECK_GT(input->op()->ValueOutputCount(), index + 1); 326 CHECK_LE(-1, index);
327 CHECK_LT(index + 1, start->op()->ValueOutputCount());
328 // Type can be anything. 328 // Type can be anything.
329 CheckUpperIs(node, Type::Any()); 329 CheckUpperIs(node, Type::Any());
330 break; 330 break;
331 } 331 }
332 case IrOpcode::kInt32Constant: // TODO(rossberg): rename Word32Constant? 332 case IrOpcode::kInt32Constant: // TODO(rossberg): rename Word32Constant?
333 // Constants have no inputs. 333 // Constants have no inputs.
334 CHECK_EQ(0, input_count); 334 CHECK_EQ(0, input_count);
335 // Type is a 32 bit integer, signed or unsigned. 335 // Type is a 32 bit integer, signed or unsigned.
336 CheckUpperIs(node, Type::Integral32()); 336 CheckUpperIs(node, Type::Integral32());
337 break; 337 break;
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 // Check inputs for all nodes in the block. 1148 // Check inputs for all nodes in the block.
1149 for (size_t i = 0; i < block->NodeCount(); i++) { 1149 for (size_t i = 0; i < block->NodeCount(); i++) {
1150 Node* node = block->NodeAt(i); 1150 Node* node = block->NodeAt(i);
1151 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 1151 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
1152 } 1152 }
1153 } 1153 }
1154 } 1154 }
1155 } // namespace compiler 1155 } // namespace compiler
1156 } // namespace internal 1156 } // namespace internal
1157 } // namespace v8 1157 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/common-operator.cc ('k') | test/cctest/compiler/simplified-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698