ember/ember-3.16.10.template-compiler.js
/**
    Wraps the passed function so that `this._super` will point to the superFunc
    when the function is invoked. This is the primitive we use to implement
    calls to super.
  
    @private
    @method wrap
    @for Ember
    @param {Function} func The function to call
    @param {Function} superFunc The super function.
    @return {Function} wrapped function.
  */
Wraps the passed function so that `this._super` will point to the superFunc
when the function is invoked. This is the primitive we use to implement
calls to super.
Wraps the passed function so that ` this . _super ` will point to the superFunc when the function is invoked . This is the primitive we use to implement calls to super .
function wrap(func, superFunc) {
    if (!hasSuper(func)) {
      return func;
    } 
    if (!IS_WRAPPED_FUNCTION_SET.has(superFunc) && hasSuper(superFunc)) {
      return _wrap(func, _wrap(superFunc, ROOT));
    }
    return _wrap(func, superFunc);
  }
function wrap ( func , superFunc ) { if ( ! hasSuper ( func ) ) { return func ; } if ( ! IS_WRAPPED_FUNCTION_SET . has ( superFunc ) && hasSuper ( superFunc ) ) { return _wrap ( func , _wrap ( superFunc , ROOT ) ) ; } return _wrap ( func , superFunc ) ; }
Wraps the passed function so that `this._super` will point to the superFunc
when the function is invoked.
Wraps the passed function so that ` this . _super ` will point to the superFunc when the function is invoked .
// ensure an unwrapped super that calls _super is wrapped with a terminal _super