(memory, offset, index, num)
| 24 | } |
| 25 | |
| 26 | function WasmAtomicNotify(memory, offset, index, num) { |
| 27 | let builder = new WasmModuleBuilder(); |
| 28 | let pages = memory.buffer.byteLength / kPageSize; |
| 29 | builder.addImportedMemory("m", "memory", pages, pages, "shared", "memory64"); |
| 30 | builder.addFunction("main", makeSig([kWasmF64, kWasmI32], [kWasmI32])) |
| 31 | .addBody([ |
| 32 | kExprLocalGet, 0, |
| 33 | kExprI64SConvertF64, |
| 34 | kExprLocalGet, 1, |
| 35 | kAtomicPrefix, |
| 36 | kExprAtomicNotify, /* alignment */ 2, ...wasmSignedLeb64(offset, 10)]) |
| 37 | .exportAs("main"); |
| 38 | |
| 39 | let module = new WebAssembly.Module(builder.toBuffer()); |
| 40 | let instance = new WebAssembly.Instance(module, {m: {memory}}); |
| 41 | return instance.exports.main(index, num); |
| 42 | } |
| 43 | |
| 44 | function WasmI32AtomicWait(memory, offset, index, val, timeout) { |
| 45 | let builder = new WasmModuleBuilder(); |
no test coverage detected