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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 case IrOpcode::kFloat64LessThan: | 1036 case IrOpcode::kFloat64LessThan: |
1035 case IrOpcode::kFloat64LessThanOrEqual: | 1037 case IrOpcode::kFloat64LessThanOrEqual: |
1036 return VisitFloat64Cmp(node); | 1038 return VisitFloat64Cmp(node); |
1037 case IrOpcode::kFloat64ExtractLowWord32: | 1039 case IrOpcode::kFloat64ExtractLowWord32: |
1038 case IrOpcode::kFloat64ExtractHighWord32: | 1040 case IrOpcode::kFloat64ExtractHighWord32: |
1039 return VisitUnop(node, kMachFloat64, kMachInt32); | 1041 return VisitUnop(node, kMachFloat64, kMachInt32); |
1040 case IrOpcode::kFloat64InsertLowWord32: | 1042 case IrOpcode::kFloat64InsertLowWord32: |
1041 case IrOpcode::kFloat64InsertHighWord32: | 1043 case IrOpcode::kFloat64InsertHighWord32: |
1042 return VisitBinop(node, kMachFloat64, kMachInt32, kMachFloat64); | 1044 return VisitBinop(node, kMachFloat64, kMachInt32, kMachFloat64); |
1043 case IrOpcode::kLoadStackPointer: | 1045 case IrOpcode::kLoadStackPointer: |
| 1046 case IrOpcode::kLoadFramePointer: |
1044 return VisitLeaf(node, kMachPtr); | 1047 return VisitLeaf(node, kMachPtr); |
1045 case IrOpcode::kStateValues: | 1048 case IrOpcode::kStateValues: |
1046 VisitStateValues(node); | 1049 VisitStateValues(node); |
1047 break; | 1050 break; |
1048 default: | 1051 default: |
1049 VisitInputs(node); | 1052 VisitInputs(node); |
1050 break; | 1053 break; |
1051 } | 1054 } |
1052 } | 1055 } |
1053 | 1056 |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1611 | 1614 |
1612 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { | 1615 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { |
1613 node->set_op(machine()->IntLessThanOrEqual()); | 1616 node->set_op(machine()->IntLessThanOrEqual()); |
1614 node->ReplaceInput(0, StringComparison(node, true)); | 1617 node->ReplaceInput(0, StringComparison(node, true)); |
1615 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); | 1618 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); |
1616 } | 1619 } |
1617 | 1620 |
1618 } // namespace compiler | 1621 } // namespace compiler |
1619 } // namespace internal | 1622 } // namespace internal |
1620 } // namespace v8 | 1623 } // namespace v8 |
OLD | NEW |