From 2aa0cf300998c62aea8cc6698f8325653a9f0895 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Wed, 9 Sep 2020 13:01:21 -0700 Subject: Poppy IR wast parsing and validation (#3105) Adds an IR profile to each function so the validator can determine which validation rules to apply and adds a flag to have the wast parser set the profile to Poppy for testing purposes. --- src/tools/wasm2js.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/tools/wasm2js.cpp') diff --git a/src/tools/wasm2js.cpp b/src/tools/wasm2js.cpp index fb78336d0..524be4c5c 100644 --- a/src/tools/wasm2js.cpp +++ b/src/tools/wasm2js.cpp @@ -825,7 +825,7 @@ void AssertionEmitter::emit() { asmModule = Name(moduleNameS.str().c_str()); Module wasm; options.applyFeatures(wasm); - SExpressionWasmBuilder builder(wasm, e); + SExpressionWasmBuilder builder(wasm, e, options.profile); emitWasm(wasm, out, flags, options.passOptions, funcName); continue; } @@ -972,7 +972,8 @@ int main(int argc, const char* argv[]) { if (options.debug) { std::cerr << "w-parsing..." << std::endl; } - sexprBuilder = make_unique(wasm, *(*root)[0]); + sexprBuilder = + make_unique(wasm, *(*root)[0], options.profile); } } catch (ParseException& p) { p.dump(std::cerr); -- cgit v1.2.3