OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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-call-reducer.h" | 5 #include "src/compiler/js-call-reducer.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 NodeProperties::ReplaceValueInput(node, receiver_node, 1); | 432 NodeProperties::ReplaceValueInput(node, receiver_node, 1); |
433 } | 433 } |
434 Node* holder_node = | 434 Node* holder_node = |
435 lookup == kHolderFound ? jsgraph()->HeapConstant(holder) : receiver_node; | 435 lookup == kHolderFound ? jsgraph()->HeapConstant(holder) : receiver_node; |
436 | 436 |
437 Zone* zone = graph()->zone(); | 437 Zone* zone = graph()->zone(); |
438 // Same as CanInlineApiCall: exclude the target (which goes in a register) and | 438 // Same as CanInlineApiCall: exclude the target (which goes in a register) and |
439 // the receiver (which is implicitly counted by CallApiCallbackStub) from the | 439 // the receiver (which is implicitly counted by CallApiCallbackStub) from the |
440 // arguments count. | 440 // arguments count. |
441 int const argc = static_cast<int>(params.arity() - 2); | 441 int const argc = static_cast<int>(params.arity() - 2); |
442 CallApiCallbackStub stub(isolate, argc, data->IsUndefined(isolate), false); | 442 CallApiCallbackStub stub(isolate, argc, false); |
443 CallInterfaceDescriptor cid = stub.GetCallInterfaceDescriptor(); | 443 CallInterfaceDescriptor cid = stub.GetCallInterfaceDescriptor(); |
444 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( | 444 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( |
445 isolate, zone, cid, | 445 isolate, zone, cid, |
446 cid.GetStackParameterCount() + argc + 1 /* implicit receiver */, | 446 cid.GetStackParameterCount() + argc + 1 /* implicit receiver */, |
447 CallDescriptor::kNeedsFrameState, Operator::kNoProperties, | 447 CallDescriptor::kNeedsFrameState, Operator::kNoProperties, |
448 MachineType::AnyTagged(), 1); | 448 MachineType::AnyTagged(), 1); |
449 ApiFunction api_function(v8::ToCData<Address>(call_handler_info->callback())); | 449 ApiFunction api_function(v8::ToCData<Address>(call_handler_info->callback())); |
450 ExternalReference function_reference( | 450 ExternalReference function_reference( |
451 &api_function, ExternalReference::DIRECT_API_CALL, isolate); | 451 &api_function, ExternalReference::DIRECT_API_CALL, isolate); |
452 | 452 |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 return jsgraph()->javascript(); | 874 return jsgraph()->javascript(); |
875 } | 875 } |
876 | 876 |
877 SimplifiedOperatorBuilder* JSCallReducer::simplified() const { | 877 SimplifiedOperatorBuilder* JSCallReducer::simplified() const { |
878 return jsgraph()->simplified(); | 878 return jsgraph()->simplified(); |
879 } | 879 } |
880 | 880 |
881 } // namespace compiler | 881 } // namespace compiler |
882 } // namespace internal | 882 } // namespace internal |
883 } // namespace v8 | 883 } // namespace v8 |
OLD | NEW |