| Index: src/compiler/linkage-impl.h
 | 
| diff --git a/src/compiler/linkage-impl.h b/src/compiler/linkage-impl.h
 | 
| index 88cf125540fae3101b5388e26f904966ced4f3fd..c4a8007bb8a3820608bcd84e8fc2e667e72b3d02 100644
 | 
| --- a/src/compiler/linkage-impl.h
 | 
| +++ b/src/compiler/linkage-impl.h
 | 
| @@ -71,7 +71,7 @@ class LinkageHelper {
 | 
|    template <typename LinkageTraits>
 | 
|    static CallDescriptor* GetRuntimeCallDescriptor(
 | 
|        Zone* zone, Runtime::FunctionId function_id, int parameter_count,
 | 
| -      Operator::Property properties, CallDescriptor::Flags flags) {
 | 
| +      Operator::Property properties) {
 | 
|      const int code_count = 1;
 | 
|      const int function_count = 1;
 | 
|      const int num_args_count = 1;
 | 
| @@ -109,6 +109,10 @@ class LinkageHelper {
 | 
|          WordRegisterLocation(LinkageTraits::RuntimeCallArgCountReg());
 | 
|      locations[index++] = TaggedRegisterLocation(LinkageTraits::ContextReg());
 | 
|  
 | 
| +    CallDescriptor::Flags flags = Linkage::NeedsFrameState(function_id)
 | 
| +                                      ? CallDescriptor::kNeedsFrameState
 | 
| +                                      : CallDescriptor::kNoFlags;
 | 
| +
 | 
|      // TODO(titzer): refactor TurboFan graph to consider context a value input.
 | 
|      return new (zone) CallDescriptor(CallDescriptor::kCallCodeObject,  // kind
 | 
|                                       return_count,     // return_count
 | 
| @@ -196,6 +200,25 @@ class LinkageHelper {
 | 
|    }
 | 
|  };
 | 
|  
 | 
| +
 | 
| +bool Linkage::NeedsFrameState(Runtime::FunctionId function) {
 | 
| +  if (!FLAG_turbo_deoptimization) {
 | 
| +    return false;
 | 
| +  }
 | 
| +  // TODO(jarin) At the moment, we only add frame state for
 | 
| +  // few chosen runtime functions.
 | 
| +  switch (function) {
 | 
| +    case Runtime::kDebugBreak:
 | 
| +    case Runtime::kDeoptimizeFunction:
 | 
| +    case Runtime::kSetScriptBreakPoint:
 | 
| +    case Runtime::kDebugGetLoadedScripts:
 | 
| +    case Runtime::kStackGuard:
 | 
| +      return true;
 | 
| +    default:
 | 
| +      return false;
 | 
| +  }
 | 
| +}
 | 
| +
 | 
|  }  // namespace compiler
 | 
|  }  // namespace internal
 | 
|  }  // namespace v8
 | 
| 
 |