| 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/code-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/code-stubs.h" | 6 #include "src/code-stubs.h" |
| 7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 inputs.push_back(jsgraph()->HeapConstant(callable.code())); | 148 inputs.push_back(jsgraph()->HeapConstant(callable.code())); |
| 149 inputs.push_back(NodeProperties::GetValueInput(node, 0)); | 149 inputs.push_back(NodeProperties::GetValueInput(node, 0)); |
| 150 inputs.push_back(NodeProperties::GetValueInput(node, 1)); | 150 inputs.push_back(NodeProperties::GetValueInput(node, 1)); |
| 151 inputs.push_back(NodeProperties::GetContextInput(node)); | 151 inputs.push_back(NodeProperties::GetContextInput(node)); |
| 152 if (node->op()->HasProperty(Operator::kPure)) { | 152 if (node->op()->HasProperty(Operator::kPure)) { |
| 153 // A pure (strict) comparison doesn't have an effect, control or frame | 153 // A pure (strict) comparison doesn't have an effect, control or frame |
| 154 // state. But for the graph, we need to add control and effect inputs. | 154 // state. But for the graph, we need to add control and effect inputs. |
| 155 DCHECK(OperatorProperties::GetFrameStateInputCount(node->op()) == 0); | 155 DCHECK(OperatorProperties::GetFrameStateInputCount(node->op()) == 0); |
| 156 inputs.push_back(graph()->start()); | 156 inputs.push_back(graph()->start()); |
| 157 inputs.push_back(graph()->start()); | 157 inputs.push_back(graph()->start()); |
| 158 } else if (node->op()->HasProperty(Operator::kEliminatable)) { |
| 159 DCHECK(OperatorProperties::GetFrameStateInputCount(node->op()) == 0); |
| 160 DCHECK(node->op()->ControlInputCount() == 0); |
| 161 inputs.push_back(NodeProperties::GetEffectInput(node)); |
| 162 inputs.push_back(graph()->start()); |
| 158 } else { | 163 } else { |
| 159 inputs.push_back(NodeProperties::GetFrameStateInput(node, 0)); | 164 inputs.push_back(NodeProperties::GetFrameStateInput(node, 0)); |
| 160 inputs.push_back(NodeProperties::GetEffectInput(node)); | 165 inputs.push_back(NodeProperties::GetEffectInput(node)); |
| 161 inputs.push_back(NodeProperties::GetControlInput(node)); | 166 inputs.push_back(NodeProperties::GetControlInput(node)); |
| 162 } | 167 } |
| 163 CallDescriptor* desc_compare = Linkage::GetStubCallDescriptor( | 168 CallDescriptor* desc_compare = Linkage::GetStubCallDescriptor( |
| 164 isolate(), zone(), callable.descriptor(), 0, | 169 isolate(), zone(), callable.descriptor(), 0, |
| 165 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node), | 170 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node), |
| 166 Operator::kNoProperties, kMachIntPtr); | 171 Operator::kNoProperties, kMachIntPtr); |
| 167 Node* compare = | 172 Node* compare = |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 } | 846 } |
| 842 | 847 |
| 843 | 848 |
| 844 MachineOperatorBuilder* JSGenericLowering::machine() const { | 849 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 845 return jsgraph()->machine(); | 850 return jsgraph()->machine(); |
| 846 } | 851 } |
| 847 | 852 |
| 848 } // namespace compiler | 853 } // namespace compiler |
| 849 } // namespace internal | 854 } // namespace internal |
| 850 } // namespace v8 | 855 } // namespace v8 |
| OLD | NEW |