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

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

Issue 733783003: Fix Windows build after 25373 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | 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 #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 "src/compiler/generic-node.h" 8 #include "src/compiler/generic-node.h"
9 #include "src/compiler/generic-node-inl.h" 9 #include "src/compiler/generic-node-inl.h"
10 #include "src/compiler/node.h" 10 #include "src/compiler/node.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 184
185 private: 185 private:
186 int GetInputScaleExponent(Node* node) const { 186 int GetInputScaleExponent(Node* node) const {
187 if (node->opcode() == kShiftOpcode) { 187 if (node->opcode() == kShiftOpcode) {
188 BinopMatcher m(node); 188 BinopMatcher m(node);
189 if (m.right().HasValue()) { 189 if (m.right().HasValue()) {
190 typename BinopMatcher::RightMatcher::ValueType value = 190 typename BinopMatcher::RightMatcher::ValueType value =
191 m.right().Value(); 191 m.right().Value();
192 if (value >= 0 && value <= 3) { 192 if (value >= 0 && value <= 3) {
193 return value; 193 return static_cast<int>(value);
194 } 194 }
195 } 195 }
196 } else if (node->opcode() == kMulOpcode) { 196 } else if (node->opcode() == kMulOpcode) {
197 BinopMatcher m(node); 197 BinopMatcher m(node);
198 if (m.right().HasValue()) { 198 if (m.right().HasValue()) {
199 typename BinopMatcher::RightMatcher::ValueType value = 199 typename BinopMatcher::RightMatcher::ValueType value =
200 m.right().Value(); 200 m.right().Value();
201 if (value == 1) { 201 if (value == 1) {
202 return 0; 202 return 0;
203 } else if (value == 2) { 203 } else if (value == 2) {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 }; 377 };
378 378
379 typedef ScaledWithOffsetMatcher<Int32AddMatcher> ScaledWithOffset32Matcher; 379 typedef ScaledWithOffsetMatcher<Int32AddMatcher> ScaledWithOffset32Matcher;
380 typedef ScaledWithOffsetMatcher<Int64AddMatcher> ScaledWithOffset64Matcher; 380 typedef ScaledWithOffsetMatcher<Int64AddMatcher> ScaledWithOffset64Matcher;
381 381
382 } // namespace compiler 382 } // namespace compiler
383 } // namespace internal 383 } // namespace internal
384 } // namespace v8 384 } // namespace v8
385 385
386 #endif // V8_COMPILER_NODE_MATCHERS_H_ 386 #endif // V8_COMPILER_NODE_MATCHERS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698