summaryrefslogtreecommitdiff
path: root/src/shell-interface.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-10-03 16:40:18 -0700
committerGitHub <noreply@github.com>2016-10-03 16:40:18 -0700
commitd19721bc110f0c4545eeaed825de99f963834a0a (patch)
tree100278897d5488b23206df5a957c368b60d2f224 /src/shell-interface.h
parenteab1c956d2dbdcc83a861c94f95662bfc0af38cc (diff)
downloadbinaryen-d19721bc110f0c4545eeaed825de99f963834a0a.tar.gz
binaryen-d19721bc110f0c4545eeaed825de99f963834a0a.tar.bz2
binaryen-d19721bc110f0c4545eeaed825de99f963834a0a.zip
Refactor Import::Kind and Export::Kind into an ExternalKind enum class (#725)
Diffstat (limited to 'src/shell-interface.h')
-rw-r--r--src/shell-interface.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shell-interface.h b/src/shell-interface.h
index b9a90131b..ee7ba4d9c 100644
--- a/src/shell-interface.h
+++ b/src/shell-interface.h
@@ -114,7 +114,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface {
void importGlobals(std::map<Name, Literal>& globals, Module& wasm) override {
// add spectest globals
for (auto& import : wasm.imports) {
- if (import->kind == Import::Global && import->module == SPECTEST && import->base == GLOBAL) {
+ if (import->kind == ExternalKind::Global && import->module == SPECTEST && import->base == GLOBAL) {
switch (import->globalType) {
case i32: globals[import->name] = Literal(int32_t(666)); break;
case i64: globals[import->name] = Literal(int64_t(666)); break;
@@ -122,7 +122,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface {
case f64: globals[import->name] = Literal(double(666.6)); break;
default: WASM_UNREACHABLE();
}
- } else if (import->kind == Import::Memory && import->module == SPECTEST && import->base == MEMORY) {
+ } else if (import->kind == ExternalKind::Memory && import->module == SPECTEST && import->base == MEMORY) {
// imported memory has initial 1 and max 2
wasm.memory.initial = 1;
wasm.memory.max = 2;