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/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/compiler/node-properties-inl.h" | 9 #include "src/compiler/node-properties-inl.h" |
10 #include "src/compiler/pipeline.h" | 10 #include "src/compiler/pipeline.h" |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 return VisitProjection(node); | 694 return VisitProjection(node); |
695 case IrOpcode::kInt32Constant: | 695 case IrOpcode::kInt32Constant: |
696 case IrOpcode::kInt64Constant: | 696 case IrOpcode::kInt64Constant: |
697 case IrOpcode::kExternalConstant: | 697 case IrOpcode::kExternalConstant: |
698 return VisitConstant(node); | 698 return VisitConstant(node); |
699 case IrOpcode::kFloat32Constant: | 699 case IrOpcode::kFloat32Constant: |
700 return MarkAsDouble(node), VisitConstant(node); | 700 return MarkAsDouble(node), VisitConstant(node); |
701 case IrOpcode::kFloat64Constant: | 701 case IrOpcode::kFloat64Constant: |
702 return MarkAsDouble(node), VisitConstant(node); | 702 return MarkAsDouble(node), VisitConstant(node); |
703 case IrOpcode::kHeapConstant: | 703 case IrOpcode::kHeapConstant: |
704 case IrOpcode::kNumberConstant: | |
705 // TODO(turbofan): only mark non-smis as references. | |
706 return MarkAsReference(node), VisitConstant(node); | 704 return MarkAsReference(node), VisitConstant(node); |
| 705 case IrOpcode::kNumberConstant: { |
| 706 double value = OpParameter<double>(node); |
| 707 if (!IsSmiDouble(value)) MarkAsReference(node); |
| 708 return VisitConstant(node); |
| 709 } |
707 case IrOpcode::kCall: | 710 case IrOpcode::kCall: |
708 return VisitCall(node); | 711 return VisitCall(node); |
709 case IrOpcode::kFrameState: | 712 case IrOpcode::kFrameState: |
710 case IrOpcode::kStateValues: | 713 case IrOpcode::kStateValues: |
711 return; | 714 return; |
712 case IrOpcode::kLoad: { | 715 case IrOpcode::kLoad: { |
713 LoadRepresentation rep = OpParameter<LoadRepresentation>(node); | 716 LoadRepresentation rep = OpParameter<LoadRepresentation>(node); |
714 MarkAsRepresentation(rep, node); | 717 MarkAsRepresentation(rep, node); |
715 return VisitLoad(node); | 718 return VisitLoad(node); |
716 } | 719 } |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 MachineOperatorBuilder::Flags | 1164 MachineOperatorBuilder::Flags |
1162 InstructionSelector::SupportedMachineOperatorFlags() { | 1165 InstructionSelector::SupportedMachineOperatorFlags() { |
1163 return MachineOperatorBuilder::Flag::kNoFlags; | 1166 return MachineOperatorBuilder::Flag::kNoFlags; |
1164 } | 1167 } |
1165 | 1168 |
1166 #endif // !V8_TURBOFAN_BACKEND | 1169 #endif // !V8_TURBOFAN_BACKEND |
1167 | 1170 |
1168 } // namespace compiler | 1171 } // namespace compiler |
1169 } // namespace internal | 1172 } // namespace internal |
1170 } // namespace v8 | 1173 } // namespace v8 |
OLD | NEW |