diff --git a/srfi/143.sld b/srfi/143.sld index 21c31256..18d77360 100644 --- a/srfi/143.sld +++ b/srfi/143.sld @@ -17,7 +17,8 @@ ;fxzero? fxpositive? fxnegative? fxodd? fxeven? ;fx= fx< fx> fx<= fx>= ;fxmax fxmin - ;fx+ fx- fx* + fx+ + ;fx- fx* ;fxabs fxsquare fxsqrt fxexpt ;fx+/carry ;fx-/carry @@ -51,6 +52,13 @@ ;fxfold fxfor-each fxunfold ;fxlogical-shift ) + (inline + fx-width + fx-greatest + fx-least + fixnum? + fx+ + ) (begin (define (fx-width) 31) (define (fx-greatest) 1073741823) @@ -59,5 +67,11 @@ "(void *data, int argc, closure _, object k, object obj)" " return_closcall1(data, k, obj_is_int(obj) ? boolean_t : boolean_f); ") + (define-c fx+ + "(void *data, int argc, closure _, object k, object i, object j)" + " Cyc_check_fixnum(data, i); + Cyc_check_fixnum(data, j); + object result = obj_int2obj(obj_obj2int(i) + obj_obj2int(j)); + return_closcall1(data, k, result); ") ))