| Index: src/compiler/linkage.cc
|
| diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
|
| index c3f6074fa635453b5945947e60246793f981fb26..ced550de2d9bcf8dccd7c21d06f43fdc8af47a85 100644
|
| --- a/src/compiler/linkage.cc
|
| +++ b/src/compiler/linkage.cc
|
| @@ -565,6 +565,28 @@ LinkageLocation Linkage::GetOsrValueLocation(int index) const {
|
| return incoming_->GetInputLocation(parameter_index);
|
| }
|
| }
|
| +
|
| +
|
| +bool Linkage::ParameterHasSecondaryLocation(int index) const {
|
| + if (incoming_->kind() != CallDescriptor::kCallJSFunction) return false;
|
| + LinkageLocation loc = GetParameterLocation(index);
|
| + return (loc == regloc(kJSFunctionRegister) ||
|
| + loc == regloc(kContextRegister));
|
| +}
|
| +
|
| +LinkageLocation Linkage::GetParameterSecondaryLocation(int index) const {
|
| + DCHECK(ParameterHasSecondaryLocation(index));
|
| + LinkageLocation loc = GetParameterLocation(index);
|
| +
|
| + if (loc == regloc(kJSFunctionRegister)) {
|
| + return LinkageLocation::ForCalleeFrameSlot(Frame::kJSFunctionSlot);
|
| + } else {
|
| + DCHECK(loc == regloc(kContextRegister));
|
| + return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot);
|
| + }
|
| +}
|
| +
|
| +
|
| } // namespace compiler
|
| } // namespace internal
|
| } // namespace v8
|
|
|