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

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

Issue 2494753003: [turbofan] Introduce an ExternalPointer type. (Closed)
Patch Set: Stronger ducktape. Created 4 years, 1 month 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/types.h ('k') | test/cctest/compiler/test-js-typed-lowering.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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 int const index = ParameterIndexOf(node->op()); 326 int const index = ParameterIndexOf(node->op());
327 Node* const start = NodeProperties::GetValueInput(node, 0); 327 Node* const start = NodeProperties::GetValueInput(node, 0);
328 CHECK_EQ(IrOpcode::kStart, start->opcode()); 328 CHECK_EQ(IrOpcode::kStart, start->opcode());
329 // Currently, parameter indices start at -1 instead of 0. 329 // Currently, parameter indices start at -1 instead of 0.
330 CHECK_LE(-1, index); 330 CHECK_LE(-1, index);
331 CHECK_LT(index + 1, start->op()->ValueOutputCount()); 331 CHECK_LT(index + 1, start->op()->ValueOutputCount());
332 // Type can be anything. 332 // Type can be anything.
333 CheckTypeIs(node, Type::Any()); 333 CheckTypeIs(node, Type::Any());
334 break; 334 break;
335 } 335 }
336 case IrOpcode::kInt32Constant: // TODO(rossberg): rename Word32Constant? 336 case IrOpcode::kInt32Constant: // TODO(turbofan): rename Word32Constant?
337 case IrOpcode::kInt64Constant: // TODO(turbofan): rename Word64Constant?
338 case IrOpcode::kFloat32Constant:
339 case IrOpcode::kFloat64Constant:
340 case IrOpcode::kRelocatableInt32Constant:
341 case IrOpcode::kRelocatableInt64Constant:
337 // Constants have no inputs. 342 // Constants have no inputs.
338 CHECK_EQ(0, input_count); 343 CHECK_EQ(0, input_count);
339 // Type is a 32 bit integer, signed or unsigned. 344 // Type is empty.
340 CheckTypeIs(node, Type::Integral32()); 345 CheckNotTyped(node);
341 break; 346 break;
342 case IrOpcode::kInt64Constant:
343 // Constants have no inputs.
344 CHECK_EQ(0, input_count);
345 // Type is internal.
346 // TODO(rossberg): Introduce proper Int64 type.
347 CheckTypeIs(node, Type::Internal());
348 break;
349 case IrOpcode::kFloat32Constant:
350 case IrOpcode::kFloat64Constant:
351 case IrOpcode::kNumberConstant: 347 case IrOpcode::kNumberConstant:
352 // Constants have no inputs. 348 // Constants have no inputs.
353 CHECK_EQ(0, input_count); 349 CHECK_EQ(0, input_count);
354 // Type is a number. 350 // Type is a number.
355 CheckTypeIs(node, Type::Number()); 351 CheckTypeIs(node, Type::Number());
356 break; 352 break;
357 case IrOpcode::kRelocatableInt32Constant:
358 case IrOpcode::kRelocatableInt64Constant:
359 CHECK_EQ(0, input_count);
360 break;
361 case IrOpcode::kHeapConstant: 353 case IrOpcode::kHeapConstant:
362 // Constants have no inputs. 354 // Constants have no inputs.
363 CHECK_EQ(0, input_count); 355 CHECK_EQ(0, input_count);
356 // Type is anything.
357 CheckTypeIs(node, Type::Any());
364 break; 358 break;
365 case IrOpcode::kExternalConstant: 359 case IrOpcode::kExternalConstant:
360 case IrOpcode::kPointerConstant:
366 // Constants have no inputs. 361 // Constants have no inputs.
367 CHECK_EQ(0, input_count); 362 CHECK_EQ(0, input_count);
368 // Type is considered internal. 363 // Type is an external pointer.
369 CheckTypeIs(node, Type::Internal()); 364 CheckTypeIs(node, Type::ExternalPointer());
370 break; 365 break;
371 case IrOpcode::kOsrValue: 366 case IrOpcode::kOsrValue:
372 // OSR values have a value and a control input. 367 // OSR values have a value and a control input.
373 CHECK_EQ(1, control_count); 368 CHECK_EQ(1, control_count);
374 CHECK_EQ(1, input_count); 369 CHECK_EQ(1, input_count);
375 // Type is merged from other values in the graph and could be any. 370 // Type is merged from other values in the graph and could be any.
376 CheckTypeIs(node, Type::Any()); 371 CheckTypeIs(node, Type::Any());
377 break; 372 break;
378 case IrOpcode::kOsrGuard: 373 case IrOpcode::kOsrGuard:
379 // OSR values have a value and a control input. 374 // OSR values have a value and a control input.
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 replacement->op()->EffectOutputCount() > 0); 1624 replacement->op()->EffectOutputCount() > 0);
1630 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1625 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1631 replacement->opcode() == IrOpcode::kFrameState); 1626 replacement->opcode() == IrOpcode::kFrameState);
1632 } 1627 }
1633 1628
1634 #endif // DEBUG 1629 #endif // DEBUG
1635 1630
1636 } // namespace compiler 1631 } // namespace compiler
1637 } // namespace internal 1632 } // namespace internal
1638 } // namespace v8 1633 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/types.h ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698