Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
normative: TA::toSpliced process deleteCount before items (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
acutmore committed Jun 29, 2022
1 parent 7d6a17a commit ba4e87a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec.html
Expand Up @@ -424,19 +424,19 @@ <h1>%TypedArray%.prototype.toSpliced ( _start_, _deleteCount_, ..._items_ )</h1>
1. If _relativeStart_ is -&infin;, let _actualStart_ be 0.
1. Else if _relativeStart_ &lt; 0, let _actualStart_ be max(_len_ + _relativeStart_, 0).
1. Else, let _actualStart_ be min(_relativeStart_, _len_).
1. Let _insertCount_ be the number of elements in _items_.
1. Let _convertedItems_ be a new empty List.
1. For each element _E_ of _items_, do
1. If _O_.[[ContentType]] is ~BigInt~, let _convertedValue_ be ? ToBigInt(_E_).
1. Else, let _convertedValue_ be ? ToNumber(_E_).
1. Append _convertedValue_ as the last element of _convertedItems_.
1. If _start_ is not present, then
1. Let _actualDeleteCount_ be 0.
1. Else if _deleteCount_ is not present, then
1. Let _actualDeleteCount_ be _len_ - _actualStart_.
1. Else,
1. Let _dc_ be ? ToIntegerOrInfinity(_deleteCount_).
1. Let _actualDeleteCount_ be the result of clamping _dc_ between 0 and _len_ - _actualStart_.
1. Let _insertCount_ be the number of elements in _items_.
1. Let _convertedItems_ be a new empty List.
1. For each element _E_ of _items_, do
1. If _O_.[[ContentType]] is ~BigInt~, let _convertedValue_ be ? ToBigInt(_E_).
1. Else, let _convertedValue_ be ? ToNumber(_E_).
1. Append _convertedValue_ as the last element of _convertedItems_.
1. Let _newLen_ be _len_ + _insertCount_ - _actualDeleteCount_.
1. Let _A_ be ? TypedArrayCreateSameType(_O_, &laquo; 𝔽(_newLen_) &raquo;).
1. Let _i_ be 0.
Expand Down

0 comments on commit ba4e87a

Please sign in to comment.