diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-11-06 16:12:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-06 16:12:51 -0800 |
commit | 42f70a7c8608f5fc85b2676fda29b8405459ebdf (patch) | |
tree | 5b0a15395166cdcc5bb6e413f473e1692bec3f11 /scripts | |
parent | 3cd309f8df18274d27f40465a05636f810352856 (diff) | |
download | binaryen-42f70a7c8608f5fc85b2676fda29b8405459ebdf.tar.gz binaryen-42f70a7c8608f5fc85b2676fda29b8405459ebdf.tar.bz2 binaryen-42f70a7c8608f5fc85b2676fda29b8405459ebdf.zip |
Improve type selection in fuzzer (#2424)
- Adds `items` function for `FeatureOptions` so we can get a vector of
eligible types
- Replaces hardcoded enumeration of MVP types with `getConcreteTypes`,
which also adds v128 type to the list if SIMD is enabled
- Removes `getType()` function; this does not seem to be used anywhere
- Renames `vectorPick` with `pick`
- Use the absolute path for d8 in the fuzzer
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/fuzz_opt.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 20676f70e..3087705ab 100644 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -22,7 +22,7 @@ import shutil import sys import time -from test.shared import options, NODEJS, V8_OPTS +from test.shared import options, NODEJS, V8_OPTS, V8 # parameters @@ -166,7 +166,7 @@ def run_bynterp(wasm, args): def run_d8(wasm): - return run_vm(['d8'] + V8_OPTS + [in_binaryen('scripts', 'fuzz_shell.js'), '--', wasm]) + return run_vm([V8] + V8_OPTS + [in_binaryen('scripts', 'fuzz_shell.js'), '--', wasm]) # There are two types of test case handlers: @@ -200,10 +200,10 @@ class CompareVMs(TestCaseHandler): def run_vms(self, js, wasm): results = [] results.append(fix_output(run_bynterp(wasm, ['--fuzz-exec-before']))) - results.append(fix_output(run_vm(['d8', js] + V8_OPTS + ['--', wasm]))) + results.append(fix_output(run_vm([V8, js] + V8_OPTS + ['--', wasm]))) # append to add results from VMs - # results += [fix_output(run_vm(['d8', js] + V8_OPTS + ['--', wasm]))] + # results += [fix_output(run_vm([V8, js] + V8_OPTS + ['--', wasm]))] # results += [fix_output(run_vm([os.path.expanduser('~/.jsvu/jsc'), js, '--', wasm]))] # spec has no mechanism to not halt on a trap. so we just check until the first trap, basically # run(['../spec/interpreter/wasm', wasm]) |