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

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

Issue 1921563002: [turbofan] Initial version of number type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase 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/flag-definitions.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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 CheckValueInputIs(node, 1, Type::NumberOrUndefined()); 675 CheckValueInputIs(node, 1, Type::NumberOrUndefined());
676 CheckUpperIs(node, Type::Boolean()); 676 CheckUpperIs(node, Type::Boolean());
677 break; 677 break;
678 case IrOpcode::kNumberLessThan: 678 case IrOpcode::kNumberLessThan:
679 case IrOpcode::kNumberLessThanOrEqual: 679 case IrOpcode::kNumberLessThanOrEqual:
680 // (Number, Number) -> Boolean 680 // (Number, Number) -> Boolean
681 CheckValueInputIs(node, 0, Type::NumberOrUndefined()); 681 CheckValueInputIs(node, 0, Type::NumberOrUndefined());
682 CheckValueInputIs(node, 1, Type::NumberOrUndefined()); 682 CheckValueInputIs(node, 1, Type::NumberOrUndefined());
683 CheckUpperIs(node, Type::Boolean()); 683 CheckUpperIs(node, Type::Boolean());
684 break; 684 break;
685 case IrOpcode::kSpeculativeNumberAdd:
686 case IrOpcode::kSpeculativeNumberSubtract:
687 break;
685 case IrOpcode::kNumberAdd: 688 case IrOpcode::kNumberAdd:
686 case IrOpcode::kNumberSubtract: 689 case IrOpcode::kNumberSubtract:
687 case IrOpcode::kNumberMultiply: 690 case IrOpcode::kNumberMultiply:
688 case IrOpcode::kNumberDivide: 691 case IrOpcode::kNumberDivide:
689 // (Number, Number) -> Number 692 // (Number, Number) -> Number
690 CheckValueInputIs(node, 0, Type::NumberOrUndefined()); 693 CheckValueInputIs(node, 0, Type::NumberOrUndefined());
691 CheckValueInputIs(node, 1, Type::NumberOrUndefined()); 694 CheckValueInputIs(node, 1, Type::NumberOrUndefined());
692 // CheckUpperIs(node, Type::Number()); 695 // CheckUpperIs(node, Type::Number());
693 break; 696 break;
694 case IrOpcode::kNumberModulus: 697 case IrOpcode::kNumberModulus:
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 case IrOpcode::kTruncateTaggedToWord32: { 897 case IrOpcode::kTruncateTaggedToWord32: {
895 // Number /\ Tagged -> Signed32 /\ UntaggedInt32 898 // Number /\ Tagged -> Signed32 /\ UntaggedInt32
896 // TODO(neis): Activate once ChangeRepresentation works in typer. 899 // TODO(neis): Activate once ChangeRepresentation works in typer.
897 // Type* from = Type::Intersect(Type::Number(), Type::Tagged()); 900 // Type* from = Type::Intersect(Type::Number(), Type::Tagged());
898 // Type* to = Type::Intersect(Type::Number(), Type::UntaggedInt32()); 901 // Type* to = Type::Intersect(Type::Number(), Type::UntaggedInt32());
899 // CheckValueInputIs(node, 0, from)); 902 // CheckValueInputIs(node, 0, from));
900 // CheckUpperIs(node, to)); 903 // CheckUpperIs(node, to));
901 break; 904 break;
902 } 905 }
903 906
907 case IrOpcode::kCheckedUint32ToInt32:
908 case IrOpcode::kCheckedFloat64ToInt32:
909 case IrOpcode::kCheckedTaggedToInt32:
910 case IrOpcode::kCheckedTaggedToFloat64:
911 break;
912
904 case IrOpcode::kLoadField: 913 case IrOpcode::kLoadField:
905 // Object -> fieldtype 914 // Object -> fieldtype
906 // TODO(rossberg): activate once machine ops are typed. 915 // TODO(rossberg): activate once machine ops are typed.
907 // CheckValueInputIs(node, 0, Type::Object()); 916 // CheckValueInputIs(node, 0, Type::Object());
908 // CheckUpperIs(node, FieldAccessOf(node->op()).type)); 917 // CheckUpperIs(node, FieldAccessOf(node->op()).type));
909 break; 918 break;
910 case IrOpcode::kLoadBuffer: 919 case IrOpcode::kLoadBuffer:
911 break; 920 break;
912 case IrOpcode::kLoadElement: 921 case IrOpcode::kLoadElement:
913 // Object -> elementtype 922 // Object -> elementtype
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 replacement->op()->EffectOutputCount() > 0); 1407 replacement->op()->EffectOutputCount() > 0);
1399 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1408 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1400 replacement->opcode() == IrOpcode::kFrameState); 1409 replacement->opcode() == IrOpcode::kFrameState);
1401 } 1410 }
1402 1411
1403 #endif // DEBUG 1412 #endif // DEBUG
1404 1413
1405 } // namespace compiler 1414 } // namespace compiler
1406 } // namespace internal 1415 } // namespace internal
1407 } // namespace v8 1416 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698