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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
6 #include "src/code-stubs.h" | 6 #include "src/code-stubs.h" |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/frame.h" | 9 #include "src/compiler/frame.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 more_this = false; | 113 more_this = false; |
114 } | 114 } |
115 ++current_input; | 115 ++current_input; |
116 ++other_input; | 116 ++other_input; |
117 } | 117 } |
118 return HasSameReturnLocationsAs(OpParameter<CallDescriptor const*>(node)); | 118 return HasSameReturnLocationsAs(OpParameter<CallDescriptor const*>(node)); |
119 } | 119 } |
120 | 120 |
121 | 121 |
122 CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) { | 122 CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) { |
123 if (info->code_stub() != nullptr) { | 123 DCHECK(!info->IsStub()); |
124 // Use the code stub interface descriptor. | |
125 CodeStub* stub = info->code_stub(); | |
126 CallInterfaceDescriptor descriptor = stub->GetCallInterfaceDescriptor(); | |
127 return GetStubCallDescriptor( | |
128 info->isolate(), zone, descriptor, stub->GetStackParameterCount(), | |
129 CallDescriptor::kNoFlags, Operator::kNoProperties); | |
130 } | |
131 if (info->has_literal()) { | 124 if (info->has_literal()) { |
132 // If we already have the function literal, use the number of parameters | 125 // If we already have the function literal, use the number of parameters |
133 // plus the receiver. | 126 // plus the receiver. |
134 return GetJSCallDescriptor(zone, info->is_osr(), | 127 return GetJSCallDescriptor(zone, info->is_osr(), |
135 1 + info->literal()->parameter_count(), | 128 1 + info->literal()->parameter_count(), |
136 CallDescriptor::kNoFlags); | 129 CallDescriptor::kNoFlags); |
137 } | 130 } |
138 if (!info->closure().is_null()) { | 131 if (!info->closure().is_null()) { |
139 // If we are compiling a JS function, use a JS call descriptor, | 132 // If we are compiling a JS function, use a JS call descriptor, |
140 // plus the receiver. | 133 // plus the receiver. |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 } else { | 523 } else { |
531 DCHECK(loc == regloc(kContextRegister)); | 524 DCHECK(loc == regloc(kContextRegister)); |
532 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot); | 525 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot); |
533 } | 526 } |
534 } | 527 } |
535 | 528 |
536 | 529 |
537 } // namespace compiler | 530 } // namespace compiler |
538 } // namespace internal | 531 } // namespace internal |
539 } // namespace v8 | 532 } // namespace v8 |
OLD | NEW |