summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2020-04-15 18:42:19 -0700
committerGitHub <noreply@github.com>2020-04-15 18:42:19 -0700
commit2302955b17104978453e84b0af3d5db490fb16c5 (patch)
tree031fa6a2dd8448535ac887ddfbfd18c14ad8337e /scripts
parent598b3dffae13a9fc823257d668972c3b4890b2d4 (diff)
downloadbinaryen-2302955b17104978453e84b0af3d5db490fb16c5.tar.gz
binaryen-2302955b17104978453e84b0af3d5db490fb16c5.tar.bz2
binaryen-2302955b17104978453e84b0af3d5db490fb16c5.zip
Emit tuples in the fuzzer (#2695)
Emit tuple.make, tuple.extract, and multivalue control flow, and tuple locals and globals when multivalue is enabled. Also slightly refactors the top-level `makeConcrete` function to be more selective about what it tries to make based on the requested type to reduce the number of trivial nodes created because the requested type is incompatible with the requested node.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fuzz_opt.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py
index 96d35c610..a777a3a1a 100755
--- a/scripts/fuzz_opt.py
+++ b/scripts/fuzz_opt.py
@@ -352,7 +352,7 @@ class CompareVMs(TestCaseHandler):
compare(before[i], after[i], 'CompareVMs between before and after: ' + vm.name)
def can_run_on_feature_opts(self, feature_opts):
- return all([x in feature_opts for x in ['--disable-simd', '--disable-reference-types', '--disable-exception-handling']])
+ return all([x in feature_opts for x in ['--disable-simd', '--disable-reference-types', '--disable-exception-handling', '--disable-multivalue']])
# Fuzz the interpreter with --fuzz-exec. This tests everything in a single command (no
@@ -424,7 +424,7 @@ class Wasm2JS(TestCaseHandler):
return out
def can_run_on_feature_opts(self, feature_opts):
- return all([x in feature_opts for x in ['--disable-exception-handling', '--disable-simd', '--disable-threads', '--disable-bulk-memory', '--disable-nontrapping-float-to-int', '--disable-tail-call', '--disable-sign-ext', '--disable-reference-types']])
+ return all([x in feature_opts for x in ['--disable-exception-handling', '--disable-simd', '--disable-threads', '--disable-bulk-memory', '--disable-nontrapping-float-to-int', '--disable-tail-call', '--disable-sign-ext', '--disable-reference-types', '--disable-multivalue']])
class Asyncify(TestCaseHandler):
@@ -476,7 +476,7 @@ class Asyncify(TestCaseHandler):
compare(before, after_asyncify, 'Asyncify (before/after_asyncify)')
def can_run_on_feature_opts(self, feature_opts):
- return all([x in feature_opts for x in ['--disable-exception-handling', '--disable-simd', '--disable-tail-call', '--disable-reference-types']])
+ return all([x in feature_opts for x in ['--disable-exception-handling', '--disable-simd', '--disable-tail-call', '--disable-reference-types', '--disable-multivalue']])
# The global list of all test case handlers
@@ -699,6 +699,7 @@ def randomize_opt_flags():
# contains the list of all possible feature flags we can disable (after
# we enable all before that in the constant options)
POSSIBLE_FEATURE_OPTS = run([in_bin('wasm-opt'), '--print-features', '-all', in_binaryen('test', 'hello_world.wat'), '-all']).replace('--enable', '--disable').strip().split('\n')
+POSSIBLE_FEATURE_OPTS.remove('--disable-multivalue')
print('POSSIBLE_FEATURE_OPTS:', POSSIBLE_FEATURE_OPTS)
if __name__ == '__main__':