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

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

Issue 539933002: [turbofan] Make sure Operator is really immutable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 break; 167 break;
168 case IrOpcode::kThrow: 168 case IrOpcode::kThrow:
169 // TODO(rossberg): what are the constraints on these? 169 // TODO(rossberg): what are the constraints on these?
170 break; 170 break;
171 case IrOpcode::kParameter: { 171 case IrOpcode::kParameter: {
172 // Parameters have the start node as inputs. 172 // Parameters have the start node as inputs.
173 CHECK_EQ(1, input_count); 173 CHECK_EQ(1, input_count);
174 CHECK_EQ(IrOpcode::kStart, 174 CHECK_EQ(IrOpcode::kStart,
175 NodeProperties::GetValueInput(node, 0)->opcode()); 175 NodeProperties::GetValueInput(node, 0)->opcode());
176 // Parameter has an input that produces enough values. 176 // Parameter has an input that produces enough values.
177 int index = static_cast<Operator1<int>*>(node->op())->parameter(); 177 int index = OpParameter<int>(node);
178 Node* input = NodeProperties::GetValueInput(node, 0); 178 Node* input = NodeProperties::GetValueInput(node, 0);
179 // Currently, parameter indices start at -1 instead of 0. 179 // Currently, parameter indices start at -1 instead of 0.
180 CHECK_GT(OperatorProperties::GetValueOutputCount(input->op()), index + 1); 180 CHECK_GT(OperatorProperties::GetValueOutputCount(input->op()), index + 1);
181 break; 181 break;
182 } 182 }
183 case IrOpcode::kInt32Constant: 183 case IrOpcode::kInt32Constant:
184 case IrOpcode::kInt64Constant: 184 case IrOpcode::kInt64Constant:
185 case IrOpcode::kFloat64Constant: 185 case IrOpcode::kFloat64Constant:
186 case IrOpcode::kExternalConstant: 186 case IrOpcode::kExternalConstant:
187 case IrOpcode::kNumberConstant: 187 case IrOpcode::kNumberConstant:
(...skipping 18 matching lines...) Expand all
206 break; 206 break;
207 } 207 }
208 case IrOpcode::kFrameState: 208 case IrOpcode::kFrameState:
209 // TODO(jarin): what are the constraints on these? 209 // TODO(jarin): what are the constraints on these?
210 break; 210 break;
211 case IrOpcode::kCall: 211 case IrOpcode::kCall:
212 // TODO(rossberg): what are the constraints on these? 212 // TODO(rossberg): what are the constraints on these?
213 break; 213 break;
214 case IrOpcode::kProjection: { 214 case IrOpcode::kProjection: {
215 // Projection has an input that produces enough values. 215 // Projection has an input that produces enough values.
216 int index = static_cast<Operator1<int>*>(node->op())->parameter(); 216 int index = OpParameter<int>(node);
217 Node* input = NodeProperties::GetValueInput(node, 0); 217 Node* input = NodeProperties::GetValueInput(node, 0);
218 CHECK_GT(OperatorProperties::GetValueOutputCount(input->op()), index); 218 CHECK_GT(OperatorProperties::GetValueOutputCount(input->op()), index);
219 break; 219 break;
220 } 220 }
221 default: 221 default:
222 // TODO(rossberg): Check other node kinds. 222 // TODO(rossberg): Check other node kinds.
223 break; 223 break;
224 } 224 }
225 225
226 if (from_start) { 226 if (from_start) {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // Check inputs for all nodes in the block. 445 // Check inputs for all nodes in the block.
446 for (size_t i = 0; i < block->nodes_.size(); i++) { 446 for (size_t i = 0; i < block->nodes_.size(); i++) {
447 Node* node = block->nodes_[i]; 447 Node* node = block->nodes_[i];
448 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 448 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
449 } 449 }
450 } 450 }
451 } 451 }
452 } 452 }
453 } 453 }
454 } // namespace v8::internal::compiler 454 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | test/cctest/compiler/test-js-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698