summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJF Bastien <jfb@chromium.org>2016-01-18 09:45:04 -0800
committerJF Bastien <jfb@chromium.org>2016-01-18 09:45:04 -0800
commitc7e77be94e042768a6a3d20e1d5a55103f51cb59 (patch)
tree90f9eae02fa83b77c5719ed954eb533a17ff85d9 /src
parent7c08bb7983cb9cef688d674fe93d25e98be11c29 (diff)
parentcef2b2b2e3431d2735c30fae3796a8dceb614a8d (diff)
downloadbinaryen-c7e77be94e042768a6a3d20e1d5a55103f51cb59.tar.gz
binaryen-c7e77be94e042768a6a3d20e1d5a55103f51cb59.tar.bz2
binaryen-c7e77be94e042768a6a3d20e1d5a55103f51cb59.zip
Merge branch 'master' of github.com:WebAssembly/binaryen
Diffstat (limited to 'src')
-rw-r--r--src/wasm-binary.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index b6b0a55ae..d720c9a79 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -456,11 +456,11 @@ public:
type = function->type;
}
if (debug) std::cerr << "writing" << name << std::endl;
- o << getFunctionTypeIndex(type);
o << int8_t(BinaryConsts::Named |
(BinaryConsts::Import * !!import) |
(BinaryConsts::Locals * (function && function->locals.size() > 0)) |
(BinaryConsts::Export * (wasm->exportsMap.count(name) > 0)));
+ o << getFunctionTypeIndex(type);
emitString(name.str);
if (function && function->locals.size() > 0) {
mapLocals(function);
@@ -1040,8 +1040,8 @@ public:
size_t total = getLEB128(); // imports and functions
for (size_t i = 0; i < total; i++) {
if (debug) std::cerr << "read one at " << pos << std::endl;
- auto type = wasm.functionTypes[getInt16()];
auto data = getInt8();
+ auto type = wasm.functionTypes[getInt16()];
bool named = data & BinaryConsts::Named;
assert(named);
bool import = data & BinaryConsts::Import;