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

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

Issue 2658143003: [SAB] Handle non-numerics in Atomics.isLockFree (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | test/mjsunit/harmony/atomics.js » ('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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 function AtomicsExchangeJS(ia, index, value) { 96 function AtomicsExchangeJS(ia, index, value) {
97 CheckSharedIntegerTypedArray(ia); 97 CheckSharedIntegerTypedArray(ia);
98 index = ValidateIndex(index, %_TypedArrayGetLength(ia)); 98 index = ValidateIndex(index, %_TypedArrayGetLength(ia));
99 value = TO_NUMBER(value); 99 value = TO_NUMBER(value);
100 return %_AtomicsExchange(ia, index, value); 100 return %_AtomicsExchange(ia, index, value);
101 } 101 }
102 102
103 function AtomicsIsLockFreeJS(size) { 103 function AtomicsIsLockFreeJS(size) {
104 return %_AtomicsIsLockFree(size); 104 return %_AtomicsIsLockFree(TO_INTEGER(size));
105 } 105 }
106 106
107 function AtomicsWaitJS(ia, index, value, timeout) { 107 function AtomicsWaitJS(ia, index, value, timeout) {
108 CheckSharedInteger32TypedArray(ia); 108 CheckSharedInteger32TypedArray(ia);
109 index = ValidateIndex(index, %_TypedArrayGetLength(ia)); 109 index = ValidateIndex(index, %_TypedArrayGetLength(ia));
110 if (IS_UNDEFINED(timeout)) { 110 if (IS_UNDEFINED(timeout)) {
111 timeout = INFINITY; 111 timeout = INFINITY;
112 } else { 112 } else {
113 timeout = TO_NUMBER(timeout); 113 timeout = TO_NUMBER(timeout);
114 if (NUMBER_IS_NAN(timeout)) { 114 if (NUMBER_IS_NAN(timeout)) {
(...skipping 29 matching lines...) Expand all
144 "and", AtomicsAndJS, 144 "and", AtomicsAndJS,
145 "or", AtomicsOrJS, 145 "or", AtomicsOrJS,
146 "xor", AtomicsXorJS, 146 "xor", AtomicsXorJS,
147 "exchange", AtomicsExchangeJS, 147 "exchange", AtomicsExchangeJS,
148 "isLockFree", AtomicsIsLockFreeJS, 148 "isLockFree", AtomicsIsLockFreeJS,
149 "wait", AtomicsWaitJS, 149 "wait", AtomicsWaitJS,
150 "wake", AtomicsWakeJS, 150 "wake", AtomicsWakeJS,
151 ]); 151 ]);
152 152
153 }) 153 })
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/atomics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698