diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-09-02 12:21:24 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 09:55:59 -0700 |
commit | 6b216592116cdf23738df4aebabe7c6d759674e6 (patch) | |
tree | 139605624889d2cfc4fcc09178b5e112ffe0d91d /src/wasm.h | |
parent | e62f54d9d38e8f6b999d5f18f052424b7d603b6b (diff) | |
download | binaryen-6b216592116cdf23738df4aebabe7c6d759674e6.tar.gz binaryen-6b216592116cdf23738df4aebabe7c6d759674e6.tar.bz2 binaryen-6b216592116cdf23738df4aebabe7c6d759674e6.zip |
new export syntax in spec repo
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/wasm.h b/src/wasm.h index 1cf00cc36..d6bdfe91f 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1454,7 +1454,7 @@ public: Global = 3, }; - Name name; // exported name + 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; }; @@ -1474,10 +1474,13 @@ public: } }; + Name name; Address initial, max; std::vector<Segment> segments; - Table() : initial(0), max(kMaxSize) {} + Table() : initial(0), max(kMaxSize) { + name = Name::fromInt(0); + } }; class Memory { @@ -1499,10 +1502,13 @@ public: } }; + Name name; Address initial, max; // sizes are in pages std::vector<Segment> segments; - Memory() : initial(0), max(kMaxSize) {} + Memory() : initial(0), max(kMaxSize) { + name = Name::fromInt(0); + } }; class Global { @@ -1531,7 +1537,7 @@ private: // TODO: add a build option where Names are just indices, and then these methods are not needed std::map<Name, FunctionType*> functionTypesMap; std::map<Name, Import*> importsMap; - std::map<Name, Export*> exportsMap; + std::map<Name, Export*> exportsMap; // exports map is by the *exported* name, which is unique std::map<Name, Function*> functionsMap; std::map<Name, Global*> globalsMap; |