diff options
author | Alon Zakai <azakai@google.com> | 2023-09-06 15:54:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 15:54:44 -0700 |
commit | 90571051b3d6f89eab184df3d4dd716472a6cd7c (patch) | |
tree | f3ad6a4a3c96143813d69a5cd4dec567a3d65791 /src/wasm/wat-parser.cpp | |
parent | 126d4fab3e00f003a06dac23f96aa70cbb75aa67 (diff) | |
download | binaryen-90571051b3d6f89eab184df3d4dd716472a6cd7c.tar.gz binaryen-90571051b3d6f89eab184df3d4dd716472a6cd7c.tar.bz2 binaryen-90571051b3d6f89eab184df3d4dd716472a6cd7c.zip |
[NFC] Source maps: Simplify the code and add comments (#5912)
Almost entirely trivial, except for this part:
- if (nextDebugLocation.availablePos == 0 &&
- nextDebugLocation.previousPos <= pos) {
+ if (nextDebugLocation.availablePos == 0) {
return;
I believe removing the extra check has no effect. Removing it does not change
anything in the test suite, and logically, if we set availablePos to 0 then we
definitely want to return here - we set it to 0 to indicate there is nothing left
to read, which is what the code after it does.
As a result, we can remove the previousPos field entirely.
Diffstat (limited to 'src/wasm/wat-parser.cpp')
0 files changed, 0 insertions, 0 deletions