diff options
-rw-r--r-- | src/feature.cc | 2 | ||||
-rw-r--r-- | test/help/spectest-interp.txt | 1 | ||||
-rw-r--r-- | test/help/wasm-interp.txt | 1 | ||||
-rw-r--r-- | test/help/wasm-validate.txt | 1 | ||||
-rw-r--r-- | test/help/wasm2wat.txt | 1 | ||||
-rw-r--r-- | test/help/wast2json.txt | 1 | ||||
-rw-r--r-- | test/help/wat-desugar.txt | 1 | ||||
-rw-r--r-- | test/help/wat2wasm.txt | 1 | ||||
-rw-r--r-- | test/parse/all-features.txt | 66 |
9 files changed, 75 insertions, 0 deletions
diff --git a/src/feature.cc b/src/feature.cc index 95cfbd16..0a43a69c 100644 --- a/src/feature.cc +++ b/src/feature.cc @@ -32,6 +32,8 @@ void Features::AddOptions(OptionParser* parser) { #include "src/feature.def" #undef WABT_FEATURE + parser->AddOption("enable-all", "Enable all features", + [this]() { EnableAll(); }); } } // namespace wabt diff --git a/test/help/spectest-interp.txt b/test/help/spectest-interp.txt index c06564f4..46a9e0d3 100644 --- a/test/help/spectest-interp.txt +++ b/test/help/spectest-interp.txt @@ -23,6 +23,7 @@ options: --enable-bulk-memory Enable Bulk-memory operations --enable-reference-types Enable Reference types (anyref) --enable-annotations Enable Custom annotation syntax + --enable-all Enable all features -V, --value-stack-size=SIZE Size in elements of the value stack -C, --call-stack-size=SIZE Size in elements of the call stack -t, --trace Trace execution diff --git a/test/help/wasm-interp.txt b/test/help/wasm-interp.txt index 9c84f15c..3872682b 100644 --- a/test/help/wasm-interp.txt +++ b/test/help/wasm-interp.txt @@ -34,6 +34,7 @@ options: --enable-bulk-memory Enable Bulk-memory operations --enable-reference-types Enable Reference types (anyref) --enable-annotations Enable Custom annotation syntax + --enable-all Enable all features -V, --value-stack-size=SIZE Size in elements of the value stack -C, --call-stack-size=SIZE Size in elements of the call stack -t, --trace Trace execution diff --git a/test/help/wasm-validate.txt b/test/help/wasm-validate.txt index 0e03e1ce..e21815bc 100644 --- a/test/help/wasm-validate.txt +++ b/test/help/wasm-validate.txt @@ -23,6 +23,7 @@ options: --enable-bulk-memory Enable Bulk-memory operations --enable-reference-types Enable Reference types (anyref) --enable-annotations Enable Custom annotation syntax + --enable-all Enable all features --no-debug-names Ignore debug names in the binary file --ignore-custom-section-errors Ignore errors in custom sections ;;; STDOUT ;;) diff --git a/test/help/wasm2wat.txt b/test/help/wasm2wat.txt index 780e306f..228ed995 100644 --- a/test/help/wasm2wat.txt +++ b/test/help/wasm2wat.txt @@ -29,6 +29,7 @@ options: --enable-bulk-memory Enable Bulk-memory operations --enable-reference-types Enable Reference types (anyref) --enable-annotations Enable Custom annotation syntax + --enable-all Enable all features --inline-exports Write all exports inline --inline-imports Write all imports inline --no-debug-names Ignore debug names in the binary file diff --git a/test/help/wast2json.txt b/test/help/wast2json.txt index 64b7883e..a08b8a60 100644 --- a/test/help/wast2json.txt +++ b/test/help/wast2json.txt @@ -26,6 +26,7 @@ options: --enable-bulk-memory Enable Bulk-memory operations --enable-reference-types Enable Reference types (anyref) --enable-annotations Enable Custom annotation syntax + --enable-all Enable all features -o, --output=FILE output wasm binary file -r, --relocatable Create a relocatable wasm binary (suitable for linking with e.g. lld) --no-canonicalize-leb128s Write all LEB128 sizes as 5-bytes instead of their minimal size diff --git a/test/help/wat-desugar.txt b/test/help/wat-desugar.txt index a1d2561c..09fd9165 100644 --- a/test/help/wat-desugar.txt +++ b/test/help/wat-desugar.txt @@ -33,5 +33,6 @@ options: --enable-bulk-memory Enable Bulk-memory operations --enable-reference-types Enable Reference types (anyref) --enable-annotations Enable Custom annotation syntax + --enable-all Enable all features --generate-names Give auto-generated names to non-named functions, types, etc. ;;; STDOUT ;;) diff --git a/test/help/wat2wasm.txt b/test/help/wat2wasm.txt index 8f3b5aa4..fac4fd4d 100644 --- a/test/help/wat2wasm.txt +++ b/test/help/wat2wasm.txt @@ -33,6 +33,7 @@ options: --enable-bulk-memory Enable Bulk-memory operations --enable-reference-types Enable Reference types (anyref) --enable-annotations Enable Custom annotation syntax + --enable-all Enable all features -o, --output=FILE output wasm binary file -r, --relocatable Create a relocatable wasm binary (suitable for linking with e.g. lld) --no-canonicalize-leb128s Write all LEB128 sizes as 5-bytes instead of their minimal size diff --git a/test/parse/all-features.txt b/test/parse/all-features.txt new file mode 100644 index 00000000..8806d191 --- /dev/null +++ b/test/parse/all-features.txt @@ -0,0 +1,66 @@ +;;; TOOL: wat2wasm +;;; ARGS: --enable-all +(module + ;; threads + (memory 1 1 shared) + + ;; mutable globals + (global (mut i32) (i32.const 0)) + + ;; exceptions + (event $e) + + ;; annotations + (func $f (@name "func") (result i32) + (i32.const 0)) + + (func (result i32) + ;; mutable globals + i32.const 0 + global.set 0 + + ;; saturating float-to-int + f32.const 0 + i32.trunc_s:sat/f32 + drop + + ;; sign extention + i32.const 0 + i32.extend8_s + drop + + ;; simd + v128.const i32x4 0xff00ff01 0xff00ff0f 0xff00ffff 0xff00ff7f + v128.const i32x4 0x00550055 0x00550055 0x00550055 0x00550155 + v8x16.shuffle 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + drop + + ;; threads + i32.const 0 + i32.const 0 + i32.atomic.rmw.add + drop + + ;; multi-value + block (result i32 i32) + i32.const 0 + i32.const 0 + end + drop + drop + + ;; bulk memory + i32.const 0 + i32.const 0 + i32.const 0 + memory.copy + + ;; reference types + ref.null + drop + + ;; exceptions + throw $e + + ;; tail call + return_call $f)) |