summaryrefslogtreecommitdiff
path: root/src/js/binaryen.js-post.js
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2020-11-13 15:54:08 -0800
committerGitHub <noreply@github.com>2020-11-13 15:54:08 -0800
commit75e61204b67e921464af14fd13ff768d88755e8c (patch)
tree969ddb2e4e2870fef662375914f16fc50713cd4c /src/js/binaryen.js-post.js
parentcc2b3e4175a6edc53487eec06da13b39eb66716b (diff)
downloadbinaryen-75e61204b67e921464af14fd13ff768d88755e8c.tar.gz
binaryen-75e61204b67e921464af14fd13ff768d88755e8c.tar.bz2
binaryen-75e61204b67e921464af14fd13ff768d88755e8c.zip
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.
Diffstat (limited to 'src/js/binaryen.js-post.js')
-rw-r--r--src/js/binaryen.js-post.js20
1 files changed, 11 insertions, 9 deletions
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);
}