From 86109031b74dc27a723bbe01c8d50ba3c4e0773b Mon Sep 17 00:00:00 2001 From: Lars T Hansen Date: Wed, 10 Feb 2016 09:23:35 +0100 Subject: [PATCH] Fixed issue #60: ValidateSharedIntegerTypedArray must check for a TypedArrayName internal slot --- tc39/shmem.html | 8 +++++--- tc39/spec.html | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tc39/shmem.html b/tc39/shmem.html index 76c264b..9be6e04 100644 --- a/tc39/shmem.html +++ b/tc39/shmem.html @@ -6,7 +6,7 @@

ECMAScript Shared Memory and Atomics

-

Revised: 2016-01-23

+

Revised: 2016-02-10

Introduction#

@@ -58,7 +58,9 @@

IntroductionValidateSharedIntegerTypedArray needs to check for a TypedArrayName slot. + +
  • 2016-01-23 -- Removed a reference to the note that was removed yesterday.
  • 2016-01-22 -- (Issue 43) Clarified language. Removed part of a note that attempted to explain an illegal optimization but got it wrong; will be re-introduced later. @@ -628,7 +630,7 @@

    7.2.1With atomic access to ( buffer, indexedPosi

    7.2.2Runtime semantics: ValidateSharedIntegerTypedArray( typedArray [, onlyInt32] )#

    -
    1. If Type(typedArray) is not Object, throw a TypeError exception.
    2. Let typeName be the value of typedArray's [[TypedArrayName]] internal slot
    3. If onlyInt32 is true then
      1. If typeName is not "Int32Array" then throw a TypeError exception
    4. Else
      1. If typeName is not "Int8Array", "Uint8Array", "Int16Array", "Uint16Array", "Int32Array", or "Uint32Array" then throw a TypeError exception
    5. If typedArray does not have a [[ViewedArrayBuffer]] internal slot, throw a TypeError exception.
    6. Let buffer be the value of typedArray’s [[ViewedArrayBuffer]] internal slot.
    7. If Type(buffer) is not Object, throw a TypeError exception.
    8. If buffer does not have a [[SharedArrayBufferData]] internal slot, throw a TypeError exception.
    9. Return buffer +
      1. If Type(typedArray) is not Object, throw a TypeError exception.
      2. If typedArray does not have a [[TypedArrayName]] internal slot, throw a TypeError exception.
      3. Let typeName be the value of typedArray's [[TypedArrayName]] internal slot
      4. If onlyInt32 is true then
        1. If typeName is not "Int32Array" then throw a TypeError exception
      5. Else
        1. If typeName is not "Int8Array", "Uint8Array", "Int16Array", "Uint16Array", "Int32Array", or "Uint32Array" then throw a TypeError exception
      6. If typedArray does not have a [[ViewedArrayBuffer]] internal slot, throw a TypeError exception.
      7. Let buffer be the value of typedArray’s [[ViewedArrayBuffer]] internal slot.
      8. If Type(buffer) is not Object, throw a TypeError exception.
      9. If buffer does not have a [[SharedArrayBufferData]] internal slot, throw a TypeError exception.
      10. Return buffer
      diff --git a/tc39/spec.html b/tc39/spec.html index d4d519b..1bed7c2 100644 --- a/tc39/spec.html +++ b/tc39/spec.html @@ -10,7 +10,7 @@

      ECMAScript Shared Memory and Atomics

      -

      Revised: 2016-01-23

      +

      Revised: 2016-02-10

      Introduction

      @@ -60,6 +60,7 @@

      Introduction

      Changelog:

        +
      • 2016-02-10 -- (Issue 60) ValidateSharedIntegerTypedArray needs to check for a TypedArrayName slot.
      • 2016-01-23 -- Removed a reference to the note that was removed yesterday.
      • 2016-01-22 -- (Issue 43) Clarified language. Removed part of a note that attempted to explain an illegal optimization but got it wrong; will be re-introduced later.
      • 2016-01-22 -- (Issue 41) Corrected a bug in yesterday's fix. @@ -657,6 +658,7 @@

        With atomic access to ( buffer, indexedPosition, elementSize )

        Runtime semantics: ValidateSharedIntegerTypedArray( typedArray [, onlyInt32] )

        1. If Type(_typedArray_) is not Object, throw a ~TypeError~ exception. + 1. If _typedArray_ does not have a [[TypedArrayName]] internal slot, throw a ~TypeError~ exception. 1. Let _typeName_ be the value of _typedArray_'s [[TypedArrayName]] internal slot 1. If _onlyInt32_ is ~true~ then 1. If _typeName_ is not "Int32Array" then throw a ~TypeError~ exception