Skip to content

Commit

Permalink
[js-api] Update CreateBuiltinFunction call for ES changes. (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger authored and fgmccabe committed Apr 20, 2022
1 parent 227aa96 commit a51b674
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ urlPrefix: https://tc39.github.io/ecma262/; spec: ECMASCRIPT
url: sec-well-known-intrinsic-objects
text: %ErrorPrototype%
text: %ObjectPrototype%; url: sec-properties-of-the-object-prototype-object
text: %FunctionPrototype%; url: sec-properties-of-the-function-prototype-object
text: %Promise%; url: sec-promise-constructor
text: Property Descriptor; url: sec-property-descriptor-specification-type
text: array index; url: sec-array-exotic-objects
Expand Down Expand Up @@ -978,15 +977,13 @@ This slot holds a [=function address=] relative to the [=surrounding agent=]'s [
1. Return |map|[|funcaddr|].
1. Let |steps| be "[=call an Exported Function|call the Exported Function=] |funcaddr| with arguments."
1. Let |realm| be the [=current Realm=].
1. Let |function| be [=CreateBuiltinFunction=](|realm|, |steps|, [=%FunctionPrototype%=], « \[[FunctionAddress]] »).
1. Set |function|.\[[FunctionAddress]] to |funcaddr|.
1. Let |store| be the [=surrounding agent=]'s [=associated store=].
1. Let |functype| be [=func_type=](|store|, |funcaddr|).
1. Let [|paramTypes|][<var ignore>resultTypes</var>] be |functype|.
1. Let |arity| be |paramTypes|'s [=list/size=].
1. Perform ! [=SetFunctionLength=](|function|, |arity|).
1. Let |name| be the [=name of the WebAssembly function=] |funcaddr|.
1. Perform ! [=SetFunctionName=](|function|, |name|).
1. Let |function| be [=!=] [=CreateBuiltinFunction=](|steps|, |arity|, |name|, « \[[FunctionAddress]] », |realm|).
1. Set |function|.\[[FunctionAddress]] to |funcaddr|.
1. [=map/Set=] |map|[|funcaddr|] to |function|.
1. Return |function|.
</div>
Expand Down

0 comments on commit a51b674

Please sign in to comment.