| Index: src/compiler/linkage.cc
|
| diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
|
| index 5421f4110f0645b2ffadd0b6f350910fc49b9f46..2b1e6d4fd0db85b6737fbfdd63d9f32beff6c772 100644
|
| --- a/src/compiler/linkage.cc
|
| +++ b/src/compiler/linkage.cc
|
| @@ -7,6 +7,7 @@
|
| #include "src/compiler/common-operator.h"
|
| #include "src/compiler/linkage.h"
|
| #include "src/compiler/node.h"
|
| +#include "src/compiler/osr.h"
|
| #include "src/compiler/pipeline.h"
|
| #include "src/scopes.h"
|
|
|
| @@ -14,7 +15,6 @@ namespace v8 {
|
| namespace internal {
|
| namespace compiler {
|
|
|
| -
|
| std::ostream& operator<<(std::ostream& os, const CallDescriptor::Kind& k) {
|
| switch (k) {
|
| case CallDescriptor::kCallCodeObject:
|
| @@ -247,42 +247,26 @@ bool CallDescriptor::UsesOnlyRegisters() const {
|
| }
|
|
|
|
|
| -//==============================================================================
|
| -// Provide unimplemented methods on unsupported architectures, to at least link.
|
| -//==============================================================================
|
| -#if !V8_TURBOFAN_BACKEND
|
| -CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr,
|
| - int parameter_count,
|
| - CallDescriptor::Flags flags) {
|
| - UNIMPLEMENTED();
|
| - return NULL;
|
| -}
|
| -
|
| -
|
| LinkageLocation Linkage::GetOsrValueLocation(int index) const {
|
| - UNIMPLEMENTED();
|
| - return LinkageLocation(-1); // Dummy value
|
| -}
|
| -
|
| + CHECK(incoming_->IsJSFunctionCall());
|
| + int parameter_count = static_cast<int>(incoming_->JSParameterCount() - 1);
|
| + int first_stack_slot = OsrHelper::FirstStackSlotIndex(parameter_count);
|
|
|
| -CallDescriptor* Linkage::GetRuntimeCallDescriptor(
|
| - Zone* zone, Runtime::FunctionId function, int parameter_count,
|
| - Operator::Properties properties) {
|
| - UNIMPLEMENTED();
|
| - return NULL;
|
| -}
|
| -
|
| -
|
| -CallDescriptor* Linkage::GetStubCallDescriptor(
|
| - Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
|
| - int stack_parameter_count, CallDescriptor::Flags flags,
|
| - Operator::Properties properties, MachineType return_type) {
|
| - UNIMPLEMENTED();
|
| - return NULL;
|
| + if (index == kOsrContextSpillSlotIndex) {
|
| + // Context. Use the parameter location of the context spill slot.
|
| + // Parameter (arity + 1) is special for the context of the function frame.
|
| + int context_index = 1 + 1 + parameter_count; // target + receiver + params
|
| + return incoming_->GetInputLocation(context_index);
|
| + } else if (index >= first_stack_slot) {
|
| + // Local variable stored in this (callee) stack.
|
| + int spill_index = index - first_stack_slot;
|
| + return LinkageLocation::ForCalleeFrameSlot(spill_index);
|
| + } else {
|
| + // Parameter. Use the assigned location from the incoming call descriptor.
|
| + int parameter_index = 1 + index; // skip index 0, which is the target.
|
| + return incoming_->GetInputLocation(parameter_index);
|
| + }
|
| }
|
| -
|
| -
|
| -#endif // !V8_TURBOFAN_BACKEND
|
| } // namespace compiler
|
| } // namespace internal
|
| } // namespace v8
|
|
|