| 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/graph-inl.h" | 5 #include "src/compiler/graph-inl.h" |
| 6 #include "src/compiler/js-builtin-reducer.h" | 6 #include "src/compiler/js-builtin-reducer.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 #include "src/compiler/node-properties-inl.h" | 8 #include "src/compiler/node-properties-inl.h" |
| 9 #include "src/types.h" | 9 #include "src/types.h" |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 73 } |
| 74 return true; | 74 return true; |
| 75 } | 75 } |
| 76 | 76 |
| 77 Node* left() { return GetJSCallInput(0); } | 77 Node* left() { return GetJSCallInput(0); } |
| 78 Node* right() { return GetJSCallInput(1); } | 78 Node* right() { return GetJSCallInput(1); } |
| 79 | 79 |
| 80 int GetJSCallArity() { | 80 int GetJSCallArity() { |
| 81 DCHECK_EQ(IrOpcode::kJSCallFunction, node_->opcode()); | 81 DCHECK_EQ(IrOpcode::kJSCallFunction, node_->opcode()); |
| 82 // Skip first (i.e. callee) and second (i.e. receiver) operand. | 82 // Skip first (i.e. callee) and second (i.e. receiver) operand. |
| 83 return OperatorProperties::GetValueInputCount(node_->op()) - 2; | 83 return node_->op()->ValueInputCount() - 2; |
| 84 } | 84 } |
| 85 | 85 |
| 86 Node* GetJSCallInput(int index) { | 86 Node* GetJSCallInput(int index) { |
| 87 DCHECK_EQ(IrOpcode::kJSCallFunction, node_->opcode()); | 87 DCHECK_EQ(IrOpcode::kJSCallFunction, node_->opcode()); |
| 88 DCHECK_LT(index, GetJSCallArity()); | 88 DCHECK_LT(index, GetJSCallArity()); |
| 89 // Skip first (i.e. callee) and second (i.e. receiver) operand. | 89 // Skip first (i.e. callee) and second (i.e. receiver) operand. |
| 90 return NodeProperties::GetValueInput(node_, index + 2); | 90 return NodeProperties::GetValueInput(node_, index + 2); |
| 91 } | 91 } |
| 92 | 92 |
| 93 private: | 93 private: |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 return ReplaceWithPureReduction(node, ReduceMathFround(node)); | 209 return ReplaceWithPureReduction(node, ReduceMathFround(node)); |
| 210 default: | 210 default: |
| 211 break; | 211 break; |
| 212 } | 212 } |
| 213 return NoChange(); | 213 return NoChange(); |
| 214 } | 214 } |
| 215 | 215 |
| 216 } // namespace compiler | 216 } // namespace compiler |
| 217 } // namespace internal | 217 } // namespace internal |
| 218 } // namespace v8 | 218 } // namespace v8 |
| OLD | NEW |