From 75e61204b67e921464af14fd13ff768d88755e8c Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 13 Nov 2020 15:54:08 -0800 Subject: Rename atomic.notify and *.atomic.wait (#3353) - atomic.notify -> memory.atomic.notify - i32.atomic.wait -> memory.atomic.wait32 - i64.atomic.wait -> memory.atomic.wait64 See WebAssembly/threads#149. This renames instruction name printing but not the internal data structure names, such as `AtomicNotify`, which are not always the same as printed instruction names anyway. This also does not modify C API. But this fixes interface functions in binaryen.js because it seems binaryen.js's interface functions all follow the corresponding instruction names. --- src/js/binaryen.js-post.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/js/binaryen.js-post.js') diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index c35c6ed29..b78fdd996 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -629,6 +629,17 @@ function wrapModule(module, self = {}) { }, 'fill'(dest, value, size) { return Module['_BinaryenMemoryFill'](module, dest, value, size); + }, + 'atomic': { + 'notify'(ptr, notifyCount) { + return Module['_BinaryenAtomicNotify'](module, ptr, notifyCount); + }, + 'wait32'(ptr, expected, timeout) { + return Module['_BinaryenAtomicWait'](module, ptr, expected, timeout, Module['i32']); + }, + 'wait64'(ptr, expected, timeout) { + return Module['_BinaryenAtomicWait'](module, ptr, expected, timeout, Module['i64']); + } } } @@ -889,9 +900,6 @@ function wrapModule(module, self = {}) { return Module['_BinaryenAtomicCmpxchg'](module, 2, offset, ptr, expected, replacement, Module['i32']) }, }, - 'wait'(ptr, expected, timeout) { - return Module['_BinaryenAtomicWait'](module, ptr, expected, timeout, Module['i32']); - } }, 'pop'() { return Module['_BinaryenPop'](module, Module['i32']); @@ -1193,9 +1201,6 @@ function wrapModule(module, self = {}) { return Module['_BinaryenAtomicCmpxchg'](module, 4, offset, ptr, expected, replacement, Module['i64']) }, }, - 'wait'(ptr, expected, timeout) { - return Module['_BinaryenAtomicWait'](module, ptr, expected, timeout, Module['i64']); - } }, 'pop'() { return Module['_BinaryenPop'](module, Module['i64']); @@ -2132,9 +2137,6 @@ function wrapModule(module, self = {}) { }; self['atomic'] = { - 'notify'(ptr, notifyCount) { - return Module['_BinaryenAtomicNotify'](module, ptr, notifyCount); - }, 'fence'() { return Module['_BinaryenAtomicFence'](module); } -- cgit v1.2.3