| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 return UNDEFINED; | 165 return UNDEFINED; |
| 166 } | 166 } |
| 167 count = MathMax(0, $toInteger(count)); | 167 count = MathMax(0, $toInteger(count)); |
| 168 return %AtomicsFutexWake(ia, index, count); | 168 return %AtomicsFutexWake(ia, index, count); |
| 169 } | 169 } |
| 170 | 170 |
| 171 function AtomicsFutexWakeOrRequeueJS(ia, index1, count, value, index2) { | 171 function AtomicsFutexWakeOrRequeueJS(ia, index1, count, value, index2) { |
| 172 CheckSharedInteger32TypedArray(ia); | 172 CheckSharedInteger32TypedArray(ia); |
| 173 index1 = $toInteger(index1); | 173 index1 = $toInteger(index1); |
| 174 count = MathMax(0, $toInteger(count)); | 174 count = MathMax(0, $toInteger(count)); |
| 175 value = $toInt32(value); | 175 value = TO_INT32(value); |
| 176 index2 = $toInteger(index2); | 176 index2 = $toInteger(index2); |
| 177 if (index1 < 0 || index1 >= %_TypedArrayGetLength(ia) || | 177 if (index1 < 0 || index1 >= %_TypedArrayGetLength(ia) || |
| 178 index2 < 0 || index2 >= %_TypedArrayGetLength(ia)) { | 178 index2 < 0 || index2 >= %_TypedArrayGetLength(ia)) { |
| 179 return UNDEFINED; | 179 return UNDEFINED; |
| 180 } | 180 } |
| 181 return %AtomicsFutexWakeOrRequeue(ia, index1, count, value, index2); | 181 return %AtomicsFutexWakeOrRequeue(ia, index1, count, value, index2); |
| 182 } | 182 } |
| 183 | 183 |
| 184 // ------------------------------------------------------------------- | 184 // ------------------------------------------------------------------- |
| 185 | 185 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 210 "or", AtomicsOrJS, | 210 "or", AtomicsOrJS, |
| 211 "xor", AtomicsXorJS, | 211 "xor", AtomicsXorJS, |
| 212 "exchange", AtomicsExchangeJS, | 212 "exchange", AtomicsExchangeJS, |
| 213 "isLockFree", AtomicsIsLockFreeJS, | 213 "isLockFree", AtomicsIsLockFreeJS, |
| 214 "futexWait", AtomicsFutexWaitJS, | 214 "futexWait", AtomicsFutexWaitJS, |
| 215 "futexWake", AtomicsFutexWakeJS, | 215 "futexWake", AtomicsFutexWakeJS, |
| 216 "futexWakeOrRequeue", AtomicsFutexWakeOrRequeueJS, | 216 "futexWakeOrRequeue", AtomicsFutexWakeOrRequeueJS, |
| 217 ]); | 217 ]); |
| 218 | 218 |
| 219 }) | 219 }) |
| OLD | NEW |