@@ -11262,8 +11262,16 @@ default interfaces do not have such steps.
11262
11262
1. Let |constructorProto| be |realm|.\[[Intrinsics]].[[{{%Function.prototype%}}]].
11263
11263
1. If |I| inherits from some other interface |P|,
11264
11264
then set |constructorProto| to the [=interface object=] of |P| in |realm|.
11265
- 1. Let |F| be [=!=] <a abstract-op>CreateBuiltinFunction</a>(|steps|, « \[[Unforgeables]] »,
11265
+ 1. Let |length| be 0.
11266
+ 1. If |I| was declared with a [=constructor operation=], then
11267
+ 1. [=Compute the effective overload set=] for constructors with [=identifier=] |id| on
11268
+ [=interface=] |I| and with argument count 0, and let |S| be the result.
11269
+ 1. Set |length| to the length of the
11270
+ shortest argument list of the entries in |S|.
11271
+ 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « \[[Unforgeables]] »,
11266
11272
|realm|, |constructorProto|).
11273
+ 1. Perform [=!=] [$SetFunctionLength$](|F|, |length|).
11274
+ 1. Perform [=!=] [$SetFunctionName$](|F|, |id|).
11267
11275
1. Let |unforgeables| be [=!=] [$OrdinaryObjectCreate$](<emu-val>null</emu-val>).
11268
11276
1. [=Define the unforgeable regular operations=] of |I| on |unforgeables|, given |realm|.
11269
11277
1. [=Define the unforgeable regular attributes=] of |I| on |unforgeables|, given |realm|.
@@ -11273,14 +11281,6 @@ default interfaces do not have such steps.
11273
11281
of an interface with an unforgeable member use the same JavaScript function objects for
11274
11282
[=attribute getters=], [=attribute setters=] and [=creating an operation
11275
11283
function|operation functions=].
11276
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a>(|F|, |id|).
11277
- 1. Let |length| be 0.
11278
- 1. If |I| was declared with a [=constructor operation=], then
11279
- 1. [=Compute the effective overload set=] for constructors with [=identifier=] |id| on
11280
- [=interface=] |I| and with argument count 0, and let |S| be the result.
11281
- 1. Set |length| to the length of the
11282
- shortest argument list of the entries in |S|.
11283
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a>(|F|, |length|).
11284
11284
1. Let |proto| be the result of [=create an interface prototype object|creating an interface
11285
11285
prototype object=] of [=interface=] |I| in |realm|.
11286
11286
1. Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|F|, "<code>prototype</code>",
@@ -11326,12 +11326,12 @@ implement the interface on which the
11326
11326
1. Assert: |O| is an object that [=implements=] |I|.
11327
11327
1. Assert: |O|.\[[Realm]] is |realm|.
11328
11328
1. Return |O|.
11329
- 1. Let |F| be [=!=] <a abstract-op>CreateBuiltinFunction</a>(|steps|, « », |realm|).
11330
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a>(|F|, |id|).
11331
11329
1. [=Compute the effective overload set=] for legacy factory functions with [=identifier=] |id|
11332
11330
on [=interface=] |I| and with argument count 0, and let |S| be the result.
11333
11331
1. Let |length| be the length of the shortest argument list of the entries in |S|.
11334
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a>(|F|, |length|).
11332
+ 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
11333
+ 1. Perform [=!=] [$SetFunctionLength$](|F|, |length|).
11334
+ 1. Perform [=!=] [$SetFunctionName$](|F|, |id|).
11335
11335
1. Let |proto| be the [=interface prototype object=] of [=interface=] |I| in |realm|.
11336
11336
1. Perform [=!=] <a abstract-op>DefinePropertyOrThrow</a>(|F|, "<code>prototype</code>",
11337
11337
PropertyDescriptor{\[[Value]]: |proto|, \[[Writable]]: <emu-val>false</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>false</emu-val>}).
@@ -11680,10 +11680,10 @@ in which case they are exposed on every object that [=implements=] the interface
11680
11680
1. If |attribute|'s type is a [=promise type=], then return
11681
11681
[=!=] <a abstract-op>Call</a>({{%Promise.reject%}}, {{%Promise%}}, «|E|»).
11682
11682
1. Otherwise, end these steps and allow the exception to propagate.
11683
- 1. Let |F | be [=!=] <a abstract-op>CreateBuiltinFunction</a>(|steps|, « », |realm|) .
11684
- 1. Let |name | be the string "<code>get </code>" prepended to |attribute|'s [=identifier=] .
11685
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a> (|F|, |name| ).
11686
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a> (|F|, 0 ).
11683
+ 1. Let |name | be |attribute|'s [=identifier=] .
11684
+ 1. Let |F | be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|) .
11685
+ 1. Perform [=!=] [$SetFunctionLength$] (|F|, 0 ).
11686
+ 1. Perform [=!=] [$SetFunctionName$] (|F|, |name|, "<code>get</code>" ).
11687
11687
1. Return |F|.
11688
11688
11689
11689
</div>
@@ -11766,10 +11766,10 @@ in which case they are exposed on every object that [=implements=] the interface
11766
11766
1. Perform the [=setter steps=] of |attribute|,
11767
11767
with |idlObject| as [=this=] and |idlValue| as [=the given value=].
11768
11768
1. Return <emu-val>undefined</emu-val>
11769
- 1. Let |F | be [=!=] <a abstract-op>CreateBuiltinFunction</a>(|steps|, « », |realm|) .
11770
- 1. Let |name | be the string "<code>set </code>" prepended to |id| .
11771
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a> (|F|, |name| ).
11772
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a> (|F|, 1 ).
11769
+ 1. Let |name | be |attribute|'s [=identifier=] .
11770
+ 1. Let |F | be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|) .
11771
+ 1. Perform [=!=] [$SetFunctionLength$] (|F|, 1 ).
11772
+ 1. Perform [=!=] [$SetFunctionName$] (|F|, |name|, "<code>set</code>" ).
11773
11773
1. Return |F|.
11774
11774
</div>
11775
11775
@@ -11884,13 +11884,13 @@ in which case they are exposed on every object that [=implements=] the interface
11884
11884
that is a [=promise type=], then return
11885
11885
[=!=] <a abstract-op>Call</a>({{%Promise.reject%}}, {{%Promise%}}, «|E|»).
11886
11886
1. Otherwise, end these steps and allow the exception to propagate.
11887
- 1. Let |F| be [=!=] <a abstract-op>CreateBuiltinFunction</a>(|steps|, « », |realm|).
11888
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a>(|F|, |id|).
11889
11887
1. [=Compute the effective overload set=] for [=regular operations=] (if |op| is a regular
11890
11888
operation) or for [=static operations=] (if |op| is a static operation) with [=identifier=]
11891
11889
|id| on |target| and with argument count 0, and let |S| be the result.
11892
11890
1. Let |length| be the length of the shortest argument list in the entries in |S|.
11893
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a>(|F|, |length|).
11891
+ 1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
11892
+ 1. Perform [=!=] [$SetFunctionLength$](|F|, |length|).
11893
+ 1. Perform [=!=] [$SetFunctionName$](|F|, |id|).
11894
11894
1. Return |F|.
11895
11895
</div>
11896
11896
@@ -12253,8 +12253,8 @@ property is the String value "<code>forEach</code>".
12253
12253
as its [=default iterator object/kind=], and [=default iterator object/index=]
12254
12254
set to 0.
12255
12255
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12256
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>entries</code>").
12257
12256
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12257
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>entries</code>").
12258
12258
1. Perform [=!=] [$CreateMethodProperty$](|target|, {{@@iterator}}, |F|).
12259
12259
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>entries</code>", |F|).
12260
12260
1. Define the <code class="idl">keys</code> method:
@@ -12268,8 +12268,8 @@ property is the String value "<code>forEach</code>".
12268
12268
|esValue| as its [=default iterator object/target=], "<code>key</code>" as its
12269
12269
[=default iterator object/kind=], and [=default iterator object/index=] set to 0.
12270
12270
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12271
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>keys</code>").
12272
12271
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12272
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>keys</code>").
12273
12273
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>keys</code>", |F|).
12274
12274
1. Define the <code class="idl">values</code> method:
12275
12275
1. Let |steps| be the following series of steps:
@@ -12282,8 +12282,8 @@ property is the String value "<code>forEach</code>".
12282
12282
|esValue| as its [=default iterator object/target=], "<code>value</code>" as its
12283
12283
[=default iterator object/kind=], and [=default iterator object/index=] set to 0.
12284
12284
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12285
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>values</code>").
12286
12285
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12286
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>values</code>").
12287
12287
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>values</code>", |F|).
12288
12288
1. Define the <code class="idl">forEach</code> method:
12289
12289
1. Let |steps| be the following series of steps, given function argument values
@@ -12308,8 +12308,8 @@ property is the String value "<code>forEach</code>".
12308
12308
[=value pairs to iterate over=]. (It might have changed.)
12309
12309
1. Set |i| to |i| + 1.
12310
12310
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12311
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>forEach</code>").
12312
12311
1. Perform [=!=] [$SetFunctionLength$](|F|, 1).
12312
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>forEach</code>").
12313
12313
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>forEach</code>", |F|).
12314
12314
</div>
12315
12315
@@ -12444,8 +12444,8 @@ and the string "<code> Iterator</code>".
12444
12444
|idlObject|, |iterator|, and |idlArgs|, if any such steps exist.
12445
12445
1. Return |iterator|.
12446
12446
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12447
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>entries</code>").
12448
12447
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12448
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>entries</code>").
12449
12449
1. Perform [=!=] [$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|).
12450
12450
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>entries</code>", |F|).
12451
12451
1. If |definition| has a [=pair asynchronously iterable declaration=], then define the
@@ -12469,8 +12469,8 @@ and the string "<code> Iterator</code>".
12469
12469
|idlObject|, |iterator|, and |idlArgs|, if any such steps exist.
12470
12470
1. Return |iterator|.
12471
12471
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12472
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>keys</code>").
12473
12472
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12473
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>keys</code>").
12474
12474
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>keys</code>", |F|).
12475
12475
1. Define the <code class="idl">values</code>, and possibly {{@@asyncIterator}}, methods:
12476
12476
1. Let |steps| be the following series of steps, given function argument values |args|:
@@ -12492,8 +12492,8 @@ and the string "<code> Iterator</code>".
12492
12492
|idlObject|, |iterator|, and |idlArgs|, if any such steps exist.
12493
12493
1. Return |iterator|.
12494
12494
1. Let |F| be [=!=] [$CreateBuiltinFunction$](|steps|, « », |realm|).
12495
- 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>values</code>").
12496
12495
1. Perform [=!=] [$SetFunctionLength$](|F|, 0).
12496
+ 1. Perform [=!=] [$SetFunctionName$](|F|, "<code>values</code>").
12497
12497
1. Perform [=!=] [$CreateDataProperty$](|target|, "<code>values</code>", |F|).
12498
12498
1. If |definition| has a [=value asynchronously iterable declaration=], then perform [=!=]
12499
12499
[$CreateMethodProperty$](|target|, {{@@asyncIterator}}, |F|).
@@ -14028,9 +14028,9 @@ when applied to a [=legacy callback interface object=].
14028
14028
14029
14029
1. Let |steps| be the following steps:
14030
14030
1. [=ECMAScript/Throw=] a {{ECMAScript/TypeError}}.
14031
- 1. Let |F| be [=!=] <a abstract-op> CreateBuiltinFunction</a> (|steps|, « », |realm|).
14032
- 1. Perform [=!=] <a abstract-op>SetFunctionName</a> (|F|, |id| ).
14033
- 1. Perform [=!=] <a abstract-op>SetFunctionLength</a> (|F|, 0 ).
14031
+ 1. Let |F| be [=!=] [$ CreateBuiltinFunction$] (|steps|, « », |realm|).
14032
+ 1. Perform [=!=] [$SetFunctionLength$] (|F|, 0 ).
14033
+ 1. Perform [=!=] [$SetFunctionName$] (|F|, |id| ).
14034
14034
1. [=Define the constants=] of |interface| on |F| given |realm|.
14035
14035
1. Return |F|.
14036
14036
</div>
0 commit comments