| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 return kRepWord32; | 337 return kRepWord32; |
| 338 } else { | 338 } else { |
| 339 return kRepFloat64; | 339 return kRepFloat64; |
| 340 } | 340 } |
| 341 } else if (upper->Is(Type::Boolean())) { | 341 } else if (upper->Is(Type::Boolean())) { |
| 342 // multiple uses => pick kRepBit. | 342 // multiple uses => pick kRepBit. |
| 343 return kRepBit; | 343 return kRepBit; |
| 344 } else if (upper->Is(Type::Number())) { | 344 } else if (upper->Is(Type::Number())) { |
| 345 // multiple uses => pick kRepFloat64. | 345 // multiple uses => pick kRepFloat64. |
| 346 return kRepFloat64; | 346 return kRepFloat64; |
| 347 } else if (upper->Is(Type::Internal())) { |
| 348 return kMachPtr; |
| 347 } | 349 } |
| 348 return kRepTagged; | 350 return kRepTagged; |
| 349 } | 351 } |
| 350 | 352 |
| 351 // Helper for handling selects. | 353 // Helper for handling selects. |
| 352 void VisitSelect(Node* node, MachineTypeUnion use, | 354 void VisitSelect(Node* node, MachineTypeUnion use, |
| 353 SimplifiedLowering* lowering) { | 355 SimplifiedLowering* lowering) { |
| 354 ProcessInput(node, 0, kRepBit); | 356 ProcessInput(node, 0, kRepBit); |
| 355 MachineType output = GetRepresentationForPhi(node, use); | 357 MachineType output = GetRepresentationForPhi(node, use); |
| 356 | 358 |
| (...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1611 | 1613 |
| 1612 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 1614 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
| 1613 node->set_op(machine()->IntLessThanOrEqual()); | 1615 node->set_op(machine()->IntLessThanOrEqual()); |
| 1614 node->ReplaceInput(0, StringComparison(node, true)); | 1616 node->ReplaceInput(0, StringComparison(node, true)); |
| 1615 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1617 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
| 1616 } | 1618 } |
| 1617 | 1619 |
| 1618 } // namespace compiler | 1620 } // namespace compiler |
| 1619 } // namespace internal | 1621 } // namespace internal |
| 1620 } // namespace v8 | 1622 } // namespace v8 |
| OLD | NEW |