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

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

Issue 2646763003: [turbofan] Optimize typeof o === "object" checks. (Closed)
Patch Set: Address comment. Created 3 years, 11 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
« src/compiler/typer.cc ('K') | « src/compiler/typer.cc ('k') | no next file » | 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 CheckValueInputIs(node, 0, Type::Number()); 919 CheckValueInputIs(node, 0, Type::Number());
920 CheckTypeIs(node, Type::String()); 920 CheckTypeIs(node, Type::String());
921 break; 921 break;
922 case IrOpcode::kReferenceEqual: { 922 case IrOpcode::kReferenceEqual: {
923 // (Unique, Any) -> Boolean and 923 // (Unique, Any) -> Boolean and
924 // (Any, Unique) -> Boolean 924 // (Any, Unique) -> Boolean
925 CheckTypeIs(node, Type::Boolean()); 925 CheckTypeIs(node, Type::Boolean());
926 break; 926 break;
927 } 927 }
928 case IrOpcode::kObjectIsCallable: 928 case IrOpcode::kObjectIsCallable:
929 case IrOpcode::kObjectIsNonCallable:
929 case IrOpcode::kObjectIsNumber: 930 case IrOpcode::kObjectIsNumber:
930 case IrOpcode::kObjectIsReceiver: 931 case IrOpcode::kObjectIsReceiver:
931 case IrOpcode::kObjectIsSmi: 932 case IrOpcode::kObjectIsSmi:
932 case IrOpcode::kObjectIsString: 933 case IrOpcode::kObjectIsString:
933 case IrOpcode::kObjectIsUndetectable: 934 case IrOpcode::kObjectIsUndetectable:
934 case IrOpcode::kArrayBufferWasNeutered: 935 case IrOpcode::kArrayBufferWasNeutered:
935 CheckValueInputIs(node, 0, Type::Any()); 936 CheckValueInputIs(node, 0, Type::Any());
936 CheckTypeIs(node, Type::Boolean()); 937 CheckTypeIs(node, Type::Boolean());
937 break; 938 break;
938 case IrOpcode::kNewRestParameterElements: 939 case IrOpcode::kNewRestParameterElements:
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 replacement->op()->EffectOutputCount() > 0); 1683 replacement->op()->EffectOutputCount() > 0);
1683 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1684 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1684 replacement->opcode() == IrOpcode::kFrameState); 1685 replacement->opcode() == IrOpcode::kFrameState);
1685 } 1686 }
1686 1687
1687 #endif // DEBUG 1688 #endif // DEBUG
1688 1689
1689 } // namespace compiler 1690 } // namespace compiler
1690 } // namespace internal 1691 } // namespace internal
1691 } // namespace v8 1692 } // namespace v8
OLDNEW
« src/compiler/typer.cc ('K') | « src/compiler/typer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698