summaryrefslogtreecommitdiff
path: root/src/wasm.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/wasm.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/wasm.h')
-rw-r--r--src/wasm.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 860f419cc..54461d2e7 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1427,35 +1427,28 @@ public:
}
};
+enum class ExternalKind {
+ Function = 0,
+ Table = 1,
+ Memory = 2,
+ Global = 3
+};
+
class Import {
public:
- enum Kind {
- Function = 0,
- Table = 1,
- Memory = 2,
- Global = 3,
- };
-
Import() : functionType(nullptr), globalType(none) {}
Name name, module, base; // name = module.base
- Kind kind;
+ ExternalKind kind;
FunctionType* functionType; // for Function imports
WasmType globalType; // for Global imports
};
class Export {
public:
- enum Kind {
- Function = 0,
- Table = 1,
- Memory = 2,
- Global = 3,
- };
-
Name name; // exported name - note that this is the key, as the internal name is non-unique (can have multiple exports for an internal, also over kinds)
Name value; // internal name
- Kind kind;
+ ExternalKind kind;
};
class Table {