Skip to content

Commit

Permalink
*actually* fix the code generation bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
vddCore committed May 21, 2024
1 parent fafd139 commit 7cfa957
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ public override void Visit(ByExpression byExpression)

Chunk.CodeGenerator.Emit(arms[i].DeepEquality ? OpCode.DEQ : OpCode.CEQ);
Chunk.CodeGenerator.Emit(OpCode.FJMP, labels[i]);
Chunk.CodeGenerator.Emit(OpCode.POP);


if (i < arms.Count - 1)
{
Chunk.CodeGenerator.Emit(OpCode.POP);
}

Visit(arms[i].ValueArm);

if (arms[i].ValueArm is Expression)
Expand Down

0 comments on commit 7cfa957

Please sign in to comment.