MCPcopy Create free account
hub / github.com/nodejs/node / Test32Op

Function Test32Op

deps/v8/test/mjsunit/wasm/atomics.js:152–162  ·  view source on GitHub ↗
(operation, func)

Source from the content-addressed store, hash-verified

150const inc = i => i + Math.floor(i/10) + 1;
151
152function Test32Op(operation, func) {
153 let i32 = new Uint32Array(memory.buffer);
154 for (let i = 0; i < i32.length; i = inc(i)) {
155 let expected = 0x9cedf00d;
156 let value = 0x11111111;
157 i32[i] = expected;
158 assertEquals(expected, func(i * kMemtypeSize32, value) >>> 0);
159 assertEquals(operation(expected, value) >>> 0, i32[i]);
160 }
161 VerifyBoundsCheck(func, kMemtypeSize32);
162}
163
164function Test16Op(operation, func) {
165 let i16 = new Uint16Array(memory.buffer);

Callers 1

atomics.jsFile · 0.85

Calls 4

VerifyBoundsCheckFunction · 0.85
incFunction · 0.70
funcFunction · 0.70
assertEqualsFunction · 0.50

Tested by

no test coverage detected