summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r--src/wasm/wasm-binary.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 095a0942f..4d5d7e176 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -16,6 +16,9 @@
#include "wasm-binary.h"
+#include <fstream>
+#include "support/bits.h"
+
namespace wasm {
void WasmBinaryWriter::prepare() {
@@ -1764,12 +1767,12 @@ void WasmBinaryBuilder::visitGetGlobal(GetGlobal *curr) {
if (debug) std::cerr << "zz node: GetGlobal " << pos << std::endl;
auto index = getU32LEB();
curr->name = getGlobalName(index);
- auto* global = wasm.checkGlobal(curr->name);
+ auto* global = wasm.getGlobalOrNull(curr->name);
if (global) {
curr->type = global->type;
return;
}
- auto* import = wasm.checkImport(curr->name);
+ auto* import = wasm.getImportOrNull(curr->name);
if (import && import->kind == ExternalKind::Global) {
curr->type = import->globalType;
return;