Changeset 13619 in project


Ignore:
Timestamp:
03/09/09 19:37:10 (11 years ago)
Author:
Kon Lovett
Message:

Added primitive inlines.

Location:
release/4/err5rs-arithmetic/trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • release/4/err5rs-arithmetic/trunk/err5rs-arithmetic-bitwise.scm

    r13610 r13619  
    2525
    2626(include "chicken-primitive-object-inlines")
    27 
    28 ;TODO - add to chicken-primitive-object-inline
    29 
    30 (define-inline (%number? x) (##core#inline "C_i_numberp" x))
    31 
    32 (define-inline (%zero? n) (##core#inline "C_i_zerop" n))
    33 
    34 (define-inline (%arithmetic-shift x d) (##core#inline_allocate ("C_a_i_arithmetic_shift" 4) x d))
    35 
    36 (define-inline (%bitwise-not x) (##core#inline_allocate ("C_a_i_bitwise_not" 4) x))
    37 (define-inline (%bitwise-ior x y) (##core#inline_allocate ("C_a_i_bitwise_ior" 4) x y))
    38 (define-inline (%bitwise-and x y) (##core#inline_allocate ("C_a_i_bitwise_and" 4) x y))
    39 
    40 (define-inline (%negative? x) (##core#inline "C_i_negativep" x))
    4127
    4228;;
  • release/4/err5rs-arithmetic/trunk/err5rs-arithmetic-fixnums.scm

    r13606 r13619  
    2323
    2424(include "chicken-primitive-object-inlines")
    25 
    26 ;TODO - add to chicken-primitive-object-inline
    27 
    28 (define-inline (%< x y) ((##core#primitive "C_lessp") x y))
    29 (define-inline (%<= x y) ((##core#primitive "C_less_or_equal_p") x y))
    30 (define-inline (%> x y) ((##core#primitive "C_greaterp") x y))
    31 (define-inline (%>= x y) ((##core#primitive "C_greater_or_equal_p") x y))
    32 
    33 (define-inline (%+ x y) ((##core#primitive "C_plus") x y))
    34 (define-inline (%- x y) ((##core#primitive "C_minus") x y))
    35 (define-inline (%* x y) ((##core#primitive "C_times") x y))
    36 (define-inline (%/ x y) ((##core#primitive "C_divide") x y))
    37 
    38 (define-inline (%quotient x y) ((##core#primitive "C_quotient") x y))
    39 
    40 (define-inline (%arithmetic-shift x d) (##core#inline_allocate ("C_a_i_arithmetic_shift" 4) x d))
    4125
    4226;;
  • release/4/err5rs-arithmetic/trunk/err5rs-arithmetic-flonums.scm

    r13610 r13619  
    2424
    2525(include "chicken-primitive-object-inlines")
    26 
    27 ;TODO - add to chicken-primitive-object-inline
    28 
    29 (define-inline (%finite? x) (##core#inline "C_i_finitep" x))
    30 
    31 (define-inline (%fp= x y) (##core#inline "C_flonum_equalp" x y))
    32 (define-inline (%fp< x y) (##core#inline "C_flonum_lessp" x y))
    33 (define-inline (%fp<= x y) (##core#inline "C_flonum_less_or_equal_p" x y))
    34 (define-inline (%fp> x y) (##core#inline "C_flonum_greaterp" x y))
    35 (define-inline (%fp>= x y) (##core#inline "C_flonum_greater_or_equal_p" x y))
    36 
    37 (define-inline (%fpmax x y) (##core#inline "C_i_flonum_max" x y))
    38 (define-inline (%fpmax x y) (##core#inline "C_i_flonum_min" x y))
    39 
    40 (define-inline (%fpfloor x) ((##core#primitive "C_flonum_floor") x))
    41 (define-inline (%fpceiling x) ((##core#primitive "C_flonum_ceiling") x))
    42 (define-inline (%fptruncate x) ((##core#primitive "C_flonum_truncate") x))
    43 (define-inline (%fpround x) ((##core#primitive "C_flonum_round") x))
    44 
    45 (define-inline (%fpfraction x) ((##core#primitive "C_flonum_fraction") x))
    46 
    47 (define-inline (%fpnegate x y) (##core#inline_allocate ("C_a_i_flonum_negate" 4) x y))
    48 
    49 (define-inline (%fp- x y) (##core#inline_allocate ("C_a_i_flonum_difference" 4) x y))
    50 (define-inline (%fp+ x y) (##core#inline_allocate ("C_a_i_flonum_plus" 4) x y))
    51 (define-inline (%fp* x y) (##core#inline_allocate ("C_a_i_flonum_times" 4) x y))
    52 (define-inline (%fp/ x y) (##core#inline_allocate ("C_a_i_flonum_quotient" 4) x y))
    53 
    54 (define-inline (%fpabs x) (##core#inline_allocate ("C_a_i_abs" 4) x))
    55 (define-inline (%fpacos x) (##core#inline_allocate ("C_a_i_acos" 4) x))
    56 (define-inline (%fpasin x) (##core#inline_allocate ("C_a_i_asin" 4) x))
    57 (define-inline (%fpatan x) (##core#inline_allocate ("C_a_i_atan" 4) x))
    58 (define-inline (%fpatan2 x) (##core#inline_allocate ("C_a_i_atan2" 4) x))
    59 (define-inline (%fpcos x) (##core#inline_allocate ("C_a_i_cos" 4) x))
    60 (define-inline (%fpexp x) (##core#inline_allocate ("C_a_i_exp" 4) x))
    61 (define-inline (%fplog x) (##core#inline_allocate ("C_a_i_log" 4) x))
    62 (define-inline (%fpsin x) (##core#inline_allocate ("C_a_i_sin" 4) x))
    63 (define-inline (%fpsqrt x) (##core#inline_allocate ("C_a_i_sqrt" 4) x))
    64 (define-inline (%fptan x) (##core#inline_allocate ("C_a_i_tan" 4) x))
    65 
    66 (define-inline (%< x y) ((##core#primitive "C_lessp") x y))
    67 
    68 (define-inline (%expt x y) ((##core#primitive "C_expt") x y))
    69 
    70 (define-inline (%integer? x) (##core#inline "C_i_integerp" x))
    71 
    72 (define-inline (%exact->inexact x) ((##core#primitive "C_exact_to_inexact") x))
    7326
    7427;;
  • release/4/err5rs-arithmetic/trunk/err5rs-arithmetic.meta

    r13606 r13619  
    1010 (files
    1111  "tests"
     12  "chicken-primitive-object-inlines.scm"
    1213  "err5rs-arithmetic-fixnum.scm"
    1314  "err5rs-arithmetic-flonum.scm"
Note: See TracChangeset for help on using the changeset viewer.