summaryrefslogtreecommitdiff
path: root/src/wasm-s-parser.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-07-06 13:10:21 -0700
committerGitHub <noreply@github.com>2016-07-06 13:10:21 -0700
commit9455a8749e1bb2c4788c37495b9cd319f046f6ff (patch)
treeda02eadeae89d40f82a1e203b11e581138682129 /src/wasm-s-parser.h
parent05d7bd3028793de007043eacc6e73b1c0cedb7ba (diff)
parentfa050b2f9c1e4b68c5067487515d1f67ae9bf9cf (diff)
downloadbinaryen-9455a8749e1bb2c4788c37495b9cd319f046f6ff.tar.gz
binaryen-9455a8749e1bb2c4788c37495b9cd319f046f6ff.tar.bz2
binaryen-9455a8749e1bb2c4788c37495b9cd319f046f6ff.zip
Merge pull request #621 from WebAssembly/spec-update
Spec test update
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r--src/wasm-s-parser.h8
1 files changed, 8 insertions, 0 deletions
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<Nop>();
}
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());