From 2e51491a15914c5ba7eff9afeaaee8f998e82ede Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 27 Oct 2017 09:20:01 -0700 Subject: 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). --- scripts/test/asm2wasm.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/test/asm2wasm.py') 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'] -- cgit v1.2.3