make singeli assertions checked in debug mode
This commit is contained in:
parent
187eea1197
commit
34a4d48d95
@ -40,8 +40,8 @@ def rare{x & knum{x}} = x
|
||||
def rare{x:u1} = emit{u1, '__builtin_expect', x, 0}
|
||||
def assert{x & x==0} = assert{'failed assertion'}
|
||||
def assert{x & x==1} = 1
|
||||
def unreachable{} = emit{void, '__builtin_unreachable'}
|
||||
def assert{x:u1} = { if (not x) emit{void, '__builtin_unreachable'} }
|
||||
def unreachable{} = emit{void, 'si_unreachable'}
|
||||
def assert{x:u1} = { if (not x) emit{void, 'si_unreachable'} }
|
||||
|
||||
# various checks
|
||||
def isreg = kreg
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
#define SINGELI_FILE0(X) #X
|
||||
#define SINGELI_FILE1(X) SINGELI_FILE0(X)
|
||||
#define si_unreachable() ({UD})
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user