Skip to content

Commit f175423

Browse files
authored
Merge pull request #22 from tc39/master
Sync Fork from Upstream Repo
2 parents d616307 + 823aad1 commit f175423

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

spec.html

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4829,8 +4829,8 @@ <h1>ToInteger ( _argument_ )</h1>
48294829
<p>The abstract operation ToInteger converts _argument_ to an integral Number value. This abstract operation functions as follows:</p>
48304830
<emu-alg>
48314831
1. Let _number_ be ? ToNumber(_argument_).
4832-
1. If _number_ is *NaN*, return *+0*.
4833-
1. If _number_ is *+0*, *-0*, *+&infin;*, or *-&infin;*, return _number_.
4832+
1. If _number_ is *NaN*, *+0*, or *-0*, return *+0*.
4833+
1. If _number_ is *+&infin;*, or *-&infin;*, return _number_.
48344834
1. Return the Number value that is the same sign as _number_ and whose magnitude is floor(abs(_number_)).
48354835
</emu-alg>
48364836
</emu-clause>
@@ -5295,7 +5295,7 @@ <h1>ToIndex ( _value_ )</h1>
52955295
1. Let _integerIndex_ be ? ToInteger(_value_).
52965296
1. If _integerIndex_ &lt; 0, throw a *RangeError* exception.
52975297
1. Let _index_ be ! ToLength(_integerIndex_).
5298-
1. If SameValueZero(_integerIndex_, _index_) is *false*, throw a *RangeError* exception.
5298+
1. If ! SameValue(_integerIndex_, _index_) is *false*, throw a *RangeError* exception.
52995299
1. Return _index_.
53005300
</emu-alg>
53015301
</emu-clause>
@@ -8431,7 +8431,7 @@ <h1>ECMAScript Function Objects</h1>
84318431
[[SourceText]]
84328432
</td>
84338433
<td>
8434-
String
8434+
sequence of Unicode code points
84358435
</td>
84368436
<td>
84378437
The <emu-xref href="#sec-source-text">source text</emu-xref> that defines the function.
@@ -13955,8 +13955,9 @@ <h1>Runtime Semantics: Evaluation</h1>
1395513955
<emu-alg>
1395613956
1. Let _newTarget_ be GetNewTarget().
1395713957
1. Assert: Type(_newTarget_) is Object.
13958-
1. Let _func_ be ? GetSuperConstructor().
13958+
1. Let _func_ be ! GetSuperConstructor().
1395913959
1. Let _argList_ be ? ArgumentListEvaluation of |Arguments|.
13960+
1. If IsConstructor(_func_) is *false*, throw a *TypeError* exception.
1396013961
1. Let _result_ be ? Construct(_func_, _argList_, _newTarget_).
1396113962
1. Let _thisER_ be GetThisEnvironment().
1396213963
1. Return ? _thisER_.BindThisValue(_result_).
@@ -13972,7 +13973,6 @@ <h1>Runtime Semantics: GetSuperConstructor ( )</h1>
1397213973
1. Let _activeFunction_ be _envRec_.[[FunctionObject]].
1397313974
1. Assert: _activeFunction_ is an ECMAScript function object.
1397413975
1. Let _superConstructor_ be ! _activeFunction_.[[GetPrototypeOf]]().
13975-
1. If IsConstructor(_superConstructor_) is *false*, throw a *TypeError* exception.
1397613976
1. Return _superConstructor_.
1397713977
</emu-alg>
1397813978
</emu-clause>
@@ -20956,7 +20956,7 @@ <h1>Runtime Semantics: Evaluation</h1>
2095620956
1. Let _funcEnv_ be ! NewDeclarativeEnvironment(_scope_).
2095720957
1. Let _envRec_ be _funcEnv_'s EnvironmentRecord.
2095820958
1. Let _name_ be StringValue of |BindingIdentifier|.
20959-
1. Perform ! _envRec_.CreateImmutableBinding(_name_).
20959+
1. Perform ! _envRec_.CreateImmutableBinding(_name_, *false*).
2096020960
1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncGenerator%, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _funcEnv_).
2096120961
1. Let _prototype_ be ! OrdinaryObjectCreate(%AsyncGenerator.prototype%).
2096220962
1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).
@@ -21613,7 +21613,7 @@ <h1>Runtime Semantics: Evaluation</h1>
2161321613
1. Let _funcEnv_ be ! NewDeclarativeEnvironment(_scope_).
2161421614
1. Let _envRec_ be _funcEnv_'s EnvironmentRecord.
2161521615
1. Let _name_ be StringValue of |BindingIdentifier|.
21616-
1. Perform ! _envRec_.CreateImmutableBinding(_name_).
21616+
1. Perform ! _envRec_.CreateImmutableBinding(_name_, *false*).
2161721617
1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _funcEnv_).
2161821618
1. Perform ! SetFunctionName(_closure_, _name_).
2161921619
1. Perform ! _envRec_.InitializeBinding(_name_, _closure_).
@@ -26269,7 +26269,7 @@ <h1>Runtime Semantics: CreateDynamicFunction ( _constructor_, _newTarget_, _kind
2626926269
1. Perform SetFunctionName(_F_, *"anonymous"*).
2627026270
1. Let _prefix_ be the prefix associated with _kind_ in <emu-xref href="#table-dynamic-function-sourcetext-prefixes"></emu-xref>.
2627126271
1. Let _sourceString_ be the string-concatenation of _prefix_, *" anonymous("*, _P_, 0x000A (LINE FEED), *") {"*, _bodyString_, and *"}"*.
26272-
1. Set _F_.[[SourceText]] to _sourceString_.
26272+
1. Set _F_.[[SourceText]] to ! UTF16DecodeString(_sourceString_).
2627326273
1. Return _F_.
2627426274
</emu-alg>
2627526275
<emu-note>
@@ -26410,7 +26410,8 @@ <h1>Function.prototype.toString ( )</h1>
2641026410
<emu-alg>
2641126411
1. Let _func_ be the *this* value.
2641226412
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-dependent String source code representation of _func_. The representation must have the syntax of a |NativeFunction|. Additionally, if _func_ is a <emu-xref href="#sec-well-known-intrinsic-objects">Well-known Intrinsic Object</emu-xref> and is not identified as an anonymous function, the portion of the returned String that would be matched by |PropertyName| must be the initial value of the *"name"* property of _func_.
26413-
1. If Type(_func_) is Object and _func_ has a [[SourceText]] internal slot and Type(_func_.[[SourceText]]) is String and ! HostHasSourceTextAvailable(_func_) is *true*, then return _func_.[[SourceText]].
26413+
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
26414+
1. Return ! UTF16Encode(_func_.[[SourceText]]).
2641426415
1. If Type(_func_) is Object and IsCallable(_func_) is *true*, then return an implementation-dependent String source code representation of _func_. The representation must have the syntax of a |NativeFunction|.
2641526416
1. Throw a *TypeError* exception.
2641626417
</emu-alg>
@@ -28609,9 +28610,7 @@ <h1>TimeClip ( _time_ )</h1>
2860928610
<emu-alg>
2861028611
1. If _time_ is not finite, return *NaN*.
2861128612
1. If abs(_time_) &gt; 8.64 &times; 10<sup>15</sup>, return *NaN*.
28612-
1. Let _clippedTime_ be ! ToInteger(_time_).
28613-
1. If _clippedTime_ is *-0*, set _clippedTime_ to *+0*.
28614-
1. Return _clippedTime_.
28613+
1. Return ! ToInteger(_time_).
2861528614
</emu-alg>
2861628615
<emu-note>
2861728616
<p>The point of step 4 is that an implementation is permitted a choice of internal representations of time values, for example as a 64-bit signed integer or as a 64-bit floating-point value. Depending on the implementation, this internal representation may or may not distinguish *-0* and *+0*.</p>
@@ -33773,7 +33772,7 @@ <h1>Array.prototype.indexOf ( _searchElement_ [ , _fromIndex_ ] )</h1>
3377333772
1. Assert: If _fromIndex_ is *undefined*, then _n_ is 0.
3377433773
1. If _n_ &ge; _len_, return -1.
3377533774
1. If _n_ &ge; 0, then
33776-
1. If _n_ is *-0*, let _k_ be *+0*; else let _k_ be _n_.
33775+
1. Let _k_ be _n_.
3377733776
1. Else,
3377833777
1. Let _k_ be _len_ + _n_.
3377933778
1. If _k_ &lt; 0, set _k_ to 0.
@@ -33840,7 +33839,7 @@ <h1>Array.prototype.lastIndexOf ( _searchElement_ [ , _fromIndex_ ] )</h1>
3384033839
1. If _len_ is 0, return -1.
3384133840
1. If _fromIndex_ is present, let _n_ be ? ToInteger(_fromIndex_); else let _n_ be _len_ - 1.
3384233841
1. If _n_ &ge; 0, then
33843-
1. If _n_ is *-0*, let _k_ be *+0*; else let _k_ be min(_n_, _len_ - 1).
33842+
1. Let _k_ be min(_n_, _len_ - 1).
3384433843
1. Else,
3384533844
1. Let _k_ be _len_ + _n_.
3384633845
1. Repeat, while _k_ &ge; 0

0 commit comments

Comments
 (0)