summaryrefslogtreecommitdiff
path: root/src/s2wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-11 20:40:55 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-11 20:58:53 -0800
commit686a8334090f57e1ba218e552819b3c6374059b5 (patch)
treef5dd8b43127fda4671eb4c7ce93440995525744e /src/s2wasm.h
parentefe369358fd6c8ede5145f12bfa511b515d2a32a (diff)
downloadbinaryen-686a8334090f57e1ba218e552819b3c6374059b5.tar.gz
binaryen-686a8334090f57e1ba218e552819b3c6374059b5.tar.bz2
binaryen-686a8334090f57e1ba218e552819b3c6374059b5.zip
refactor FunctionType to always be accessed from the Module's central store, which is necessary for simple binary writing
Diffstat (limited to 'src/s2wasm.h')
-rw-r--r--src/s2wasm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index b99a71159..9cb41b8d6 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -627,7 +627,7 @@ private:
auto import = allocator.alloc<Import>();
import->name = import->base = target;
import->module = ENV;
- import->type = sigToFunctionType(getSig(curr));
+ import->type = ensureFunctionType(getSig(curr), &wasm, allocator);
wasm.addImport(import);
}
}
@@ -1120,7 +1120,7 @@ public:
auto import = parent->allocator.alloc<Import>();
import->name = import->base = curr->target;
import->module = ENV;
- import->type = sigToFunctionType(getSig(curr));
+ import->type = ensureFunctionType(getSig(curr), &parent->wasm, parent->allocator);
parent->wasm.addImport(import);
}
}