summaryrefslogtreecommitdiff
path: root/scripts/test/asm2wasm.py
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2017-10-27 09:20:01 -0700
committerGitHub <noreply@github.com>2017-10-27 09:20:01 -0700
commit2e51491a15914c5ba7eff9afeaaee8f998e82ede (patch)
tree23116b52d6cfaaa35ef97ccb94752b8abf9f289e /scripts/test/asm2wasm.py
parent9d409e10f5fc6188e4b774e6b757ab25dfabefed (diff)
downloadbinaryen-2e51491a15914c5ba7eff9afeaaee8f998e82ede.tar.gz
binaryen-2e51491a15914c5ba7eff9afeaaee8f998e82ede.tar.bz2
binaryen-2e51491a15914c5ba7eff9afeaaee8f998e82ede.zip
Add Features enum to IR (#1250)
This enum describes which wasm features the IR is expected to include. The validator should reject operations which require excluded features, and passes should avoid producing IR which requires excluded features. This makes it easier to catch possible errors in Binaryen producers (e.g. emscripten). Asm2wasm has a flag to enable or disable atomics. Other tools currently just accept all features (as, dis and opt are just for inspecting or modifying existing modules, so it would be annoying to have to use flags with those tools and I expect the risk of accidentally introducing atomics to be low).
Diffstat (limited to 'scripts/test/asm2wasm.py')
-rw-r--r--scripts/test/asm2wasm.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/test/asm2wasm.py b/scripts/test/asm2wasm.py
index 7e0e3278c..abcd41bb4 100644
--- a/scripts/test/asm2wasm.py
+++ b/scripts/test/asm2wasm.py
@@ -33,6 +33,8 @@ def test_asm2wasm():
for precise in [0, 1, 2]:
for opts in [1, 0]:
cmd = ASM2WASM + [os.path.join(options.binaryen_test, asm)]
+ if 'threads' in asm:
+ cmd += ['--enable-threads']
wasm = asm.replace('.asm.js', '.fromasm')
if not precise:
cmd += ['--trap-mode=allow', '--ignore-implicit-traps']