diff options
author | Derek Schuff <dschuff@chromium.org> | 2016-06-14 11:32:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-14 11:32:10 -0700 |
commit | 8f524e8f926b6993878f02334e730fe5f65096f6 (patch) | |
tree | 47c8121c1b9f2b90d42b673b2f14798a7b8681e8 /test | |
parent | 24fa19071d309c59eee5c2bd966139eaab45b5ba (diff) | |
download | binaryen-8f524e8f926b6993878f02334e730fe5f65096f6.tar.gz binaryen-8f524e8f926b6993878f02334e730fe5f65096f6.tar.bz2 binaryen-8f524e8f926b6993878f02334e730fe5f65096f6.zip |
Add mode to wasm validator to check for web-environment constraints (#584)
In the web embedding, modules are not allowed to import or export
functions which have i64 params or return values. Add a mode to the
validator to check for this, and add flags to s2wasm and wasm-as to
enable or disable this check. Also add tests.
Diffstat (limited to 'test')
-rw-r--r-- | test/validator/invalid_export.wast | 1 | ||||
-rw-r--r-- | test/validator/invalid_import.wast | 1 | ||||
-rw-r--r-- | test/validator/invalid_return.wast | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/test/validator/invalid_export.wast b/test/validator/invalid_export.wast new file mode 100644 index 000000000..e10e22a39 --- /dev/null +++ b/test/validator/invalid_export.wast @@ -0,0 +1 @@ +(module (func $export64 (result i64) (i64.const 1)) (export "a" $export64))
\ No newline at end of file diff --git a/test/validator/invalid_import.wast b/test/validator/invalid_import.wast new file mode 100644 index 000000000..e1b05b617 --- /dev/null +++ b/test/validator/invalid_import.wast @@ -0,0 +1 @@ +(module (import $bad "test" "bad" (param i64)))
\ No newline at end of file diff --git a/test/validator/invalid_return.wast b/test/validator/invalid_return.wast new file mode 100644 index 000000000..02ce049d6 --- /dev/null +++ b/test/validator/invalid_return.wast @@ -0,0 +1,2 @@ +(module + (func $foo (result i32) (i64.const 1)))
\ No newline at end of file |