From fa050b2f9c1e4b68c5067487515d1f67ae9bf9cf Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 24 Jun 2016 09:42:52 -0700 Subject: update spec tests, and handle some flux in call_indirect in upstream --- src/wasm-s-parser.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/wasm-s-parser.h') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index a48ee1a5f..c6b3809f1 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -498,6 +498,14 @@ private: body = allocator.alloc(); } if (currFunction->result != result) throw ParseException("bad func declaration", s.line, s.col); + /* TODO: spec in flux, https://github.com/WebAssembly/spec/pull/301 + if (type.isNull()) { + // if no function type provided, generate a private one for this function + auto* functionType = sigToFunctionType(getSig(currFunction.get())); + wasm.addFunctionType(functionType); + type = functionType->name; + } + */ currFunction->body = body; currFunction->type = type; wasm.addFunction(currFunction.release()); -- cgit v1.2.3