diff --git a/doc/Features.md b/doc/Features.md index f5dc24f947a..805e732d436 100644 --- a/doc/Features.md +++ b/doc/Features.md @@ -87,6 +87,6 @@ Specific behaviors where Hermes differs from the ECMAScript specification or has * **Extra microtask hop on subclass `.then`.** When `this.constructor !== Promise`, the polyfill bridges the user's reaction to the subclass capability through an intermediate core `Promise`, costing one additional microtask hop compared to spec's `PerformPromiseThen`, which attaches the reaction directly to the capability. The fast path (`this.constructor === Promise`) is unaffected. * **`Promise.all` 1-microtask fast path (non-spec, default).** When an input is an already-fulfilled core `Promise`, the polyfill synchronously invokes the resolve element and collapses the spec-mandated `PerformPromiseAll` step 8.e microtask hop. This is a deliberate performance default; the spec-compliant `.then`-only dispatch is enabled under the `--test262` runtime flag. * **Microtask timing in `await`.** Hermes' `async function` machinery lowers to a generator wrapped with the polyfill's `then`, and a few test262 tick-counting tests (e.g. `await-non-promise-thenable`, the `for-await-of/ticks-with-…-constructor-lookup` family) observe a different microtask sequence than spec because the polyfill does one fewer `.constructor` read on each await hop. - * See the [polyfill source](https://github.com/facebook/hermes/blob/HEAD/utils/promise/index.js). + * See the [polyfill source](https://github.com/facebook/hermes/blob/static_h/lib/InternalJavaScript/01-Promise.js). * **`Symbol.prototype.description` Conformance:** While `Symbol('desc').description` works as expected, `Symbol().description` currently returns `''` (empty string) instead of the spec-compliant `undefined`.