| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // If we are compiling a JS function, use a JS call descriptor, | 49 // If we are compiling a JS function, use a JS call descriptor, |
| 50 // plus the receiver. | 50 // plus the receiver. |
| 51 SharedFunctionInfo* shared = info->closure()->shared(); | 51 SharedFunctionInfo* shared = info->closure()->shared(); |
| 52 return GetJSCallDescriptor(1 + shared->formal_parameter_count(), zone, | 52 return GetJSCallDescriptor(1 + shared->formal_parameter_count(), zone, |
| 53 CallDescriptor::kNoFlags); | 53 CallDescriptor::kNoFlags); |
| 54 } | 54 } |
| 55 if (info->code_stub() != NULL) { | 55 if (info->code_stub() != NULL) { |
| 56 // Use the code stub interface descriptor. | 56 // Use the code stub interface descriptor. |
| 57 CallInterfaceDescriptor descriptor = | 57 CallInterfaceDescriptor descriptor = |
| 58 info->code_stub()->GetCallInterfaceDescriptor(); | 58 info->code_stub()->GetCallInterfaceDescriptor(); |
| 59 return GetStubCallDescriptor(descriptor, 0, CallDescriptor::kNoFlags, zone); | 59 return GetStubCallDescriptor(descriptor, 0, CallDescriptor::kNoFlags, |
| 60 Operator::kNoProperties, zone); |
| 60 } | 61 } |
| 61 return NULL; // TODO(titzer): ? | 62 return NULL; // TODO(titzer): ? |
| 62 } | 63 } |
| 63 | 64 |
| 64 | 65 |
| 65 FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, | 66 FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, |
| 66 int extra) const { | 67 int extra) const { |
| 67 if (frame->GetSpillSlotCount() > 0 || incoming_->IsJSFunctionCall() || | 68 if (frame->GetSpillSlotCount() > 0 || incoming_->IsJSFunctionCall() || |
| 68 incoming_->kind() == CallDescriptor::kCallAddress) { | 69 incoming_->kind() == CallDescriptor::kCallAddress) { |
| 69 int offset; | 70 int offset; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 98 | 99 |
| 99 CallDescriptor* Linkage::GetRuntimeCallDescriptor( | 100 CallDescriptor* Linkage::GetRuntimeCallDescriptor( |
| 100 Runtime::FunctionId function, int parameter_count, | 101 Runtime::FunctionId function, int parameter_count, |
| 101 Operator::Properties properties) const { | 102 Operator::Properties properties) const { |
| 102 return GetRuntimeCallDescriptor(function, parameter_count, properties, zone_); | 103 return GetRuntimeCallDescriptor(function, parameter_count, properties, zone_); |
| 103 } | 104 } |
| 104 | 105 |
| 105 | 106 |
| 106 CallDescriptor* Linkage::GetStubCallDescriptor( | 107 CallDescriptor* Linkage::GetStubCallDescriptor( |
| 107 const CallInterfaceDescriptor& descriptor, int stack_parameter_count, | 108 const CallInterfaceDescriptor& descriptor, int stack_parameter_count, |
| 108 CallDescriptor::Flags flags) const { | 109 CallDescriptor::Flags flags, Operator::Properties properties) const { |
| 109 return GetStubCallDescriptor(descriptor, stack_parameter_count, flags, zone_); | 110 return GetStubCallDescriptor(descriptor, stack_parameter_count, flags, |
| 111 properties, zone_); |
| 110 } | 112 } |
| 111 | 113 |
| 112 | 114 |
| 113 // static | 115 // static |
| 114 bool Linkage::NeedsFrameState(Runtime::FunctionId function) { | 116 bool Linkage::NeedsFrameState(Runtime::FunctionId function) { |
| 115 if (!FLAG_turbo_deoptimization) { | 117 if (!FLAG_turbo_deoptimization) { |
| 116 return false; | 118 return false; |
| 117 } | 119 } |
| 118 // TODO(jarin) At the moment, we only add frame state for | 120 // TODO(jarin) At the moment, we only add frame state for |
| 119 // few chosen runtime functions. | 121 // few chosen runtime functions. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 CallDescriptor* Linkage::GetRuntimeCallDescriptor( | 233 CallDescriptor* Linkage::GetRuntimeCallDescriptor( |
| 232 Runtime::FunctionId function, int parameter_count, | 234 Runtime::FunctionId function, int parameter_count, |
| 233 Operator::Properties properties, Zone* zone) { | 235 Operator::Properties properties, Zone* zone) { |
| 234 UNIMPLEMENTED(); | 236 UNIMPLEMENTED(); |
| 235 return NULL; | 237 return NULL; |
| 236 } | 238 } |
| 237 | 239 |
| 238 | 240 |
| 239 CallDescriptor* Linkage::GetStubCallDescriptor( | 241 CallDescriptor* Linkage::GetStubCallDescriptor( |
| 240 const CallInterfaceDescriptor& descriptor, int stack_parameter_count, | 242 const CallInterfaceDescriptor& descriptor, int stack_parameter_count, |
| 241 CallDescriptor::Flags flags, Zone* zone) { | 243 CallDescriptor::Flags flags, OperatorProperties::Properties properties, |
| 244 Zone* zone) { |
| 242 UNIMPLEMENTED(); | 245 UNIMPLEMENTED(); |
| 243 return NULL; | 246 return NULL; |
| 244 } | 247 } |
| 245 | 248 |
| 246 | 249 |
| 247 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, | 250 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, |
| 248 MachineSignature* sig) { | 251 MachineSignature* sig) { |
| 249 UNIMPLEMENTED(); | 252 UNIMPLEMENTED(); |
| 250 return NULL; | 253 return NULL; |
| 251 } | 254 } |
| 252 #endif // !V8_TURBOFAN_BACKEND | 255 #endif // !V8_TURBOFAN_BACKEND |
| 253 } | 256 } |
| 254 } | 257 } |
| 255 } // namespace v8::internal::compiler | 258 } // namespace v8::internal::compiler |
| OLD | NEW |