| 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/js-generic-lowering.h" | 5 #include "src/compiler/js-generic-lowering.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 #undef REPLACE_STUB_CALL | 81 #undef REPLACE_STUB_CALL |
| 82 | 82 |
| 83 void JSGenericLowering::ReplaceWithStubCall(Node* node, Callable callable, | 83 void JSGenericLowering::ReplaceWithStubCall(Node* node, Callable callable, |
| 84 CallDescriptor::Flags flags) { | 84 CallDescriptor::Flags flags) { |
| 85 ReplaceWithStubCall(node, callable, flags, node->op()->properties()); | 85 ReplaceWithStubCall(node, callable, flags, node->op()->properties()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void JSGenericLowering::ReplaceWithStubCall(Node* node, Callable callable, | 88 void JSGenericLowering::ReplaceWithStubCall(Node* node, Callable callable, |
| 89 CallDescriptor::Flags flags, | 89 CallDescriptor::Flags flags, |
| 90 Operator::Properties properties) { | 90 Operator::Properties properties) { |
| 91 const CallInterfaceDescriptor& descriptor = callable.descriptor(); |
| 91 CallDescriptor* desc = Linkage::GetStubCallDescriptor( | 92 CallDescriptor* desc = Linkage::GetStubCallDescriptor( |
| 92 isolate(), zone(), callable.descriptor(), 0, flags, properties); | 93 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), flags, |
| 94 properties); |
| 93 Node* stub_code = jsgraph()->HeapConstant(callable.code()); | 95 Node* stub_code = jsgraph()->HeapConstant(callable.code()); |
| 94 node->InsertInput(zone(), 0, stub_code); | 96 node->InsertInput(zone(), 0, stub_code); |
| 95 NodeProperties::ChangeOp(node, common()->Call(desc)); | 97 NodeProperties::ChangeOp(node, common()->Call(desc)); |
| 96 } | 98 } |
| 97 | 99 |
| 98 | 100 |
| 99 void JSGenericLowering::ReplaceWithRuntimeCall(Node* node, | 101 void JSGenericLowering::ReplaceWithRuntimeCall(Node* node, |
| 100 Runtime::FunctionId f, | 102 Runtime::FunctionId f, |
| 101 int nargs_override) { | 103 int nargs_override) { |
| 102 CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 104 CallDescriptor::Flags flags = FrameStateFlagForCall(node); |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 } | 682 } |
| 681 | 683 |
| 682 | 684 |
| 683 MachineOperatorBuilder* JSGenericLowering::machine() const { | 685 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 684 return jsgraph()->machine(); | 686 return jsgraph()->machine(); |
| 685 } | 687 } |
| 686 | 688 |
| 687 } // namespace compiler | 689 } // namespace compiler |
| 688 } // namespace internal | 690 } // namespace internal |
| 689 } // namespace v8 | 691 } // namespace v8 |
| OLD | NEW |