Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Jul 21, 2020
1 parent d81c2c6 commit e417f39
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -8688,6 +8688,8 @@ <h1>SetFunctionName ( _F_, _name_ [ , _prefix_ ] )</h1>
1. Set _F_.[[InitialName]] to _name_.
1. If _prefix_ is present, then
1. Set _name_ to the string-concatenation of _prefix_, the code unit 0x0020 (SPACE), and _name_.
1. If _F_ has an [[InitialName]] internal slot, then
1. Optionally, set _F_.[[InitialName]] to _name_.
1. Return ! DefinePropertyOrThrow(_F_, *"name"*, PropertyDescriptor { [[Value]]: _name_, [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }).
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -26473,7 +26475,7 @@ <h1>Function.prototype.toString ( )</h1>
<p>When the `toString` method is called, the following steps are taken:</p>
<emu-alg>
1. Let _func_ be the *this* value.
1. If _func_ is a <emu-xref href="#sec-bound-function-exotic-objects">bound function exotic object</emu-xref> or a <emu-xref href="#sec-built-in-function-objects">built-in function object</emu-xref>, then return an implementation-defined String source code representation of _func_. The representation must have the syntax of a |NativeFunction|. Additionally, if _func_ has an [[InitialName]] internal slot and _func_.[[InitialName]] is a String, the portion of the returned String that would be matched by |PropertyName| must be the value of _func_.[[InitialName]].
1. If _func_ is a <emu-xref href="#sec-bound-function-exotic-objects">bound function exotic object</emu-xref> or a <emu-xref href="#sec-built-in-function-objects">built-in function object</emu-xref>, then return an implementation-defined String source code representation of _func_. The representation must have the syntax of a |NativeFunction|. Additionally, if _func_ has an [[InitialName]] internal slot and _func_.[[InitialName]] is a String, the portion of the returned String that would be matched by |NativeFunctionAccessor?| |PropertyName| must be the value of _func_.[[InitialName]].
1. If Type(_func_) is Object and _func_ has a [[SourceText]] internal slot and _func_.[[SourceText]] is a sequence of Unicode code points and ! HostHasSourceTextAvailable(_func_) is *true*, then
1. Return ! UTF16Encode(_func_.[[SourceText]]).
1. If Type(_func_) is Object and IsCallable(_func_) is *true*, then return an implementation-defined String source code representation of _func_. The representation must have the syntax of a |NativeFunction|.
Expand All @@ -26482,7 +26484,10 @@ <h1>Function.prototype.toString ( )</h1>

<emu-grammar type="definition">
NativeFunction :
`function` PropertyName[~Yield, ~Await]? `(` FormalParameters[~Yield, ~Await] `)` `{` `[` `native` `code` `]` `}`
`function` NativeFunctionAccessor? PropertyName[~Yield, ~Await]? `(` FormalParameters[~Yield, ~Await] `)` `{` `[` `native` `code` `]` `}`
NativeFunctionAccessor :
`get`
`set`
</emu-grammar>
</emu-clause>

Expand Down

0 comments on commit e417f39

Please sign in to comment.