summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h
index f98e3031a..bfa0c8947 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1154,6 +1154,7 @@ public:
std::map<Index, Name> localNames;
std::map<Name, Index> localIndices;
+ // Source maps debugging info: map expression nodes to their file, line, col.
struct DebugLocation {
uint32_t fileIndex, lineNumber, columnNumber;
bool operator==(const DebugLocation& other) const {
@@ -1175,6 +1176,10 @@ public:
std::set<DebugLocation> prologLocation;
std::set<DebugLocation> epilogLocation;
+ // General debugging info: map every instruction to its original position in
+ // the binary, relative to the beginning of the code section.
+ std::unordered_map<Expression*, uint32_t> binaryLocations;
+
size_t getNumParams();
size_t getNumVars();
size_t getNumLocals();
@@ -1344,6 +1349,8 @@ public:
Name start;
std::vector<UserSection> userSections;
+
+ // Source maps debug info.
std::vector<std::string> debugInfoFileNames;
// `features` are the features allowed to be used in this module and should be