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

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

Issue 2066223002: [turbofan] Introduce CheckHole and CheckHoleNaN operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Blacklist test Created 4 years, 6 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') | src/types.h » ('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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 case IrOpcode::kNumberToInt32: 759 case IrOpcode::kNumberToInt32:
760 // Number -> Signed32 760 // Number -> Signed32
761 CheckValueInputIs(node, 0, Type::Number()); 761 CheckValueInputIs(node, 0, Type::Number());
762 CheckUpperIs(node, Type::Signed32()); 762 CheckUpperIs(node, Type::Signed32());
763 break; 763 break;
764 case IrOpcode::kNumberToUint32: 764 case IrOpcode::kNumberToUint32:
765 // Number -> Unsigned32 765 // Number -> Unsigned32
766 CheckValueInputIs(node, 0, Type::Number()); 766 CheckValueInputIs(node, 0, Type::Number());
767 CheckUpperIs(node, Type::Unsigned32()); 767 CheckUpperIs(node, Type::Unsigned32());
768 break; 768 break;
769 case IrOpcode::kNumberIsHoleNaN:
770 // Number -> Boolean
771 CheckValueInputIs(node, 0, Type::Number());
772 CheckUpperIs(node, Type::Boolean());
773 break;
774 case IrOpcode::kNumberConvertHoleNaN:
775 // Number -> Number \/ Undefined
776 CheckValueInputIs(node, 0, Type::Number());
777 CheckUpperIs(node, Type::NumberOrUndefined());
778 break;
779 case IrOpcode::kPlainPrimitiveToNumber: 769 case IrOpcode::kPlainPrimitiveToNumber:
780 // Type is Number. 770 // Type is Number.
781 CheckUpperIs(node, Type::Number()); 771 CheckUpperIs(node, Type::Number());
782 break; 772 break;
783 case IrOpcode::kPlainPrimitiveToWord32: 773 case IrOpcode::kPlainPrimitiveToWord32:
784 CheckUpperIs(node, Type::Number()); 774 CheckUpperIs(node, Type::Number());
785 break; 775 break;
786 case IrOpcode::kPlainPrimitiveToFloat64: 776 case IrOpcode::kPlainPrimitiveToFloat64:
787 CheckUpperIs(node, Type::Number()); 777 CheckUpperIs(node, Type::Number());
788 break; 778 break;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 // CheckUpperIs(node, to)); 923 // CheckUpperIs(node, to));
934 break; 924 break;
935 } 925 }
936 926
937 case IrOpcode::kCheckedUint32ToInt32: 927 case IrOpcode::kCheckedUint32ToInt32:
938 case IrOpcode::kCheckedFloat64ToInt32: 928 case IrOpcode::kCheckedFloat64ToInt32:
939 case IrOpcode::kCheckedTaggedToInt32: 929 case IrOpcode::kCheckedTaggedToInt32:
940 case IrOpcode::kCheckedTaggedToFloat64: 930 case IrOpcode::kCheckedTaggedToFloat64:
941 break; 931 break;
942 932
933 case IrOpcode::kCheckFloat64Hole:
934 CheckValueInputIs(node, 0, Type::Number());
935 CheckUpperIs(node, Type::Number());
936 break;
937 case IrOpcode::kCheckTaggedHole:
938 CheckValueInputIs(node, 0, Type::Any());
939 CheckUpperIs(node, Type::Any());
940 break;
941
943 case IrOpcode::kLoadField: 942 case IrOpcode::kLoadField:
944 // Object -> fieldtype 943 // Object -> fieldtype
945 // TODO(rossberg): activate once machine ops are typed. 944 // TODO(rossberg): activate once machine ops are typed.
946 // CheckValueInputIs(node, 0, Type::Object()); 945 // CheckValueInputIs(node, 0, Type::Object());
947 // CheckUpperIs(node, FieldAccessOf(node->op()).type)); 946 // CheckUpperIs(node, FieldAccessOf(node->op()).type));
948 break; 947 break;
949 case IrOpcode::kLoadBuffer: 948 case IrOpcode::kLoadBuffer:
950 break; 949 break;
951 case IrOpcode::kLoadElement: 950 case IrOpcode::kLoadElement:
952 // Object -> elementtype 951 // Object -> elementtype
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 replacement->op()->EffectOutputCount() > 0); 1445 replacement->op()->EffectOutputCount() > 0);
1447 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1446 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1448 replacement->opcode() == IrOpcode::kFrameState); 1447 replacement->opcode() == IrOpcode::kFrameState);
1449 } 1448 }
1450 1449
1451 #endif // DEBUG 1450 #endif // DEBUG
1452 1451
1453 } // namespace compiler 1452 } // namespace compiler
1454 } // namespace internal 1453 } // namespace internal
1455 } // namespace v8 1454 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | src/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698