| 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-stubs.h" | 5 #include "src/code-stubs.h" |
| 6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/graph-inl.h" | 7 #include "src/compiler/graph-inl.h" |
| 8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
| 9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
| 10 #include "src/compiler/node-aux-data-inl.h" | 10 #include "src/compiler/node-aux-data-inl.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 inputs.push_back(graph()->start()); | 316 inputs.push_back(graph()->start()); |
| 317 inputs.push_back(graph()->start()); | 317 inputs.push_back(graph()->start()); |
| 318 } else { | 318 } else { |
| 319 DCHECK(has_frame_state == FLAG_turbo_deoptimization); | 319 DCHECK(has_frame_state == FLAG_turbo_deoptimization); |
| 320 if (FLAG_turbo_deoptimization) { | 320 if (FLAG_turbo_deoptimization) { |
| 321 inputs.push_back(NodeProperties::GetFrameStateInput(node)); | 321 inputs.push_back(NodeProperties::GetFrameStateInput(node)); |
| 322 } | 322 } |
| 323 inputs.push_back(NodeProperties::GetEffectInput(node)); | 323 inputs.push_back(NodeProperties::GetEffectInput(node)); |
| 324 inputs.push_back(NodeProperties::GetControlInput(node)); | 324 inputs.push_back(NodeProperties::GetControlInput(node)); |
| 325 } | 325 } |
| 326 Node* compare = graph()->NewNode(common()->Call(desc_compare), inputs.size(), | 326 Node* compare = |
| 327 &inputs.front()); | 327 graph()->NewNode(common()->Call(desc_compare), |
| 328 static_cast<int>(inputs.size()), &inputs.front()); |
| 328 | 329 |
| 329 node->ReplaceInput(0, compare); | 330 node->ReplaceInput(0, compare); |
| 330 node->ReplaceInput(1, SmiConstant(token)); | 331 node->ReplaceInput(1, SmiConstant(token)); |
| 331 | 332 |
| 332 if (has_frame_state) { | 333 if (has_frame_state) { |
| 333 // Remove the frame state from inputs. | 334 // Remove the frame state from inputs. |
| 334 // TODO(jarin) This should use Node::RemoveInput (which does not exist yet). | 335 // TODO(jarin) This should use Node::RemoveInput (which does not exist yet). |
| 335 int dest = NodeProperties::FirstFrameStateIndex(node); | 336 int dest = NodeProperties::FirstFrameStateIndex(node); |
| 336 for (int i = NodeProperties::PastFrameStateIndex(node); | 337 for (int i = NodeProperties::PastFrameStateIndex(node); |
| 337 i < node->InputCount(); i++) { | 338 i < node->InputCount(); i++) { |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { | 565 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { |
| 565 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); | 566 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); |
| 566 int arity = OperatorProperties::GetValueInputCount(node->op()); | 567 int arity = OperatorProperties::GetValueInputCount(node->op()); |
| 567 ReplaceWithRuntimeCall(node, function, arity); | 568 ReplaceWithRuntimeCall(node, function, arity); |
| 568 return node; | 569 return node; |
| 569 } | 570 } |
| 570 | 571 |
| 571 } // namespace compiler | 572 } // namespace compiler |
| 572 } // namespace internal | 573 } // namespace internal |
| 573 } // namespace v8 | 574 } // namespace v8 |
| OLD | NEW |