Skip to content

Commit

Permalink
Normative: Remove interoperability between TypedArrays and DataView i…
Browse files Browse the repository at this point in the history
…nstances

Fixes #411.
  • Loading branch information
leobalter authored and bterlson committed Mar 25, 2016
1 parent 488b482 commit 1d7f90e
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -31046,7 +31046,8 @@ <h1>get %TypedArray%.prototype.buffer</h1>
<emu-alg>
1. Let _O_ be the *this* value.
1. If Type(_O_) is not Object, throw a *TypeError* exception.
1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception.
1. If _O_ does not have a [[TypedArrayName]] internal slot, throw a *TypeError* exception.
1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot.
1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot.
1. Return _buffer_.
</emu-alg>
Expand All @@ -31059,7 +31060,8 @@ <h1>get %TypedArray%.prototype.byteLength</h1>
<emu-alg>
1. Let _O_ be the *this* value.
1. If Type(_O_) is not Object, throw a *TypeError* exception.
1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception.
1. If _O_ does not have a [[TypedArrayName]] internal slot, throw a *TypeError* exception.
1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot.
1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot.
1. If IsDetachedBuffer(_buffer_) is *true*, return 0.
1. Let _size_ be the value of _O_'s [[ByteLength]] internal slot.
Expand All @@ -31074,7 +31076,8 @@ <h1>get %TypedArray%.prototype.byteOffset</h1>
<emu-alg>
1. Let _O_ be the *this* value.
1. If Type(_O_) is not Object, throw a *TypeError* exception.
1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception.
1. If _O_ does not have a [[TypedArrayName]] internal slot, throw a *TypeError* exception.
1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot.
1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot.
1. If IsDetachedBuffer(_buffer_) is *true*, return 0.
1. Let _offset_ be the value of _O_'s [[ByteOffset]] internal slot.
Expand Down Expand Up @@ -31102,7 +31105,7 @@ <h1>Runtime Semantics: ValidateTypedArray ( _O_ )</h1>
<emu-alg>
1. If Type(_O_) is not Object, throw a *TypeError* exception.
1. If _O_ does not have a [[TypedArrayName]] internal slot, throw a *TypeError* exception.
1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception.
1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot.
1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot.
1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
1. Return _buffer_.
Expand Down Expand Up @@ -33102,6 +33105,7 @@ <h1>GetViewValue ( _view_, _requestIndex_, _isLittleEndian_, _type_ )</h1>
<emu-alg>
1. If Type(_view_) is not Object, throw a *TypeError* exception.
1. If _view_ does not have a [[DataView]] internal slot, throw a *TypeError* exception.
1. Assert: _view_ has a [[ViewedArrayBuffer]] internal slot.
1. Let _numberIndex_ be ? ToNumber(_requestIndex_).
1. Let _getIndex_ be ToInteger(_numberIndex_).
1. If _numberIndex_ &ne; _getIndex_ or _getIndex_ &lt; 0, throw a *RangeError* exception.
Expand All @@ -33124,6 +33128,7 @@ <h1>SetViewValue ( _view_, _requestIndex_, _isLittleEndian_, _type_, _value_ )</
<emu-alg>
1. If Type(_view_) is not Object, throw a *TypeError* exception.
1. If _view_ does not have a [[DataView]] internal slot, throw a *TypeError* exception.
1. Assert: _view_ has a [[ViewedArrayBuffer]] internal slot.
1. Let _numberIndex_ be ? ToNumber(_requestIndex_).
1. Let _getIndex_ be ToInteger(_numberIndex_).
1. If _numberIndex_ &ne; _getIndex_ or _getIndex_ &lt; 0, throw a *RangeError* exception.
Expand Down Expand Up @@ -33202,7 +33207,8 @@ <h1>get DataView.prototype.buffer</h1>
<emu-alg>
1. Let _O_ be the *this* value.
1. If Type(_O_) is not Object, throw a *TypeError* exception.
1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception.
1. If _O_ does not have a [[DataView]] internal slot, throw a *TypeError* exception.
1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot.
1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot.
1. Return _buffer_.
</emu-alg>
Expand All @@ -33215,7 +33221,8 @@ <h1>get DataView.prototype.byteLength</h1>
<emu-alg>
1. Let _O_ be the *this* value.
1. If Type(_O_) is not Object, throw a *TypeError* exception.
1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception.
1. If _O_ does not have a [[DataView]] internal slot, throw a *TypeError* exception.
1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot.
1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot.
1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
1. Let _size_ be the value of _O_'s [[ByteLength]] internal slot.
Expand All @@ -33230,7 +33237,8 @@ <h1>get DataView.prototype.byteOffset</h1>
<emu-alg>
1. Let _O_ be the *this* value.
1. If Type(_O_) is not Object, throw a *TypeError* exception.
1. If _O_ does not have a [[ViewedArrayBuffer]] internal slot, throw a *TypeError* exception.
1. If _O_ does not have a [[DataView]] internal slot, throw a *TypeError* exception.
1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot.
1. Let _buffer_ be the value of _O_'s [[ViewedArrayBuffer]] internal slot.
1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
1. Let _offset_ be the value of _O_'s [[ByteOffset]] internal slot.
Expand Down

0 comments on commit 1d7f90e

Please sign in to comment.