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

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

Issue 2362173003: [turbofan] Improve representation selection for Smi checking. (Closed)
Patch Set: Address comments Created 4 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
« no previous file with comments | « src/compiler/typer.cc ('k') | test/unittests/compiler/simplified-operator-reducer-unittest.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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 break; 994 break;
995 } 995 }
996 case IrOpcode::kTruncateTaggedToBit: 996 case IrOpcode::kTruncateTaggedToBit:
997 break; 997 break;
998 998
999 case IrOpcode::kCheckBounds: 999 case IrOpcode::kCheckBounds:
1000 CheckValueInputIs(node, 0, Type::Any()); 1000 CheckValueInputIs(node, 0, Type::Any());
1001 CheckValueInputIs(node, 1, Type::Unsigned31()); 1001 CheckValueInputIs(node, 1, Type::Unsigned31());
1002 CheckTypeIs(node, Type::Unsigned31()); 1002 CheckTypeIs(node, Type::Unsigned31());
1003 break; 1003 break;
1004 case IrOpcode::kCheckHeapObject:
1005 CheckValueInputIs(node, 0, Type::Any());
1006 break;
1007 case IrOpcode::kCheckIf:
1008 CheckValueInputIs(node, 0, Type::Boolean());
1009 CheckNotTyped(node);
1010 break;
1004 case IrOpcode::kCheckMaps: 1011 case IrOpcode::kCheckMaps:
1005 // (Any, Internal, ..., Internal) -> Any 1012 // (Any, Internal, ..., Internal) -> Any
1006 CheckValueInputIs(node, 0, Type::Any()); 1013 CheckValueInputIs(node, 0, Type::Any());
1007 for (int i = 1; i < node->op()->ValueInputCount(); ++i) { 1014 for (int i = 1; i < node->op()->ValueInputCount(); ++i) {
1008 CheckValueInputIs(node, i, Type::Internal()); 1015 CheckValueInputIs(node, i, Type::Internal());
1009 } 1016 }
1010 CheckNotTyped(node); 1017 CheckNotTyped(node);
1011 break; 1018 break;
1012 case IrOpcode::kCheckNumber: 1019 case IrOpcode::kCheckNumber:
1013 CheckValueInputIs(node, 0, Type::Any()); 1020 CheckValueInputIs(node, 0, Type::Any());
1014 CheckTypeIs(node, Type::Number()); 1021 CheckTypeIs(node, Type::Number());
1015 break; 1022 break;
1023 case IrOpcode::kCheckSmi:
1024 CheckValueInputIs(node, 0, Type::Any());
1025 break;
1016 case IrOpcode::kCheckString: 1026 case IrOpcode::kCheckString:
1017 CheckValueInputIs(node, 0, Type::Any()); 1027 CheckValueInputIs(node, 0, Type::Any());
1018 CheckTypeIs(node, Type::String()); 1028 CheckTypeIs(node, Type::String());
1019 break; 1029 break;
1020 case IrOpcode::kCheckIf:
1021 CheckValueInputIs(node, 0, Type::Boolean());
1022 CheckNotTyped(node);
1023 break;
1024 case IrOpcode::kCheckTaggedSigned:
1025 CheckValueInputIs(node, 0, Type::Any());
1026 break;
1027 case IrOpcode::kCheckTaggedPointer:
1028 CheckValueInputIs(node, 0, Type::Any());
1029 break;
1030 1030
1031 case IrOpcode::kCheckedInt32Add: 1031 case IrOpcode::kCheckedInt32Add:
1032 case IrOpcode::kCheckedInt32Sub: 1032 case IrOpcode::kCheckedInt32Sub:
1033 case IrOpcode::kCheckedInt32Div: 1033 case IrOpcode::kCheckedInt32Div:
1034 case IrOpcode::kCheckedInt32Mod: 1034 case IrOpcode::kCheckedInt32Mod:
1035 case IrOpcode::kCheckedUint32Div: 1035 case IrOpcode::kCheckedUint32Div:
1036 case IrOpcode::kCheckedUint32Mod: 1036 case IrOpcode::kCheckedUint32Mod:
1037 case IrOpcode::kCheckedInt32Mul: 1037 case IrOpcode::kCheckedInt32Mul:
1038 case IrOpcode::kCheckedInt32ToTaggedSigned:
1038 case IrOpcode::kCheckedUint32ToInt32: 1039 case IrOpcode::kCheckedUint32ToInt32:
1040 case IrOpcode::kCheckedUint32ToTaggedSigned:
1039 case IrOpcode::kCheckedFloat64ToInt32: 1041 case IrOpcode::kCheckedFloat64ToInt32:
1040 case IrOpcode::kCheckedTaggedSignedToInt32: 1042 case IrOpcode::kCheckedTaggedSignedToInt32:
1041 case IrOpcode::kCheckedTaggedToInt32: 1043 case IrOpcode::kCheckedTaggedToInt32:
1042 case IrOpcode::kCheckedTaggedToFloat64: 1044 case IrOpcode::kCheckedTaggedToFloat64:
1045 case IrOpcode::kCheckedTaggedToTaggedSigned:
1043 case IrOpcode::kCheckedTruncateTaggedToWord32: 1046 case IrOpcode::kCheckedTruncateTaggedToWord32:
1044 break; 1047 break;
1045 1048
1046 case IrOpcode::kCheckFloat64Hole: 1049 case IrOpcode::kCheckFloat64Hole:
1047 CheckValueInputIs(node, 0, Type::Number()); 1050 CheckValueInputIs(node, 0, Type::Number());
1048 CheckTypeIs(node, Type::Number()); 1051 CheckTypeIs(node, Type::Number());
1049 break; 1052 break;
1050 case IrOpcode::kCheckTaggedHole: 1053 case IrOpcode::kCheckTaggedHole:
1051 CheckValueInputIs(node, 0, Type::Any()); 1054 CheckValueInputIs(node, 0, Type::Any());
1052 CheckTypeIs(node, Type::NonInternal()); 1055 CheckTypeIs(node, Type::NonInternal());
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 replacement->op()->EffectOutputCount() > 0); 1593 replacement->op()->EffectOutputCount() > 0);
1591 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1594 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1592 replacement->opcode() == IrOpcode::kFrameState); 1595 replacement->opcode() == IrOpcode::kFrameState);
1593 } 1596 }
1594 1597
1595 #endif // DEBUG 1598 #endif // DEBUG
1596 1599
1597 } // namespace compiler 1600 } // namespace compiler
1598 } // namespace internal 1601 } // namespace internal
1599 } // namespace v8 1602 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | test/unittests/compiler/simplified-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698