mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-01 05:11:09 +00:00
Add not
& Fix while
, for
codegen bugs
This commit is contained in:
parent
113e245478
commit
7b53015b04
7 changed files with 65 additions and 8 deletions
|
@ -601,6 +601,9 @@ impl CodeObj {
|
|||
Opcode311::POP_JUMP_FORWARD_IF_FALSE | Opcode311::POP_JUMP_FORWARD_IF_TRUE => {
|
||||
write!(instrs, "{arg} (to {})", idx + *arg as usize * 2 + 2).unwrap();
|
||||
}
|
||||
Opcode311::POP_JUMP_BACKWARD_IF_FALSE | Opcode311::POP_JUMP_BACKWARD_IF_TRUE => {
|
||||
write!(instrs, "{arg} (to {})", idx - *arg as usize * 2 + 2).unwrap();
|
||||
}
|
||||
Opcode311::JUMP_BACKWARD => {
|
||||
write!(instrs, "{arg} (to {})", idx - *arg as usize * 2 + 2).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue