Changeset 39708 in project


Ignore:
Timestamp:
03/14/21 21:03:12 (6 weeks ago)
Author:
Kon Lovett
Message:

primitives removal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/mailbox/trunk/inline-type-checks.scm

    r39700 r39708  
    1313
    1414;just in case older inlines
    15 (define-inline (%natural? n) (%<= 0 n))
    16 (define-inline (%fxnatural? fx) (%fx<= 0 fx))
     15(define-inline (natural? n) (<= 0 n))
     16(define-inline (fxnatural? fx) (fx<= 0 fx))
    1717
    1818(cond-expand
     
    4242
    4343    (define-inline (%alist? obj)
    44       (or (%null? obj)
    45           (and (%pair? obj) (%list-every/1 (lambda (x) (%pair? x)) obj))) )
     44      (or (null? obj)
     45          (and (pair? obj) (%list-every/1 (lambda (x) (pair? x)) obj))) )
    4646
    4747    ;;
     
    6767
    6868    (define-inline (%check-positive-fixnum loc obj . args)
    69       (unless (and (%fixnum? obj) (%fxpositive? obj))
     69      (unless (and (fixnum? obj) (fxpositive? obj))
    7070        (error-positive-fixnum loc obj (optional args)))
    7171      obj )
    7272
    7373    (define-inline (%check-natural-fixnum loc obj . args)
    74       (unless (and (%fixnum? obj) (%fxnatural? obj))
     74      (unless (and (fixnum? obj) (fxnatural? obj))
    7575        (error-natural-fixnum loc obj (optional args)))
    7676      obj )
     
    7979
    8080    (define-inline (%check-positive-integer loc obj . args)
    81       (unless (and (%integer? obj) (%positive? obj))
     81      (unless (and (integer? obj) (positive? obj))
    8282        (error-positive-integer loc obj (optional args)))
    8383      obj )
    8484
    8585    (define-inline (%check-natural-integer loc obj . args)
    86       (unless (and (%integer? obj) (%natural? obj))
     86      (unless (and (integer? obj) (natural? obj))
    8787        (error-natural-integer loc obj (optional args)))
    8888      obj )
     
    9191
    9292    (define-inline (%check-positive-number loc obj . args)
    93       (unless (and (%number? obj) (%positive? obj))
     93      (unless (and (number? obj) (positive? obj))
    9494        (error-positive-number loc obj (optional args)))
    9595      obj )
    9696
    9797    (define-inline (%check-natural-number loc obj . args)
    98       (unless (and (%number? obj) (%natural? obj))
     98      (unless (and (number? obj) (natural? obj))
    9999        (error-natural-number loc obj (optional args)))
    100100      obj )
     
    110110
    111111    (define-inline (%check-minimum-argument-count loc argc minargc)
    112       (unless (%fx<= minargc argc)
     112      (unless (fx<= minargc argc)
    113113        (error-minimum-argument-count loc argc minargc))
    114114      argc )
    115115
    116116    (define-inline (%check-argument-count loc argc maxargc)
    117       (unless (%fx<= argc maxargc)
     117      (unless (fx<= argc maxargc)
    118118        (error-argument-count loc argc maxargc))
    119119      argc ) ) )
Note: See TracChangeset for help on using the changeset viewer.