summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2020-09-29 22:19:09 +0200
committerGitHub <noreply@github.com>2020-09-29 22:19:09 +0200
commit7d673ce83206349159a68fe683bc7da02dcdaf98 (patch)
treeb6be0e5842b8726406c50e9481531cf456db326f /src/js
parent781da4c206c54e92b46358c00d079ada66cef0df (diff)
downloadbinaryen-7d673ce83206349159a68fe683bc7da02dcdaf98.tar.gz
binaryen-7d673ce83206349159a68fe683bc7da02dcdaf98.tar.bz2
binaryen-7d673ce83206349159a68fe683bc7da02dcdaf98.zip
GC: Add stubs for the remaining instructions (#3174)
NFC, except adding most of the boilerplate for the remaining GC instructions. Each implementation site is marked with a respective `TODO (gc): theInstruction` in between the typical boilerplate code.
Diffstat (limited to 'src/js')
-rw-r--r--src/js/binaryen.js-post.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index d3cf7d449..529474098 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -98,7 +98,19 @@ function initializeConstants() {
'TupleExtract',
'Pop',
'I31New',
- 'I31Get'
+ 'I31Get',
+ 'RefTest',
+ 'RefCast',
+ 'BrOnCast',
+ 'RttCanon',
+ 'RttSub',
+ 'StructNew',
+ 'StructGet',
+ 'StructSet',
+ 'ArrayNew',
+ 'ArrayGet',
+ 'ArraySet',
+ 'ArrayLen'
].forEach(name => {
Module['ExpressionIds'][name] = Module[name + 'Id'] = Module['_Binaryen' + name + 'Id']();
});