Skip to content

Commit

Permalink
another silly bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Oct 31, 2023
1 parent ec90b10 commit 771690f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/nir/nirvm.nim
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ proc preprocess(c: var Preprocessing; bc: var Bytecode; t: Tree; n: NodePos; fla
bc.add info, NilValM, t[n].rawOperand
of LoopLabel, Label:
let lab = t[n].label
let here = CodePos(bc.code.len-1)
let here = CodePos(bc.code.len)
c.known[lab] = here
var p: seq[CodePos] = @[]
if c.toPatch.take(lab, p):
Expand Down Expand Up @@ -1097,7 +1097,7 @@ proc exec(c: Bytecode; pc: CodePos; u: ref Universe) =
var frame = StackFrame(u: u)
while pc.int < c.code.len:
when false: # c.interactive:
echo "running: "
echo "running: ", pc.int
debug c, pc

case c.code[pc].kind
Expand Down

0 comments on commit 771690f

Please sign in to comment.