Optimize asserts (#1411)

This commit is contained in:
Hamy Ratoanina
2023-12-07 02:46:20 -05:00
committed by GitHub
parent 47e24306b7
commit 4ba7718e66
+7 -6
View File
@@ -24,13 +24,13 @@ global panic:
%endmacro
%macro assert_eq
EQ
%assert_nonzero
SUB
%jumpi(panic)
%endmacro
%macro assert_eq(ret)
EQ
%assert_nonzero($ret)
SUB
%jumpi($ret)
%endmacro
%macro assert_lt
@@ -82,8 +82,9 @@ global panic:
%endmacro
%macro assert_eq_const(c)
%eq_const($c)
%assert_nonzero
PUSH $c
SUB
%jumpi(panic)
%endmacro
%macro assert_lt_const(c)