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.h" | 6 #include "src/compiler.h" |
7 #include "src/compiler/linkage.h" | 7 #include "src/compiler/linkage.h" |
8 #include "src/compiler/node.h" | 8 #include "src/compiler/node.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 for (size_t i = 0; i < ReturnCount(); ++i) { | 44 for (size_t i = 0; i < ReturnCount(); ++i) { |
45 if (GetReturnLocation(i) != other->GetReturnLocation(i)) return false; | 45 if (GetReturnLocation(i) != other->GetReturnLocation(i)) return false; |
46 } | 46 } |
47 return true; | 47 return true; |
48 } | 48 } |
49 | 49 |
50 | 50 |
51 CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) { | 51 CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) { |
52 if (info->code_stub() != NULL) { | 52 if (info->code_stub() != NULL) { |
53 // Use the code stub interface descriptor. | 53 // Use the code stub interface descriptor. |
54 CallInterfaceDescriptor descriptor = | 54 CodeStub* stub = info->code_stub(); |
55 info->code_stub()->GetCallInterfaceDescriptor(); | 55 CallInterfaceDescriptor descriptor = stub->GetCallInterfaceDescriptor(); |
56 return GetStubCallDescriptor(info->isolate(), zone, descriptor, 0, | 56 return GetStubCallDescriptor( |
57 CallDescriptor::kNoFlags, | 57 info->isolate(), zone, descriptor, stub->GetStackParameterCount(), |
58 Operator::kNoProperties); | 58 CallDescriptor::kNoFlags, Operator::kNoProperties); |
59 } | 59 } |
60 if (info->function() != NULL) { | 60 if (info->function() != NULL) { |
61 // If we already have the function literal, use the number of parameters | 61 // If we already have the function literal, use the number of parameters |
62 // plus the receiver. | 62 // plus the receiver. |
63 return GetJSCallDescriptor(zone, info->is_osr(), | 63 return GetJSCallDescriptor(zone, info->is_osr(), |
64 1 + info->function()->parameter_count(), | 64 1 + info->function()->parameter_count(), |
65 CallDescriptor::kNoFlags); | 65 CallDescriptor::kNoFlags); |
66 } | 66 } |
67 if (!info->closure().is_null()) { | 67 if (!info->closure().is_null()) { |
68 // If we are compiling a JS function, use a JS call descriptor, | 68 // If we are compiling a JS function, use a JS call descriptor, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 199 |
200 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, | 200 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, |
201 const MachineSignature* sig) { | 201 const MachineSignature* sig) { |
202 UNIMPLEMENTED(); | 202 UNIMPLEMENTED(); |
203 return NULL; | 203 return NULL; |
204 } | 204 } |
205 #endif // !V8_TURBOFAN_BACKEND | 205 #endif // !V8_TURBOFAN_BACKEND |
206 } | 206 } |
207 } | 207 } |
208 } // namespace v8::internal::compiler | 208 } // namespace v8::internal::compiler |
OLD | NEW |