| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 (function(global, utils) { | 5 (function(global, utils) { |
| 6 | 6 |
| 7 "use strict"; | 7 "use strict"; |
| 8 | 8 |
| 9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 | 26 |
| 27 function CheckSharedIntegerTypedArray(ia) { | 27 function CheckSharedIntegerTypedArray(ia) { |
| 28 if (!%IsSharedIntegerTypedArray(ia)) { | 28 if (!%IsSharedIntegerTypedArray(ia)) { |
| 29 throw MakeTypeError(kNotIntegerSharedTypedArray, ia); | 29 throw MakeTypeError(kNotIntegerSharedTypedArray, ia); |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 | 32 |
| 33 function CheckSharedInteger32TypedArray(ia) { | 33 function CheckSharedInteger32TypedArray(ia) { |
| 34 CheckSharedIntegerTypedArray(ia); | 34 CheckSharedIntegerTypedArray(ia); |
| 35 if (%_ClassOf(ia) !== 'Int32Array') { | 35 if (!%IsSharedInteger32TypedArray(ia)) { |
| 36 throw MakeTypeError(kNotInt32SharedTypedArray, ia); | 36 throw MakeTypeError(kNotInt32SharedTypedArray, ia); |
| 37 } | 37 } |
| 38 } | 38 } |
| 39 | 39 |
| 40 //------------------------------------------------------------------- | 40 //------------------------------------------------------------------- |
| 41 | 41 |
| 42 function AtomicsCompareExchangeJS(sta, index, oldValue, newValue) { | 42 function AtomicsCompareExchangeJS(sta, index, oldValue, newValue) { |
| 43 CheckSharedIntegerTypedArray(sta); | 43 CheckSharedIntegerTypedArray(sta); |
| 44 index = TO_INTEGER(index); | 44 index = TO_INTEGER(index); |
| 45 if (index < 0 || index >= %_TypedArrayGetLength(sta)) { | 45 if (index < 0 || index >= %_TypedArrayGetLength(sta)) { |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 "or", AtomicsOrJS, | 206 "or", AtomicsOrJS, |
| 207 "xor", AtomicsXorJS, | 207 "xor", AtomicsXorJS, |
| 208 "exchange", AtomicsExchangeJS, | 208 "exchange", AtomicsExchangeJS, |
| 209 "isLockFree", AtomicsIsLockFreeJS, | 209 "isLockFree", AtomicsIsLockFreeJS, |
| 210 "futexWait", AtomicsFutexWaitJS, | 210 "futexWait", AtomicsFutexWaitJS, |
| 211 "futexWake", AtomicsFutexWakeJS, | 211 "futexWake", AtomicsFutexWakeJS, |
| 212 "futexWakeOrRequeue", AtomicsFutexWakeOrRequeueJS, | 212 "futexWakeOrRequeue", AtomicsFutexWakeOrRequeueJS, |
| 213 ]); | 213 ]); |
| 214 | 214 |
| 215 }) | 215 }) |
| OLD | NEW |