summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2020-09-17 07:46:40 +0200
committerGitHub <noreply@github.com>2020-09-17 07:46:40 +0200
commite1d74ef2acdd88f06b9e58f91f30bb56b9a26fe8 (patch)
tree3b52301afd147617cf14e32fd487378394bc709b /scripts
parenta96e8310e1a58c0a43b2d0e2ff4f9db24dd9a18a (diff)
downloadbinaryen-e1d74ef2acdd88f06b9e58f91f30bb56b9a26fe8.tar.gz
binaryen-e1d74ef2acdd88f06b9e58f91f30bb56b9a26fe8.tar.bz2
binaryen-e1d74ef2acdd88f06b9e58f91f30bb56b9a26fe8.zip
Add GC feature flag (#3135)
Adds the `--enable-gc` feature flag, so far enabling the `anyref` type incl. subtyping, and removes the temporary `--enable-anyref` feature flag that it replaces.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fuzz_opt.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py
index 3562a82f6..3f79ec565 100755
--- a/scripts/fuzz_opt.py
+++ b/scripts/fuzz_opt.py
@@ -404,7 +404,7 @@ class CompareVMs(TestCaseHandler):
if random.random() < 0.5:
return False
# wasm2c doesn't support most features
- 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', '--disable-anyref']])
+ 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', '--disable-gc']])
def run(self, wasm):
run([in_bin('wasm-opt'), wasm, '--emit-wasm2c-wrapper=main.c'] + FEATURE_OPTS)
@@ -504,7 +504,7 @@ class CompareVMs(TestCaseHandler):
compare(before[vm], after[vm], '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', '--disable-multivalue', '--disable-anyref']])
+ return all([x in feature_opts for x in ['--disable-simd', '--disable-reference-types', '--disable-exception-handling', '--disable-multivalue', '--disable-gc']])
# Check for determinism - the same command must have the same output.
@@ -635,7 +635,7 @@ class Wasm2JS(TestCaseHandler):
return run_vm([shared.NODEJS, js_file, 'a.wasm'])
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', '--disable-multivalue', '--disable-anyref']])
+ 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', '--disable-gc']])
class Asyncify(TestCaseHandler):
@@ -689,7 +689,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', '--disable-multivalue', '--disable-anyref']])
+ return all([x in feature_opts for x in ['--disable-exception-handling', '--disable-simd', '--disable-tail-call', '--disable-reference-types', '--disable-multivalue', '--disable-gc']])
# The global list of all test case handlers
@@ -875,7 +875,7 @@ print('POSSIBLE_FEATURE_OPTS:', POSSIBLE_FEATURE_OPTS)
# some features depend on other features, so if a required feature is
# disabled, its dependent features need to be disabled as well.
IMPLIED_FEATURE_OPTS = {
- '--disable-reference-types': ['--disable-exception-handling', '--disable-anyref']
+ '--disable-reference-types': ['--disable-exception-handling', '--disable-gc']
}
if __name__ == '__main__':