summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorYury Delendik <ydelendik@mozilla.com>2018-09-17 10:05:43 -0500
committerGitHub <noreply@github.com>2018-09-17 10:05:43 -0500
commitcefbbfadae87135ff37fb4fc1058c6baf8de0140 (patch)
tree4be93c23ad7cb95623f699a2fff9ef829abc426c /src/wasm.h
parent403be53fb84645b9338454681792538af876cf87 (diff)
downloadbinaryen-cefbbfadae87135ff37fb4fc1058c6baf8de0140.tar.gz
binaryen-cefbbfadae87135ff37fb4fc1058c6baf8de0140.tar.bz2
binaryen-cefbbfadae87135ff37fb4fc1058c6baf8de0140.zip
Add debug information locations to the function prolog/epilog (#1674)
The current patch: * Preserves the debug locations from function prolog and epilog * Preserves the debug locations of the nested blocks
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 6d1f67972..09c81e500 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -618,10 +618,16 @@ public:
uint32_t fileIndex, lineNumber, columnNumber;
bool operator==(const DebugLocation& other) const { return fileIndex == other.fileIndex && lineNumber == other.lineNumber && columnNumber == other.columnNumber; }
bool operator!=(const DebugLocation& other) const { return !(*this == other); }
+ bool operator<(const DebugLocation& other) const {
+ return fileIndex != other.fileIndex ? fileIndex < other.fileIndex :
+ lineNumber != other.lineNumber ? lineNumber < other.lineNumber : columnNumber < other.columnNumber;
+ }
};
std::unordered_map<Expression*, DebugLocation> debugLocations;
+ std::set<DebugLocation> prologLocation;
+ std::set<DebugLocation> epilogLocation;
- Function() : result(none) {}
+ Function() : result(none), prologLocation(), epilogLocation() {}
size_t getNumParams();
size_t getNumVars();