summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorYury Delendik <ydelendik@mozilla.com>2017-06-01 14:53:42 -0500
committerAlon Zakai <alonzakai@gmail.com>2017-06-01 12:53:42 -0700
commit0dc07eaa7db35cf65edbbccebe5c89b995613745 (patch)
tree0718148a976b882c826c09189a3e779be311c69e /src/wasm.h
parentfcbe14a64d082117d7aab9bbf479e941964cd0de (diff)
downloadbinaryen-0dc07eaa7db35cf65edbbccebe5c89b995613745.tar.gz
binaryen-0dc07eaa7db35cf65edbbccebe5c89b995613745.tar.bz2
binaryen-0dc07eaa7db35cf65edbbccebe5c89b995613745.zip
Exporting/importing debug location information from .wast/.asm.js/.s formats (#1017)
* Extends wasm-as, wasm-dis and s2wasm to consume debug locations. * Exports source map from asm2wasm
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 3caab9dbc..dba08d92e 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -527,7 +527,9 @@ public:
std::map<Name, Index> localIndices;
struct DebugLocation {
- uint32_t fileIndex, lineNumber;
+ 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); }
};
std::unordered_map<Expression*, DebugLocation> debugLocations;