summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 7014fd875..78fd72e38 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -1002,7 +1002,6 @@ public:
void writeStart();
void writeMemory();
void writeTypes();
- int32_t getFunctionTypeIndex(Name type);
void writeImports();
void writeFunctionSignatures();
@@ -1014,9 +1013,10 @@ public:
void writeDataSegments();
void writeEvents();
- uint32_t getFunctionIndex(Name name);
- uint32_t getGlobalIndex(Name name);
- uint32_t getEventIndex(Name name);
+ uint32_t getFunctionIndex(Name name) const;
+ uint32_t getGlobalIndex(Name name) const;
+ uint32_t getEventIndex(Name name) const;
+ uint32_t getTypeIndex(Signature sig) const;
void writeFunctionTableDeclaration();
void writeTableElements();
@@ -1060,6 +1060,8 @@ private:
BufferWithRandomAccess& o;
bool debug;
ModuleUtils::BinaryIndexes indexes;
+ std::unordered_map<Signature, Index> typeIndexes;
+ std::vector<Signature> types;
bool debugInfo = true;
std::ostream* sourceMap = nullptr;