function getReturnContext(state) {
  let context = state.tryContext;

  while (context) {
    if (context.hasFinalizer && context.position !== 'finally') {
      return context;
    }
    context = context.upper;
  }

  return state;
}
Gets a context for a `return` statement.
@param {CodePathState} state A state to get.
@returns {TryContext|CodePathState} A context for a `return` statement.