Skip to content

Commit

Permalink
optimize IsPow2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hecate2 committed Sep 6, 2024
1 parent 6039fc5 commit d4f6558
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ private static void HandleBigIntegerIsPow2(MethodConvert methodConvert, Semantic
methodConvert.AddInstruction(OpCode.DEC);
methodConvert.AddInstruction(OpCode.AND);
methodConvert.Push(0);
methodConvert.AddInstruction(OpCode.NUMEQUAL);
methodConvert.Jump(OpCode.JMPIF, endTrue);
methodConvert.Jump(OpCode.JMPEQ, endTrue);
endFalse.Instruction = methodConvert.AddInstruction(OpCode.NOP);
methodConvert.Push(false);
methodConvert.Jump(OpCode.JMP, endTarget);
Expand Down
Loading

0 comments on commit d4f6558

Please sign in to comment.