Commit function wrappers for builtin primitive operations.

This commit is contained in:
Jesse D. McDonald 2010-05-04 00:34:48 -05:00
parent a76e86013a
commit 269a512e20
1 changed files with 116 additions and 0 deletions

116
src/lib/primitives.rls Normal file
View File

@ -0,0 +1,116 @@
; Function forms of built-in primitives
; Unary value primitives; no side effects
(define (unbox x) (unbox x))
(define (car x) (car x))
(define (cdr x) (cdr x))
(define (boolean? x) (boolean? x))
(define (fixnum? x) (fixnum? x))
(define (box? x) (box? x))
(define (pair? x) (pair? x))
(define (vector? x) (vector? x))
(define (byte-string? x) (byte-string? x))
(define (struct? x) (struct? x))
(define (float? x) (float? x))
(define (builtin? x) (builtin? x))
(define (make-box x) (make-box x))
(define (make-struct x) (make-struct x))
(define (make-float x) (make-float x))
(define (make-lambda x) (make-lambda x))
(define (not x) (not x))
(define (bit-not x) (bit-not x))
(define (fix- x) (fix- x))
(define (float- x) (float- x))
(define (vector-size x) (vector-size x))
(define (byte-string-size x) (byte-string-size x))
(define (struct-nslots x) (struct-nslots x))
(define (struct-type x) (struct-type x))
(define (acos x) (acos x))
(define (asin x) (asin x))
(define (atan x) (atan x))
(define (cos x) (cos x))
(define (sin x) (sin x))
(define (tan x) (tan x))
(define (cosh x) (cosh x))
(define (sinh x) (sinh x))
(define (tanh x) (tanh x))
(define (exp x) (exp x))
(define (frexp x) (frexp x))
(define (log x) (log x))
(define (log10 x) (log10 x))
(define (modf x) (modf x))
(define (sqrt x) (sqrt x))
(define (ceil x) (ceil x))
(define (fabs x) (fabs x))
(define (floor x) (floor x))
(define (erf x) (erf x))
(define (erfc x) (erfc x))
(define (j0 x) (j0 x))
(define (j1 x) (j1 x))
(define (lgamma x) (lgamma x))
(define (y0 x) (y0 x))
(define (y1 x) (y1 x))
(define (asinh x) (asinh x))
(define (acosh x) (acosh x))
(define (atanh x) (atanh x))
(define (cbrt x) (cbrt x))
(define (logb x) (logb x))
(define (expm1 x) (expm1 x))
(define (ilogb x) (ilogb x))
(define (log1p x) (log1p x))
(define (normal? x) (normal? x))
(define (finite? x) (finite? x))
(define (subnormal? x) (subnormal? x))
(define (infinite? x) (infinite? x))
(define (nan? x) (nan? x))
; Binary value primitives; no side effects
(define (eq? x y) (eq? x y))
(define (cons x y) (cons x y))
(define (make-vector x y) (make-vector x y))
(define (make-byte-string x y) (make-byte-string x y))
(define (vector-ref x y) (vector-ref x y))
(define (byte-string-ref x y) (byte-string-ref x y))
(define (struct-ref x y) (struct-ref x y))
(define (fix+ x y) (fix+ x y))
(define (fix- x y) (fix- x y))
(define (fix* x y) (fix* x y))
(define (fix/ x y) (fix/ x y))
(define (fix% x y) (fix% x y))
(define (fix< x y) (fix< x y))
(define (fix>= x y) (fix>= x y))
(define (bit-and x y) (bit-and x y))
(define (bit-or x y) (bit-or x y))
(define (bit-xor x y) (bit-xor x y))
(define (fix<< x y) (fix<< x y))
(define (fix>> x y) (fix>> x y))
(define (fix>>> x y) (fix>>> x y))
(define (float+ x y) (float+ x y))
(define (float- x y) (float- x y))
(define (float* x y) (float* x y))
(define (float/ x y) (float/ x y))
(define (float= x y) (float= x y))
(define (float< x y) (float< x y))
(define (float>= x y) (float>= x y))
(define (atan2 x y) (atan2 x y))
(define (pow x y) (pow x y))
(define (ldexp x y) (ldexp x y))
(define (fmod x y) (fmod x y))
(define (hypot x y) (hypot x y))
(define (jn x y) (jn x y))
(define (yn x y) (yn x y))
(define (nextafter x y) (nextafter x y))
(define (remainder x y) (remainder x y))
(define (scalb x y) (scalb x y))
; Binary statement primitives
(define (set-box! x y) (set-box! x y))
(define (set-car! x y) (set-car! x y))
(define (set-cdr! x y) (set-cdr! x y))
; Ternary statement primitives
(define (vector-set! x y z) (vector-set! x y z))
(define (byte-string-set! x y z) (byte-string-set! x y z))
(define (struct-set! x y z) (struct-set! x y z))
; vim:set sw=2 expandtab: