diff options
author | Thomas Lively <tlively@google.com> | 2024-01-04 14:50:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-04 14:50:29 -0800 |
commit | d312604d46ff3e1e14228394a2a4536b71483520 (patch) | |
tree | 060129b6d166495c89169aef152413357660da59 /scripts/gen-s-parser.py | |
parent | a58281ca114359cd6e65f5daaf086636aa18b0b0 (diff) | |
download | binaryen-d312604d46ff3e1e14228394a2a4536b71483520.tar.gz binaryen-d312604d46ff3e1e14228394a2a4536b71483520.tar.bz2 binaryen-d312604d46ff3e1e14228394a2a4536b71483520.zip |
[Parser] Parse br_if correctly (#6202)
The new text parser and IRBuilder were previously not differentiating between
`br` and `br_if`. Handle `br_if` correctly by popping and assigning a condition.
Diffstat (limited to 'scripts/gen-s-parser.py')
-rwxr-xr-x | scripts/gen-s-parser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gen-s-parser.py b/scripts/gen-s-parser.py index f716302d0..9d6e58481 100755 --- a/scripts/gen-s-parser.py +++ b/scripts/gen-s-parser.py @@ -24,8 +24,8 @@ instructions = [ ("if", "makeIf(s)"), ("then", "makeThenOrElse(s)"), ("else", "makeThenOrElse(s)"), - ("br", "makeBreak(s)"), - ("br_if", "makeBreak(s)"), + ("br", "makeBreak(s, false)"), + ("br_if", "makeBreak(s, true)"), ("br_table", "makeBreakTable(s)"), ("return", "makeReturn(s)"), ("call", "makeCall(s, /*isReturn=*/false)"), |