compiler: fix codegen for OR, fixes failing TestLOR
0880e88fa5
breaks it by introducing a new label
that is not counted here.
This commit is contained in:
parent
810f096811
commit
1a4055a962
1 changed files with 1 additions and 1 deletions
|
@ -361,7 +361,7 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
|
|||
|
||||
case token.LOR:
|
||||
ast.Walk(c, n.X)
|
||||
emitJmp(c.prog, vm.JMPIF, int16(len(c.l)-2))
|
||||
emitJmp(c.prog, vm.JMPIF, int16(len(c.l) - 3))
|
||||
ast.Walk(c, n.Y)
|
||||
return nil
|
||||
|
||||
|
|
Loading…
Reference in a new issue