diff options
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 9f298662b..d490a2a96 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1090,6 +1090,9 @@ enum FeaturePrefix { } // namespace BinaryConsts +// (local index in IR, tuple index) => binary local index +using MappedLocals = std::unordered_map<std::pair<Index, Index>, size_t>; + // Writes out wasm to the binary format class WasmBinaryWriter { @@ -1275,6 +1278,11 @@ private: // the function is written out. std::vector<Expression*> binaryLocationTrackedExpressionsForFunc; + // Maps function names to their mapped locals. This is used when we emit the + // local names section: we map the locals when writing the function, save that + // info here, and then use it when writing the names. + std::unordered_map<Name, MappedLocals> funcMappedLocals; + void prepare(); }; |