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

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

Issue 646033005: Fix oversight in type change (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 <deque> 7 #include <deque>
8 #include <queue> 8 #include <queue>
9 9
10 #include "src/compiler/generic-algorithm.h" 10 #include "src/compiler/generic-algorithm.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 CHECK(!OperatorProperties::HasControlOutput(node->op())); 159 CHECK(!OperatorProperties::HasControlOutput(node->op()));
160 // Type is empty. 160 // Type is empty.
161 CHECK(!NodeProperties::IsTyped(node)); 161 CHECK(!NodeProperties::IsTyped(node));
162 break; 162 break;
163 case IrOpcode::kDead: 163 case IrOpcode::kDead:
164 // Dead is never connected to the graph. 164 // Dead is never connected to the graph.
165 UNREACHABLE(); 165 UNREACHABLE();
166 case IrOpcode::kBranch: { 166 case IrOpcode::kBranch: {
167 // Branch uses are IfTrue and IfFalse. 167 // Branch uses are IfTrue and IfFalse.
168 Node::Uses uses = node->uses(); 168 Node::Uses uses = node->uses();
169 bool count_true = 0, count_false = 0; 169 int count_true = 0, count_false = 0;
170 for (Node::Uses::iterator it = uses.begin(); it != uses.end(); ++it) { 170 for (Node::Uses::iterator it = uses.begin(); it != uses.end(); ++it) {
171 CHECK((*it)->opcode() == IrOpcode::kIfTrue || 171 CHECK((*it)->opcode() == IrOpcode::kIfTrue ||
172 (*it)->opcode() == IrOpcode::kIfFalse); 172 (*it)->opcode() == IrOpcode::kIfFalse);
173 if ((*it)->opcode() == IrOpcode::kIfTrue) ++count_true; 173 if ((*it)->opcode() == IrOpcode::kIfTrue) ++count_true;
174 if ((*it)->opcode() == IrOpcode::kIfFalse) ++count_false; 174 if ((*it)->opcode() == IrOpcode::kIfFalse) ++count_false;
175 } 175 }
176 CHECK(count_true == 1 && count_false == 1); 176 CHECK(count_true == 1 && count_false == 1);
177 // Type is empty. 177 // Type is empty.
178 CHECK(!NodeProperties::IsTyped(node)); 178 CHECK(!NodeProperties::IsTyped(node));
179 break; 179 break;
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 // Check inputs for all nodes in the block. 885 // Check inputs for all nodes in the block.
886 for (size_t i = 0; i < block->NodeCount(); i++) { 886 for (size_t i = 0; i < block->NodeCount(); i++) {
887 Node* node = block->NodeAt(i); 887 Node* node = block->NodeAt(i);
888 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 888 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
889 } 889 }
890 } 890 }
891 } 891 }
892 } 892 }
893 } 893 }
894 } // namespace v8::internal::compiler 894 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698