| 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/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
| 6 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
| 7 #include "src/compiler/js-typed-lowering.h" | 7 #include "src/compiler/js-typed-lowering.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 #include "src/compiler/operator-properties.h" | 10 #include "src/compiler/operator-properties.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 Reduction JSTypedLowering::ReplaceEagerly(Node* old, Node* node) { | 52 Reduction JSTypedLowering::ReplaceEagerly(Node* old, Node* node) { |
| 53 NodeProperties::ReplaceWithValue(old, node, node); | 53 NodeProperties::ReplaceWithValue(old, node, node); |
| 54 return Changed(node); | 54 return Changed(node); |
| 55 } | 55 } |
| 56 | 56 |
| 57 | 57 |
| 58 // A helper class to simplify the process of reducing a single binop node with a | 58 // A helper class to simplify the process of reducing a single binop node with a |
| 59 // JSOperator. This class manages the rewriting of context, control, and effect | 59 // JSOperator. This class manages the rewriting of context, control, and effect |
| 60 // dependencies during lowering of a binop and contains numerous helper | 60 // dependencies during lowering of a binop and contains numerous helper |
| 61 // functions for matching the types of inputs to an operation. | 61 // functions for matching the types of inputs to an operation. |
| 62 class JSBinopReduction FINAL { | 62 class JSBinopReduction final { |
| 63 public: | 63 public: |
| 64 JSBinopReduction(JSTypedLowering* lowering, Node* node) | 64 JSBinopReduction(JSTypedLowering* lowering, Node* node) |
| 65 : lowering_(lowering), node_(node) {} | 65 : lowering_(lowering), node_(node) {} |
| 66 | 66 |
| 67 void ConvertPrimitiveInputsToNumber() { | 67 void ConvertPrimitiveInputsToNumber() { |
| 68 node_->ReplaceInput(0, ConvertPrimitiveToNumber(left())); | 68 node_->ReplaceInput(0, ConvertPrimitiveToNumber(left())); |
| 69 node_->ReplaceInput(1, ConvertPrimitiveToNumber(right())); | 69 node_->ReplaceInput(1, ConvertPrimitiveToNumber(right())); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void ConvertInputsToNumber(Node* frame_state) { | 72 void ConvertInputsToNumber(Node* frame_state) { |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 } | 1096 } |
| 1097 | 1097 |
| 1098 | 1098 |
| 1099 MachineOperatorBuilder* JSTypedLowering::machine() const { | 1099 MachineOperatorBuilder* JSTypedLowering::machine() const { |
| 1100 return jsgraph()->machine(); | 1100 return jsgraph()->machine(); |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 } // namespace compiler | 1103 } // namespace compiler |
| 1104 } // namespace internal | 1104 } // namespace internal |
| 1105 } // namespace v8 | 1105 } // namespace v8 |
| OLD | NEW |