You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
): either a normal completion containing a Record with fields [[From]] (a non-negative integer) and [[To]] (a non-negative integer) or a throw completion
27
+
</h1>
28
+
<dl class="header">
29
+
</dl>
30
+
<emu-alg>
31
+
1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_).
32
+
1. If _relativeStart_ = -∞, let _from_ be 0.
33
+
1. Else if _relativeStart_ < 0, let _from_ be max(_len_ + _relativeStart_, 0).
34
+
1. Else, let _from_ be min(_relativeStart_, _len_).
35
+
1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_).
36
+
1. If _relativeEnd_ = -∞, let _to_ be 0.
37
+
1. Else if _relativeEnd_ < 0, let _to_ be max(_len_ + _relativeEnd_, 0).
38
+
1. Else, let _to_ be min(_relativeEnd_, _len_).
39
+
1. Return the Record { [[From]]: _from_, [[To]]: _to_ }.
1. NOTE: Neither creation of the new Data Block nor copying from the old Data Block are observable. Implementations may implement this method as a zero-copy move or a `realloc`.
494
524
1. Perform ! DetachArrayBuffer(_arrayBuffer_).
@@ -634,14 +664,17 @@ contributors: Mark S. Miller, Richard Gibson
634
664
1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception.
635
665
1. If IsDetachedBuffer(_O_) is *true*, throw a *TypeError* exception.
636
666
1. Let _len_ be _O_.[[ArrayBufferByteLength]].
637
-
1. Let _relativeStart_ be ? ToIntegerOrInfinity(_start_).
638
-
1. If _relativeStart_ = -∞, let _first_ be 0.
639
-
1. Else if _relativeStart_ < 0, let _first_ be max(_len_ + _relativeStart_, 0).
640
-
1. Else, let _first_ be min(_relativeStart_, _len_).
641
-
1. If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_).
642
-
1. If _relativeEnd_ = -∞, let _final_ be 0.
643
-
1. Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0).
644
-
1. Else, let _final_ be min(_relativeEnd_, _len_).
667
+
1. <del>Let _relativeStart_ be ? ToIntegerOrInfinity(_start_).</del>
668
+
1. <del>If _relativeStart_ = -∞, let _first_ be 0.</del>
669
+
1. <del>Else if _relativeStart_ < 0, let _first_ be max(_len_ + _relativeStart_, 0).</del>
670
+
1. <del>Else, let _first_ be min(_relativeStart_, _len_).</del>
671
+
1. <del>If _end_ is *undefined*, let _relativeEnd_ be _len_; else let _relativeEnd_ be ? ToIntegerOrInfinity(_end_).</del>
672
+
1. <del>If _relativeEnd_ = -∞, let _final_ be 0.</del>
673
+
1. <del>Else if _relativeEnd_ < 0, let _final_ be max(_len_ + _relativeEnd_, 0).</del>
674
+
1. <del>Else, let _final_ be min(_relativeEnd_, _len_).</del>
675
+
1. <ins>Let _bounds_ be ? ResolveBounds(_len_, _start_, _end_).</ins>
676
+
1. <ins>Let _first_ be _bounds_.[[From]].</ins>
677
+
1. <ins>Let _final_ be _bounds_.[[To]].</ins>
645
678
1. Let _newLen_ be max(_final_ - _first_, 0).
646
679
1. Let _ctor_ be ? SpeciesConstructor(_O_, %ArrayBuffer%).
647
680
1. Let _new_ be ? Construct(_ctor_, « 𝔽(_newLen_) »).
0 commit comments