@@ -11186,8 +11186,16 @@ default interfaces do not have such steps.
11186
11186
1. Let |constructorProto| be |realm|.\[[Intrinsics]].[[{{%Function.prototype%}}]].
11187
11187
1. If |I| inherits from some other interface |P|,
11188
11188
then set |constructorProto| to the [=interface object=] of |P| in |realm|.
11189
- 1. Let |F| be [=!=] <a abstract-op>CreateBuiltinFunction</a>(|steps|, « \[[Unforgeables]] »,
11189
+ 1. Let |length| be 0.
11190
+ 1. If |I| was declared with a [=constructor operation=], then
11191
+ 1. [=Compute the effective overload set=] for constructors with [=identifier=] |id| on
11192
+ [=interface=] |I| and with argument count 0, and let |S| be the result.
11193
+ 1. Set |length| to the length of the
11194
+ shortest argument list of the entries in |S|.
11195
+ 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « \[[Unforgeables]] »,
11190
11196
|realm|, |constructorProto|).
11197
+ 1. Perform [=!=] [$SetFunctionLength$](|F|, |length|).
11198
+ 1. Perform [=!=] [$SetFunctionName$](|F|, |id|).
11191
11199
1. Let |unforgeables| be [=!=] [$OrdinaryObjectCreate$](<emu-val>null</emu-val>).
11192
11200
1. [=Define the unforgeable regular operations=] of |I| on |unforgeables|, given |realm|.
11193
11201
1. [=Define the unforgeable regular attributes=] of |I| on |unforgeables|, given |realm|.
@@ -11197,14 +11205,6 @@ default interfaces do not have such steps.
11197
11205
of an interface with an unforgeable member use the same JavaScript function objects for
11198
11206
[=attribute getters=], [=attribute setters=] and [=creating an operation
11199
11207
function|operation functions=].
11200
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a>(|F|, |id|).
11201
- 1. Let |length| be 0.
11202
- 1. If |I| was declared with a [=constructor operation=], then
11203
- 1. [=Compute the effective overload set=] for constructors with [=identifier=] |id| on
11204
- [=interface=] |I| and with argument count 0, and let |S| be the result.
11205
- 1. Set |length| to the length of the
11206
- shortest argument list of the entries in |S|.
11207
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a>(|F|, |length|).
11208
11208
1. Let |proto| be the result of [=create an interface prototype object|creating an interface
11209
11209
prototype object=] of [=interface=] |I| in |realm|.
11210
11210
1. Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|F|, "<code>prototype</code>",
@@ -11250,12 +11250,12 @@ implement the interface on which the
11250
11250
1. Assert: |O| is an object that [=implements=] |I|.
11251
11251
1. Assert: |O|.\[[Realm]] is |realm|.
11252
11252
1. Return |O|.
11253
- 1. Let |F| be [=!=] <a abstract-op>CreateBuiltinFunction</a>(|steps|, « », |realm|).
11254
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a>(|F|, |id|).
11255
11253
1. [=Compute the effective overload set=] for legacy factory functions with [=identifier=] |id|
11256
11254
on [=interface=] |I| and with argument count 0, and let |S| be the result.
11257
11255
1. Let |length| be the length of the shortest argument list of the entries in |S|.
11258
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a>(|F|, |length|).
11256
+ 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
11257
+ 1. Perform [=!=] [$SetFunctionLength$](|F|, |length|).
11258
+ 1. Perform [=!=] [$SetFunctionName$](|F|, |id|).
11259
11259
1. Let |proto| be the [=interface prototype object=] of [=interface=] |I| in |realm|.
11260
11260
1. Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|F|, "<code>prototype</code>",
11261
11261
PropertyDescriptor{\[[Value]]: |proto|, \[[Writable]]: <emu-val>false</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>false</emu-val>}).
@@ -11604,10 +11604,10 @@ in which case they are exposed on every object that [=implements=] the interface
11604
11604
1. If |attribute|'s type is a [=promise type=], then return
11605
11605
[=!=] <a abstract-op>Call</a>({{%Promise.reject%}}, {{%Promise%}}, «|E|»).
11606
11606
1. Otherwise, end these steps and allow the exception to propagate.
11607
- 1. Let |F| be [=!=] <a abstract-op>CreateBuiltinFunction</a>(|steps|, « », |realm|).
11608
11607
1. Let |name| be the string "<code>get </code>" prepended to |attribute|'s [=identifier=].
11609
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a>(|F|, |name|).
11610
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a>(|F|, 0).
11608
+ 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
11609
+ 1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
11610
+ 1. Perform [=!=] [$SetFunctionName$](|F|, |name|).
11611
11611
1. Return |F|.
11612
11612
11613
11613
</div>
@@ -11690,10 +11690,10 @@ in which case they are exposed on every object that [=implements=] the interface
11690
11690
1. Perform the [=setter steps=] of |attribute|,
11691
11691
with |idlObject| as [=this=] and |idlValue| as [=the given value=].
11692
11692
1. Return <emu-val>undefined</emu-val>
11693
- 1. Let |F| be [=!=] <a abstract-op>CreateBuiltinFunction</a>(|steps|, « », |realm|).
11694
11693
1. Let |name| be the string "<code>set </code>" prepended to |id|.
11695
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a>(|F|, |name|).
11696
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a>(|F|, 1).
11694
+ 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
11695
+ 1. Perform [=!=] [$SetFunctionLength$](|F|, 1).
11696
+ 1. Perform [=!=] [$SetFunctionName$](|F|, |name|).
11697
11697
1. Return |F|.
11698
11698
</div>
11699
11699
@@ -11808,13 +11808,13 @@ in which case they are exposed on every object that [=implements=] the interface
11808
11808
that is a [=promise type=], then return
11809
11809
[=!=] <a abstract-op>Call</a>({{%Promise.reject%}}, {{%Promise%}}, «|E|»).
11810
11810
1. Otherwise, end these steps and allow the exception to propagate.
11811
- 1. Let |F| be [=!=] <a abstract-op>CreateBuiltinFunction</a>(|steps|, « », |realm|).
11812
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a>(|F|, |id|).
11813
11811
1. [=Compute the effective overload set=] for [=regular operations=] (if |op| is a regular
11814
11812
operation) or for [=static operations=] (if |op| is a static operation) with [=identifier=]
11815
11813
|id| on |target| and with argument count 0, and let |S| be the result.
11816
11814
1. Let |length| be the length of the shortest argument list in the entries in |S|.
11817
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a>(|F|, |length|).
11815
+ 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
11816
+ 1. Perform [=!=] [$SetFunctionLength$](|F|, |length|).
11817
+ 1. Perform [=!=] [$SetFunctionName$](|F|, |id|).
11818
11818
1. Return |F|.
11819
11819
</div>
11820
11820
@@ -12177,8 +12177,8 @@ property is the String value "<code>forEach</code>".
12177
12177
as its [=default iterator object/kind=], and [=default iterator object/index=]
12178
12178
set to 0.
12179
12179
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12180
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>entries</code>").
12181
12180
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12181
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>entries</code>").
12182
12182
1. Perform [=!=] [$CreateMethodProperty$](|target|, {{@@iterator}}, |F|).
12183
12183
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>entries</code>", |F|).
12184
12184
1. Define the <code class="idl">keys</code> method:
@@ -12192,8 +12192,8 @@ property is the String value "<code>forEach</code>".
12192
12192
|esValue| as its [=default iterator object/target=], "<code>key</code>" as its
12193
12193
[=default iterator object/kind=], and [=default iterator object/index=] set to 0.
12194
12194
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12195
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>keys</code>").
12196
12195
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12196
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>keys</code>").
12197
12197
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>keys</code>", |F|).
12198
12198
1. Define the <code class="idl">values</code> method:
12199
12199
1. Let |steps| be the following series of steps:
@@ -12206,8 +12206,8 @@ property is the String value "<code>forEach</code>".
12206
12206
|esValue| as its [=default iterator object/target=], "<code>value</code>" as its
12207
12207
[=default iterator object/kind=], and [=default iterator object/index=] set to 0.
12208
12208
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12209
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>values</code>").
12210
12209
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12210
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>values</code>").
12211
12211
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>values</code>", |F|).
12212
12212
1. Define the <code class="idl">forEach</code> method:
12213
12213
1. Let |steps| be the following series of steps, given function argument values
@@ -12232,8 +12232,8 @@ property is the String value "<code>forEach</code>".
12232
12232
[=value pairs to iterate over=]. (It might have changed.)
12233
12233
1. Set |i| to |i| + 1.
12234
12234
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12235
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>forEach</code>").
12236
12235
1. Perform [=!=] [$SetFunctionLength$](|F|, 1).
12236
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>forEach</code>").
12237
12237
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>forEach</code>", |F|).
12238
12238
</div>
12239
12239
@@ -12368,8 +12368,8 @@ and the string "<code> Iterator</code>".
12368
12368
|idlObject|, |iterator|, and |idlArgs|, if any such steps exist.
12369
12369
1. Return |iterator|.
12370
12370
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12371
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>entries</code>").
12372
12371
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12372
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>entries</code>").
12373
12373
1. Perform [=!=] [$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|).
12374
12374
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>entries</code>", |F|).
12375
12375
1. If |definition| has a [=pair asynchronously iterable declaration=], then define the
@@ -12393,8 +12393,8 @@ and the string "<code> Iterator</code>".
12393
12393
|idlObject|, |iterator|, and |idlArgs|, if any such steps exist.
12394
12394
1. Return |iterator|.
12395
12395
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12396
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>keys</code>").
12397
12396
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12397
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>keys</code>").
12398
12398
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>keys</code>", |F|).
12399
12399
1. Define the <code class="idl">values</code>, and possibly {{@@asyncIterator}}, methods:
12400
12400
1. Let |steps| be the following series of steps, given function argument values |args|:
@@ -12416,8 +12416,8 @@ and the string "<code> Iterator</code>".
12416
12416
|idlObject|, |iterator|, and |idlArgs|, if any such steps exist.
12417
12417
1. Return |iterator|.
12418
12418
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12419
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>values</code>").
12420
12419
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12420
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>values</code>").
12421
12421
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>values</code>", |F|).
12422
12422
1. If |definition| has a [=value asynchronously iterable declaration=], then perform [=!=]
12423
12423
[$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|).
@@ -13952,9 +13952,9 @@ when applied to a [=legacy callback interface object=].
13952
13952
13953
13953
1. Let |steps| be the following steps:
13954
13954
1. [=ECMAScript/Throw=] a {{ECMAScript/TypeError}}.
13955
- 1. Let |F| be [=!=] <a abstract-op> CreateBuiltinFunction</a> (|steps|, « », |realm|).
13956
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a> (|F|, |id| ).
13957
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a> (|F|, 0 ).
13955
+ 1. Let |F| be [=!=] [$ CreateBuiltinFunction$] (|steps|, « », |realm|).
13956
+ 1. Perform [=!=] [$SetFunctionLength$] (|F|, 0 ).
13957
+ 1. Perform [=!=] [$SetFunctionName$] (|F|, |id| ).
13958
13958
1. [=Define the constants=] of |interface| on |F| given |realm|.
13959
13959
1. Return |F|.
13960
13960
</div>
0 commit comments