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

Side by Side Diff: test/mjsunit/harmony/futex.js

Issue 2725873004: Merged: This is a speculative chain of reverts to improve a Chrome perf regression. See crbug.co ... (Closed)
Patch Set: Created 3 years, 9 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 | « test/cctest/heap/test-spaces.cc ('k') | test/mjsunit/minmax-simple.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 // Flags: --allow-natives-syntax --harmony-sharedarraybuffer 5 // Flags: --allow-natives-syntax --harmony-sharedarraybuffer
6 6
7 (function TestFailsWithNonSharedArray() { 7 (function TestFailsWithNonSharedArray() {
8 var ab = new ArrayBuffer(16); 8 var ab = new ArrayBuffer(16);
9 9
10 var i8a = new Int8Array(ab); 10 var i8a = new Int8Array(ab);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 Atomics.wait(i32a, 0, 0, -1); 102 Atomics.wait(i32a, 0, 0, -1);
103 }); 103 });
104 %SetAllowAtomicsWait(true); 104 %SetAllowAtomicsWait(true);
105 })(); 105 })();
106 106
107 (function TestWakePositiveInfinity() { 107 (function TestWakePositiveInfinity() {
108 var i32a = new Int32Array(new SharedArrayBuffer(16)); 108 var i32a = new Int32Array(new SharedArrayBuffer(16));
109 Atomics.wake(i32a, 0, Number.POSITIVE_INFINITY); 109 Atomics.wake(i32a, 0, Number.POSITIVE_INFINITY);
110 })(); 110 })();
111 111
112 // In a previous version, this test caused a check failure
113 (function TestObjectWaitValue() {
114 var sab = new SharedArrayBuffer(16);
115 var i32a = new Int32Array(sab);
116 assertEquals("timed-out", Atomics.wait(i32a, 0, Math, 0));
117 })();
118
119
120 //// WORKER ONLY TESTS 112 //// WORKER ONLY TESTS
121 113
122 if (this.Worker) { 114 if (this.Worker) {
123 115
124 var TestWaitWithTimeout = function(timeout) { 116 var TestWaitWithTimeout = function(timeout) {
125 var sab = new SharedArrayBuffer(16); 117 var sab = new SharedArrayBuffer(16);
126 var i32a = new Int32Array(sab); 118 var i32a = new Int32Array(sab);
127 119
128 var workerScript = 120 var workerScript =
129 `onmessage = function(msg) { 121 `onmessage = function(msg) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // Finally wake the last waiter. 226 // Finally wake the last waiter.
235 assertEquals(1, Atomics.wake(i32a, 4, 1)); 227 assertEquals(1, Atomics.wake(i32a, 4, 1));
236 assertEquals("ok", workers[waitingId].getMessage()); 228 assertEquals("ok", workers[waitingId].getMessage());
237 workers[waitingId].terminate(); 229 workers[waitingId].terminate();
238 230
239 assertEquals(0, %AtomicsNumWaitersForTesting(i32a, 4)); 231 assertEquals(0, %AtomicsNumWaitersForTesting(i32a, 4));
240 232
241 })(); 233 })();
242 234
243 } 235 }
OLDNEW
« no previous file with comments | « test/cctest/heap/test-spaces.cc ('k') | test/mjsunit/minmax-simple.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698