summaryrefslogtreecommitdiff
path: root/src/wasm/wasm.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-04-18 09:33:40 -0700
committerGitHub <noreply@github.com>2019-04-18 09:33:40 -0700
commit77c44ecded323174d79a98bd43c3d2c064ac08e4 (patch)
tree2d31ace4491b200d30b8f7d335da103e0db6db7b /src/wasm/wasm.cpp
parent13dd8771d57161618acec8907f739bcdbdcf66cb (diff)
downloadbinaryen-77c44ecded323174d79a98bd43c3d2c064ac08e4.tar.gz
binaryen-77c44ecded323174d79a98bd43c3d2c064ac08e4.tar.bz2
binaryen-77c44ecded323174d79a98bd43c3d2c064ac08e4.zip
Wasm2js: support i64 globals (#2021)
Split them into two i32 globals.
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r--src/wasm/wasm.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index 8b8285e35..519814cb7 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -907,7 +907,9 @@ Global* Module::addGlobal(Global* curr) {
if (getGlobalOrNull(curr->name)) {
Fatal() << "Module::addGlobal: " << curr->name << " already exists";
}
- globals.push_back(std::unique_ptr<Global>(curr));
+
+ globals.emplace_back(curr);
+
globalsMap[curr->name] = curr;
return curr;
}