From 5fb669ac8cca51baff8b3a6478d6fd3ef92a7c97 Mon Sep 17 00:00:00 2001 From: Max Klein Date: Wed, 12 Apr 2017 22:15:31 +0200 Subject: s2wasm: Add command line option for importing memory (#963) This option allows to import the linear memory from JS code instead of exporting it. --emscripten-glue does this too but often the emscripten glue isn't needed, so this option only affects the memory. All the code necessary for importing the memory basically already exists, so nothing except for the command line option itself had to be added. --- scripts/test/s2wasm.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/test/s2wasm.py') diff --git a/scripts/test/s2wasm.py b/scripts/test/s2wasm.py index 02cb5f147..5e704e51a 100755 --- a/scripts/test/s2wasm.py +++ b/scripts/test/s2wasm.py @@ -25,6 +25,12 @@ from shared import ( def test_s2wasm(): print '\n[ checking .s testcases... ]\n' + cmd = S2WASM + [ + os.path.join(options.binaryen_test, 'dot_s', 'basics.s'), + '--import-memory'] + output = run_command(cmd) + fail_if_not_contained(output, '(import "env" "memory" (memory $0 1))') + for dot_s_dir in ['dot_s', 'llvm_autogenerated']: dot_s_path = os.path.join(options.binaryen_test, dot_s_dir) for s in sorted(os.listdir(dot_s_path)): -- cgit v1.2.3