code: function PromiseResolve(x) {
    if (!IS_RECEIVER(this)) {
      throw MakeTypeError(kCalledOnNonObject, PromiseResolve);
    }
    if (IsPromise(x) && x.constructor === this) return x;
  
    var promiseCapability = NewPromiseCapability(this);
    var resolveResult = %_Call(promiseCapability.resolve, UNDEFINED, x);
    return promiseCapability.promise;
  }
docs: ES#sec-promise.resolve Promise.resolve ( x )