OLD | NEW |
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/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/graph-inl.h" | 9 #include "src/compiler/graph-inl.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 // Convert inputs to the output representation of this phi. | 329 // Convert inputs to the output representation of this phi. |
330 Node::Inputs inputs = node->inputs(); | 330 Node::Inputs inputs = node->inputs(); |
331 for (Node::Inputs::iterator iter(inputs.begin()); iter != inputs.end(); | 331 for (Node::Inputs::iterator iter(inputs.begin()); iter != inputs.end(); |
332 ++iter, --values) { | 332 ++iter, --values) { |
333 // TODO(titzer): it'd be nice to have distinguished edge kinds here. | 333 // TODO(titzer): it'd be nice to have distinguished edge kinds here. |
334 ProcessInput(node, iter.index(), values > 0 ? output_type : 0); | 334 ProcessInput(node, iter.index(), values > 0 ? output_type : 0); |
335 } | 335 } |
336 } | 336 } |
337 } | 337 } |
338 | 338 |
339 Operator* Int32Op(Node* node) { | 339 const Operator* Int32Op(Node* node) { |
340 return changer_->Int32OperatorFor(node->opcode()); | 340 return changer_->Int32OperatorFor(node->opcode()); |
341 } | 341 } |
342 | 342 |
343 Operator* Uint32Op(Node* node) { | 343 const Operator* Uint32Op(Node* node) { |
344 return changer_->Uint32OperatorFor(node->opcode()); | 344 return changer_->Uint32OperatorFor(node->opcode()); |
345 } | 345 } |
346 | 346 |
347 Operator* Float64Op(Node* node) { | 347 const Operator* Float64Op(Node* node) { |
348 return changer_->Float64OperatorFor(node->opcode()); | 348 return changer_->Float64OperatorFor(node->opcode()); |
349 } | 349 } |
350 | 350 |
351 // Dispatching routine for visiting the node {node} with the usage {use}. | 351 // Dispatching routine for visiting the node {node} with the usage {use}. |
352 // Depending on the operator, propagate new usage info to the inputs. | 352 // Depending on the operator, propagate new usage info to the inputs. |
353 void VisitNode(Node* node, MachineTypeUnion use, | 353 void VisitNode(Node* node, MachineTypeUnion use, |
354 SimplifiedLowering* lowering) { | 354 SimplifiedLowering* lowering) { |
355 switch (node->opcode()) { | 355 switch (node->opcode()) { |
356 //------------------------------------------------------------------ | 356 //------------------------------------------------------------------ |
357 // Common operators. | 357 // Common operators. |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 899 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
900 node->set_op(machine()->IntLessThanOrEqual()); | 900 node->set_op(machine()->IntLessThanOrEqual()); |
901 node->ReplaceInput(0, StringComparison(node, true)); | 901 node->ReplaceInput(0, StringComparison(node, true)); |
902 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 902 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
903 } | 903 } |
904 | 904 |
905 | 905 |
906 } // namespace compiler | 906 } // namespace compiler |
907 } // namespace internal | 907 } // namespace internal |
908 } // namespace v8 | 908 } // namespace v8 |
OLD | NEW |