Chez Scheme: mark fx{+,-,*}/wraparound
as safe on good args
Allow cptypes to convert a `fx{+,-,*}/wraparound` call to unsafe if it proves that the arguments are fixnums (unlike, say, `fx+`, where the possibility of overflow remains).
This commit is contained in:
parent
14a380bd49
commit
d1a61e5ab5
|
@ -1365,11 +1365,11 @@
|
|||
(ftype-pointer-null? [sig [(ftype-pointer) -> (boolean)]] [flags pure mifoldable discard])
|
||||
(ftype-pointer->sexpr [sig [(ftype-pointer) -> (ptr)]] [flags])
|
||||
(fx* [sig [(fixnum ...) -> (fixnum)]] [flags arith-op partial-folder]) ; not restricted to 2 arguments
|
||||
(fx*/wraparound [sig [(fixnum fixnum) -> (fixnum)]] [flags arith-op partial-folder])
|
||||
(fx*/wraparound [sig [(fixnum fixnum) -> (fixnum)]] [flags arith-op partial-folder safeongoodargs])
|
||||
(fx+ [sig [(fixnum ...) -> (fixnum)]] [flags arith-op partial-folder]) ; not restricted to 2 arguments
|
||||
(fx+/wraparound [sig [(fixnum fixnum) -> (fixnum)]] [flags arith-op partial-folder])
|
||||
(fx+/wraparound [sig [(fixnum fixnum) -> (fixnum)]] [flags arith-op partial-folder safeongoodargs])
|
||||
(fx- [sig [(fixnum fixnum ...) -> (fixnum)]] [flags arith-op partial-folder]) ; not restricted to 1 or 2 arguments
|
||||
(fx-/wraparound [sig [(fixnum fixnum) -> (fixnum)]] [flags arith-op partial-folder])
|
||||
(fx-/wraparound [sig [(fixnum fixnum) -> (fixnum)]] [flags arith-op partial-folder safeongoodargs])
|
||||
(fx/ [sig [(fixnum fixnum ...) -> (fixnum)]] [flags arith-op partial-folder]) ; not restricted to 1 or 2 arguments
|
||||
(fx1+ [sig [(fixnum) -> (fixnum)]] [flags arith-op cp02])
|
||||
(fx1- [sig [(fixnum) -> (fixnum)]] [flags arith-op cp02])
|
||||
|
|
Loading…
Reference in New Issue
Block a user