Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/harmony-atomics.js

Issue 1275013004: [runtime] Simplify TO_INT32/TO_UINT32 abstract operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/execution.cc ('k') | src/macros.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 })
OLDNEW
« no previous file with comments | « src/execution.cc ('k') | src/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698