diff options
author | Thomas Lively <tlively@google.com> | 2024-12-03 11:20:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-03 11:20:36 -0800 |
commit | 87f9dac127b387715d8d96ac7ec8fd469d8c2dab (patch) | |
tree | aa1aec906bf6adc3ea3d93c56616d393850e2249 /src/wasm/parsing.cpp | |
parent | f331120e4b942a795d4a6b6d0d5a3d781c1e6a4c (diff) | |
download | binaryen-87f9dac127b387715d8d96ac7ec8fd469d8c2dab.tar.gz binaryen-87f9dac127b387715d8d96ac7ec8fd469d8c2dab.tar.bz2 binaryen-87f9dac127b387715d8d96ac7ec8fd469d8c2dab.zip |
[NFC] Encapsulate source map reader state (#7132)
Move all state relevant to reading source maps out of WasmBinaryReader
and into a new utility, SourceMapReader. This is a prerequisite for
parallelizing the parsing of function bodies, since the source map
reader state is different at the beginning of each function.
Also take the opportunity to simplify the way we read source maps, for
example by deferring the reading of anything but the position of a debug
location until it will be used and by using `std::optional` instead of
singleton `std::set`s to store function prologue and epilogue debug
locations.
Diffstat (limited to 'src/wasm/parsing.cpp')
-rw-r--r-- | src/wasm/parsing.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/wasm/parsing.cpp b/src/wasm/parsing.cpp index 1606a2dd1..5d34da78e 100644 --- a/src/wasm/parsing.cpp +++ b/src/wasm/parsing.cpp @@ -36,18 +36,6 @@ void ParseException::dump(std::ostream& o) const { Colors::normal(o); } -void MapParseException::dump(std::ostream& o) const { - Colors::magenta(o); - o << "["; - Colors::red(o); - o << "map parse exception: "; - Colors::green(o); - o << text; - Colors::magenta(o); - o << "]"; - Colors::normal(o); -} - // UniqueNameMapper Name UniqueNameMapper::getPrefixedName(Name prefix) { |