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

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

Issue 1898653003: [turbofan] Optimize typeof in abstract/strict equality comparison. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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-typed-lowering.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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 typedef BinopMatcher<Int32Matcher, Int32Matcher> Int32BinopMatcher; 247 typedef BinopMatcher<Int32Matcher, Int32Matcher> Int32BinopMatcher;
248 typedef BinopMatcher<Uint32Matcher, Uint32Matcher> Uint32BinopMatcher; 248 typedef BinopMatcher<Uint32Matcher, Uint32Matcher> Uint32BinopMatcher;
249 typedef BinopMatcher<Int64Matcher, Int64Matcher> Int64BinopMatcher; 249 typedef BinopMatcher<Int64Matcher, Int64Matcher> Int64BinopMatcher;
250 typedef BinopMatcher<Uint64Matcher, Uint64Matcher> Uint64BinopMatcher; 250 typedef BinopMatcher<Uint64Matcher, Uint64Matcher> Uint64BinopMatcher;
251 typedef BinopMatcher<IntPtrMatcher, IntPtrMatcher> IntPtrBinopMatcher; 251 typedef BinopMatcher<IntPtrMatcher, IntPtrMatcher> IntPtrBinopMatcher;
252 typedef BinopMatcher<UintPtrMatcher, UintPtrMatcher> UintPtrBinopMatcher; 252 typedef BinopMatcher<UintPtrMatcher, UintPtrMatcher> UintPtrBinopMatcher;
253 typedef BinopMatcher<Float32Matcher, Float32Matcher> Float32BinopMatcher; 253 typedef BinopMatcher<Float32Matcher, Float32Matcher> Float32BinopMatcher;
254 typedef BinopMatcher<Float64Matcher, Float64Matcher> Float64BinopMatcher; 254 typedef BinopMatcher<Float64Matcher, Float64Matcher> Float64BinopMatcher;
255 typedef BinopMatcher<NumberMatcher, NumberMatcher> NumberBinopMatcher; 255 typedef BinopMatcher<NumberMatcher, NumberMatcher> NumberBinopMatcher;
256 256 typedef BinopMatcher<HeapObjectMatcher, HeapObjectMatcher>
257 HeapObjectBinopMatcher;
257 258
258 template <class BinopMatcher, IrOpcode::Value kMulOpcode, 259 template <class BinopMatcher, IrOpcode::Value kMulOpcode,
259 IrOpcode::Value kShiftOpcode> 260 IrOpcode::Value kShiftOpcode>
260 struct ScaleMatcher { 261 struct ScaleMatcher {
261 explicit ScaleMatcher(Node* node, bool allow_power_of_two_plus_one = false) 262 explicit ScaleMatcher(Node* node, bool allow_power_of_two_plus_one = false)
262 : scale_(-1), power_of_two_plus_one_(false) { 263 : scale_(-1), power_of_two_plus_one_(false) {
263 if (node->InputCount() < 2) return; 264 if (node->InputCount() < 2) return;
264 BinopMatcher m(node); 265 BinopMatcher m(node);
265 if (node->opcode() == kShiftOpcode) { 266 if (node->opcode() == kShiftOpcode) {
266 if (m.right().HasValue()) { 267 if (m.right().HasValue()) {
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 Node* branch_; 609 Node* branch_;
609 Node* if_true_; 610 Node* if_true_;
610 Node* if_false_; 611 Node* if_false_;
611 }; 612 };
612 613
613 } // namespace compiler 614 } // namespace compiler
614 } // namespace internal 615 } // namespace internal
615 } // namespace v8 616 } // namespace v8
616 617
617 #endif // V8_COMPILER_NODE_MATCHERS_H_ 618 #endif // V8_COMPILER_NODE_MATCHERS_H_
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698