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

Side by Side Diff: src/compiler/node-matchers.h

Issue 2115513002: [turbofan] Introduce CheckIf simplified operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/js-native-context-specialization.cc ('k') | src/compiler/opcodes.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 #ifndef V8_COMPILER_NODE_MATCHERS_H_ 5 #ifndef V8_COMPILER_NODE_MATCHERS_H_
6 #define V8_COMPILER_NODE_MATCHERS_H_ 6 #define V8_COMPILER_NODE_MATCHERS_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 // TODO(turbofan): Move ExternalReference out of assembler.h 10 // TODO(turbofan): Move ExternalReference out of assembler.h
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 typedef FloatMatcher<float, IrOpcode::kFloat32Constant> Float32Matcher; 165 typedef FloatMatcher<float, IrOpcode::kFloat32Constant> Float32Matcher;
166 typedef FloatMatcher<double, IrOpcode::kFloat64Constant> Float64Matcher; 166 typedef FloatMatcher<double, IrOpcode::kFloat64Constant> Float64Matcher;
167 typedef FloatMatcher<double, IrOpcode::kNumberConstant> NumberMatcher; 167 typedef FloatMatcher<double, IrOpcode::kNumberConstant> NumberMatcher;
168 168
169 169
170 // A pattern matcher for heap object constants. 170 // A pattern matcher for heap object constants.
171 struct HeapObjectMatcher final 171 struct HeapObjectMatcher final
172 : public ValueMatcher<Handle<HeapObject>, IrOpcode::kHeapConstant> { 172 : public ValueMatcher<Handle<HeapObject>, IrOpcode::kHeapConstant> {
173 explicit HeapObjectMatcher(Node* node) 173 explicit HeapObjectMatcher(Node* node)
174 : ValueMatcher<Handle<HeapObject>, IrOpcode::kHeapConstant>(node) {} 174 : ValueMatcher<Handle<HeapObject>, IrOpcode::kHeapConstant>(node) {}
175
176 bool Is(Handle<HeapObject> const& value) const {
177 return this->HasValue() && this->Value().address() == value.address();
178 }
175 }; 179 };
176 180
177 181
178 // A pattern matcher for external reference constants. 182 // A pattern matcher for external reference constants.
179 struct ExternalReferenceMatcher final 183 struct ExternalReferenceMatcher final
180 : public ValueMatcher<ExternalReference, IrOpcode::kExternalConstant> { 184 : public ValueMatcher<ExternalReference, IrOpcode::kExternalConstant> {
181 explicit ExternalReferenceMatcher(Node* node) 185 explicit ExternalReferenceMatcher(Node* node)
182 : ValueMatcher<ExternalReference, IrOpcode::kExternalConstant>(node) {} 186 : ValueMatcher<ExternalReference, IrOpcode::kExternalConstant>(node) {}
183 bool Is(const ExternalReference& value) const { 187 bool Is(const ExternalReference& value) const {
184 return this->HasValue() && this->Value() == value; 188 return this->HasValue() && this->Value() == value;
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 Node* branch_; 614 Node* branch_;
611 Node* if_true_; 615 Node* if_true_;
612 Node* if_false_; 616 Node* if_false_;
613 }; 617 };
614 618
615 } // namespace compiler 619 } // namespace compiler
616 } // namespace internal 620 } // namespace internal
617 } // namespace v8 621 } // namespace v8
618 622
619 #endif // V8_COMPILER_NODE_MATCHERS_H_ 623 #endif // V8_COMPILER_NODE_MATCHERS_H_
OLDNEW
« no previous file with comments | « src/compiler/js-native-context-specialization.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698