From 717ffdbaba353c7c9cf61ed218dfea69059aea47 Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Thu, 3 Sep 2020 07:10:00 +0200 Subject: [PATCH] =?UTF-8?q?Normative:=20Match=C2=A0ECMA=E2=80=91262=20func?= =?UTF-8?q?tion=C2=A0property=20enumeration=C2=A0order?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.bs | 62 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/index.bs b/index.bs index ba512a051..4b66ec671 100644 --- a/index.bs +++ b/index.bs @@ -11186,8 +11186,16 @@ default interfaces do not have such steps. 1. Let |constructorProto| be |realm|.\[[Intrinsics]].[[{{%Function.prototype%}}]]. 1. If |I| inherits from some other interface |P|, then set |constructorProto| to the [=interface object=] of |P| in |realm|. - 1. Let |F| be [=!=] CreateBuiltinFunction(|steps|, « \[[Unforgeables]] », + 1. Let |length| be 0. + 1. If |I| was declared with a [=constructor operation=], then + 1. [=Compute the effective overload set=] for constructors with [=identifier=] |id| on + [=interface=] |I| and with argument count 0, and let |S| be the result. + 1. Set |length| to the length of the + shortest argument list of the entries in |S|. + 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « \[[Unforgeables]] », |realm|, |constructorProto|). + 1. Perform [=!=] [$SetFunctionLength$](|F|, |length|). + 1. Perform [=!=] [$SetFunctionName$](|F|, |id|). 1. Let |unforgeables| be [=!=] [$OrdinaryObjectCreate$](null). 1. [=Define the unforgeable regular operations=] of |I| on |unforgeables|, given |realm|. 1. [=Define the unforgeable regular attributes=] of |I| on |unforgeables|, given |realm|. @@ -11197,14 +11205,6 @@ default interfaces do not have such steps. of an interface with an unforgeable member use the same JavaScript function objects for [=attribute getters=], [=attribute setters=] and [=creating an operation function|operation functions=]. - 1. Perform [=!=] SetFunctionName(|F|, |id|). - 1. Let |length| be 0. - 1. If |I| was declared with a [=constructor operation=], then - 1. [=Compute the effective overload set=] for constructors with [=identifier=] |id| on - [=interface=] |I| and with argument count 0, and let |S| be the result. - 1. Set |length| to the length of the - shortest argument list of the entries in |S|. - 1. Perform [=!=] SetFunctionLength(|F|, |length|). 1. Let |proto| be the result of [=create an interface prototype object|creating an interface prototype object=] of [=interface=] |I| in |realm|. 1. Perform [=!=] DefinePropertyOrThrow(|F|, "prototype", @@ -11250,12 +11250,12 @@ implement the interface on which the 1. Assert: |O| is an object that [=implements=] |I|. 1. Assert: |O|.\[[Realm]] is |realm|. 1. Return |O|. - 1. Let |F| be [=!=] CreateBuiltinFunction(|steps|, « », |realm|). - 1. Perform [=!=] SetFunctionName(|F|, |id|). 1. [=Compute the effective overload set=] for legacy factory functions with [=identifier=] |id| on [=interface=] |I| and with argument count 0, and let |S| be the result. 1. Let |length| be the length of the shortest argument list of the entries in |S|. - 1. Perform [=!=] SetFunctionLength(|F|, |length|). + 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). + 1. Perform [=!=] [$SetFunctionLength$](|F|, |length|). + 1. Perform [=!=] [$SetFunctionName$](|F|, |id|). 1. Let |proto| be the [=interface prototype object=] of [=interface=] |I| in |realm|. 1. Perform [=!=] DefinePropertyOrThrow(|F|, "prototype", PropertyDescriptor{\[[Value]]: |proto|, \[[Writable]]: false, \[[Enumerable]]: false, \[[Configurable]]: false}). @@ -11604,10 +11604,10 @@ in which case they are exposed on every object that [=implements=] the interface 1. If |attribute|'s type is a [=promise type=], then return [=!=] Call({{%Promise.reject%}}, {{%Promise%}}, «|E|»). 1. Otherwise, end these steps and allow the exception to propagate. - 1. Let |F| be [=!=] CreateBuiltinFunction(|steps|, « », |realm|). 1. Let |name| be the string "get " prepended to |attribute|'s [=identifier=]. - 1. Perform [=!=] SetFunctionName(|F|, |name|). - 1. Perform [=!=] SetFunctionLength(|F|, 0). + 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). + 1. Perform [=!=] [$SetFunctionLength$](|F|, 0). + 1. Perform [=!=] [$SetFunctionName$](|F|, |name|). 1. Return |F|. @@ -11690,10 +11690,10 @@ in which case they are exposed on every object that [=implements=] the interface 1. Perform the [=setter steps=] of |attribute|, with |idlObject| as [=this=] and |idlValue| as [=the given value=]. 1. Return undefined - 1. Let |F| be [=!=] CreateBuiltinFunction(|steps|, « », |realm|). 1. Let |name| be the string "set " prepended to |id|. - 1. Perform [=!=] SetFunctionName(|F|, |name|). - 1. Perform [=!=] SetFunctionLength(|F|, 1). + 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). + 1. Perform [=!=] [$SetFunctionLength$](|F|, 1). + 1. Perform [=!=] [$SetFunctionName$](|F|, |name|). 1. Return |F|. @@ -11808,13 +11808,13 @@ in which case they are exposed on every object that [=implements=] the interface that is a [=promise type=], then return [=!=] Call({{%Promise.reject%}}, {{%Promise%}}, «|E|»). 1. Otherwise, end these steps and allow the exception to propagate. - 1. Let |F| be [=!=] CreateBuiltinFunction(|steps|, « », |realm|). - 1. Perform [=!=] SetFunctionName(|F|, |id|). 1. [=Compute the effective overload set=] for [=regular operations=] (if |op| is a regular operation) or for [=static operations=] (if |op| is a static operation) with [=identifier=] |id| on |target| and with argument count 0, and let |S| be the result. 1. Let |length| be the length of the shortest argument list in the entries in |S|. - 1. Perform [=!=] SetFunctionLength(|F|, |length|). + 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). + 1. Perform [=!=] [$SetFunctionLength$](|F|, |length|). + 1. Perform [=!=] [$SetFunctionName$](|F|, |id|). 1. Return |F|. @@ -12177,8 +12177,8 @@ property is the String value "forEach". as its [=default iterator object/kind=], and [=default iterator object/index=] set to 0. 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). - 1. Perform [=!=] [$SetFunctionName$](|F|, "entries"). 1. Perform [=!=] [$SetFunctionLength$](|F|, 0). + 1. Perform [=!=] [$SetFunctionName$](|F|, "entries"). 1. Perform [=!=] [$CreateMethodProperty$](|target|, {{@@iterator}}, |F|). 1. Perform [=!=] [$CreateDataProperty$](|target|, "entries", |F|). 1. Define the keys method: @@ -12192,8 +12192,8 @@ property is the String value "forEach". |esValue| as its [=default iterator object/target=], "key" as its [=default iterator object/kind=], and [=default iterator object/index=] set to 0. 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). - 1. Perform [=!=] [$SetFunctionName$](|F|, "keys"). 1. Perform [=!=] [$SetFunctionLength$](|F|, 0). + 1. Perform [=!=] [$SetFunctionName$](|F|, "keys"). 1. Perform [=!=] [$CreateDataProperty$](|target|, "keys", |F|). 1. Define the values method: 1. Let |steps| be the following series of steps: @@ -12206,8 +12206,8 @@ property is the String value "forEach". |esValue| as its [=default iterator object/target=], "value" as its [=default iterator object/kind=], and [=default iterator object/index=] set to 0. 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). - 1. Perform [=!=] [$SetFunctionName$](|F|, "values"). 1. Perform [=!=] [$SetFunctionLength$](|F|, 0). + 1. Perform [=!=] [$SetFunctionName$](|F|, "values"). 1. Perform [=!=] [$CreateDataProperty$](|target|, "values", |F|). 1. Define the forEach method: 1. Let |steps| be the following series of steps, given function argument values @@ -12232,8 +12232,8 @@ property is the String value "forEach". [=value pairs to iterate over=]. (It might have changed.) 1. Set |i| to |i| + 1. 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). - 1. Perform [=!=] [$SetFunctionName$](|F|, "forEach"). 1. Perform [=!=] [$SetFunctionLength$](|F|, 1). + 1. Perform [=!=] [$SetFunctionName$](|F|, "forEach"). 1. Perform [=!=] [$CreateDataProperty$](|target|, "forEach", |F|). @@ -12368,8 +12368,8 @@ and the string " Iterator". |idlObject|, |iterator|, and |idlArgs|, if any such steps exist. 1. Return |iterator|. 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). - 1. Perform [=!=] [$SetFunctionName$](|F|, "entries"). 1. Perform [=!=] [$SetFunctionLength$](|F|, 0). + 1. Perform [=!=] [$SetFunctionName$](|F|, "entries"). 1. Perform [=!=] [$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|). 1. Perform [=!=] [$CreateDataProperty$](|target|, "entries", |F|). 1. If |definition| has a [=pair asynchronously iterable declaration=], then define the @@ -12393,8 +12393,8 @@ and the string " Iterator". |idlObject|, |iterator|, and |idlArgs|, if any such steps exist. 1. Return |iterator|. 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). - 1. Perform [=!=] [$SetFunctionName$](|F|, "keys"). 1. Perform [=!=] [$SetFunctionLength$](|F|, 0). + 1. Perform [=!=] [$SetFunctionName$](|F|, "keys"). 1. Perform [=!=] [$CreateDataProperty$](|target|, "keys", |F|). 1. Define the values, and possibly {{@@asyncIterator}}, methods: 1. Let |steps| be the following series of steps, given function argument values |args|: @@ -12416,8 +12416,8 @@ and the string " Iterator". |idlObject|, |iterator|, and |idlArgs|, if any such steps exist. 1. Return |iterator|. 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). - 1. Perform [=!=] [$SetFunctionName$](|F|, "values"). 1. Perform [=!=] [$SetFunctionLength$](|F|, 0). + 1. Perform [=!=] [$SetFunctionName$](|F|, "values"). 1. Perform [=!=] [$CreateDataProperty$](|target|, "values", |F|). 1. If |definition| has a [=value asynchronously iterable declaration=], then perform [=!=] [$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|). @@ -13952,9 +13952,9 @@ when applied to a [=legacy callback interface object=]. 1. Let |steps| be the following steps: 1. [=ECMAScript/Throw=] a {{ECMAScript/TypeError}}. - 1. Let |F| be [=!=] CreateBuiltinFunction(|steps|, « », |realm|). - 1. Perform [=!=] SetFunctionName(|F|, |id|). - 1. Perform [=!=] SetFunctionLength(|F|, 0). + 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|). + 1. Perform [=!=] [$SetFunctionLength$](|F|, 0). + 1. Perform [=!=] [$SetFunctionName$](|F|, |id|). 1. [=Define the constants=] of |interface| on |F| given |realm|. 1. Return |F|.