diff --git a/spec.html b/spec.html index ee317a0..aa41b6d 100644 --- a/spec.html +++ b/spec.html @@ -230,7 +230,7 @@

%TypedArray%.prototype.toSorted ( _compareFn_ )

1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. Let _kValue_ be ? Get(_O_, _Pk_). + 1. Let _kValue_ be ! Get(_O_, _Pk_). 1. Append _kValue_ to _items_. 1. Set _k_ to _k_ + 1. 1. Sort _items_ using an implementation-defined sequence of calls to SortCompare. If any such call returns an abrupt completion, stop before performing any further calls to SortCompare or steps in this algorithm and return that completion. @@ -293,7 +293,7 @@

%TypedArray%.prototype.toSpliced ( _start_, _deleteCount_, ..._items_ )

1. Set _i_ to _i_ + 1. 1. For each element _E_ of _items_, do 1. Let _Pi_ be ! ToString(𝔽(_i_)). - 1. Perform ? Set(_A_, _Pi_, _E_, *true*). + 1. [id="step-typedarray-tospliced-set"] Perform ? Set(_A_, _Pi_, _E_, *true*). 1. Set _i_ to _i_ + 1. 1. Repeat, while _r_ < _newLen_, 1. Let _Pi_ be ! ToString(𝔽(_i_)). @@ -304,6 +304,9 @@

%TypedArray%.prototype.toSpliced ( _start_, _deleteCount_, ..._items_ )

1. Set _r_ to _r_ + 1. 1. Return _A_. + + Step may return an abrupt completion because _E_ is a value of any ECMAScript language type and is passed to ToBigInt or ToNumber. + @@ -323,12 +326,17 @@

%TypedArray%.prototype.with ( _index_, _value_ )

1. Let _k_ be 0. 1. Repeat, while _k_ < _len_, 1. Let _Pk_ be ! ToString(𝔽(_k_)). - 1. If _k_ is _actualIndex_, let _fromValue_ be _value_. - 1. Else, let _fromValue_ be ! Get(_O_, _Pk_). - 1. Perform ? Set(_A_, _Pk_, _fromValue_, *true*). + 1. If _k_ is _actualIndex_, then + 1. [id="step-typedarray-with-set"] Perform ? Set(_A_, _Pk_, _value_, *true*). + 1. Else, + 1. Let _fromValue_ be ! Get(_O_, _Pk_). + 1. Perform ! Set(_A_, _Pk_, _fromValue_, *true*). 1. Set _k_ to _k_ + 1. 1. Return _A_. + + Step may return an abrupt completion because _value_ is a value of any ECMAScript language type and is passed to ToBigInt or ToNumber. +