(memory, offset, index, num)
| 37 | } |
| 38 | |
| 39 | function WasmAtomicNotify(memory, offset, index, num) { |
| 40 | let builder = new WasmModuleBuilder(); |
| 41 | let pages = memory.buffer.byteLength / kPageSize; |
| 42 | builder.addImportedMemory("m", "memory", pages, pages, "shared", "memory64"); |
| 43 | builder.addFunction("main", makeSig([kWasmF64, kWasmI32], [kWasmI32])) |
| 44 | .addBody([ |
| 45 | kExprLocalGet, 0, |
| 46 | kExprI64SConvertF64, |
| 47 | kExprLocalGet, 1, |
| 48 | kAtomicPrefix, kExprAtomicNotify, /* alignment */ 2, ...wasmSignedLeb64(offset, 10)]) |
| 49 | .exportAs("main"); |
| 50 | |
| 51 | let module = new WebAssembly.Module(builder.toBuffer()); |
| 52 | let instance = new WebAssembly.Instance(module, { m: { memory } }); |
| 53 | return instance.exports.main(index, num); |
| 54 | } |
| 55 | |
| 56 | function WasmI32AtomicWait(memory, offset, index, val, timeout) { |
| 57 | let builder = new WasmModuleBuilder(); |
no test coverage detected