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

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

Issue 2657243002: [turbofan] Introduce dedicated StringIndexOf operator. (Closed)
Patch Set: Created 3 years, 10 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/mjsunit/regress/regress-crbug-685680.js » ('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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 case IrOpcode::kStringFromCharCode: 919 case IrOpcode::kStringFromCharCode:
920 // Number -> String 920 // Number -> String
921 CheckValueInputIs(node, 0, Type::Number()); 921 CheckValueInputIs(node, 0, Type::Number());
922 CheckTypeIs(node, Type::String()); 922 CheckTypeIs(node, Type::String());
923 break; 923 break;
924 case IrOpcode::kStringFromCodePoint: 924 case IrOpcode::kStringFromCodePoint:
925 // (Unsigned32) -> String 925 // (Unsigned32) -> String
926 CheckValueInputIs(node, 0, Type::Number()); 926 CheckValueInputIs(node, 0, Type::Number());
927 CheckTypeIs(node, Type::String()); 927 CheckTypeIs(node, Type::String());
928 break; 928 break;
929 case IrOpcode::kReferenceEqual: { 929 case IrOpcode::kStringIndexOf:
930 // (String, String, SignedSmall) -> SignedSmall
931 CheckValueInputIs(node, 0, Type::String());
932 CheckValueInputIs(node, 1, Type::String());
933 CheckValueInputIs(node, 2, Type::SignedSmall());
934 CheckTypeIs(node, Type::SignedSmall());
935 break;
936
937 case IrOpcode::kReferenceEqual:
930 // (Unique, Any) -> Boolean and 938 // (Unique, Any) -> Boolean and
931 // (Any, Unique) -> Boolean 939 // (Any, Unique) -> Boolean
932 CheckTypeIs(node, Type::Boolean()); 940 CheckTypeIs(node, Type::Boolean());
933 break; 941 break;
934 } 942
935 case IrOpcode::kObjectIsCallable: 943 case IrOpcode::kObjectIsCallable:
936 case IrOpcode::kObjectIsNonCallable: 944 case IrOpcode::kObjectIsNonCallable:
937 case IrOpcode::kObjectIsNumber: 945 case IrOpcode::kObjectIsNumber:
938 case IrOpcode::kObjectIsReceiver: 946 case IrOpcode::kObjectIsReceiver:
939 case IrOpcode::kObjectIsSmi: 947 case IrOpcode::kObjectIsSmi:
940 case IrOpcode::kObjectIsString: 948 case IrOpcode::kObjectIsString:
941 case IrOpcode::kObjectIsUndetectable: 949 case IrOpcode::kObjectIsUndetectable:
942 case IrOpcode::kArrayBufferWasNeutered: 950 case IrOpcode::kArrayBufferWasNeutered:
943 CheckValueInputIs(node, 0, Type::Any()); 951 CheckValueInputIs(node, 0, Type::Any());
944 CheckTypeIs(node, Type::Boolean()); 952 CheckTypeIs(node, Type::Boolean());
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 replacement->op()->EffectOutputCount() > 0); 1698 replacement->op()->EffectOutputCount() > 0);
1691 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1699 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1692 replacement->opcode() == IrOpcode::kFrameState); 1700 replacement->opcode() == IrOpcode::kFrameState);
1693 } 1701 }
1694 1702
1695 #endif // DEBUG 1703 #endif // DEBUG
1696 1704
1697 } // namespace compiler 1705 } // namespace compiler
1698 } // namespace internal 1706 } // namespace internal
1699 } // namespace v8 1707 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | test/mjsunit/regress/regress-crbug-685680.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698