Changeset 39709 in project


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

remove "primitives"

Location:
release/5/srfi-41/trunk
Files:
1 deleted
7 edited

Legend:

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

    r37256 r39709  
    88;; - This source is to be included only!
    99
    10 (import (chicken syntax))
    11 
    1210; maybe a problem with expansion environment namespace pollution
    1311(define-for-syntax (symbolize . elts)
     
    1513
    1614;just in case older inlines
    17 (define-inline (%natural? n) (%<= 0 n))
    18 (define-inline (%fxnatural? fx) (%fx<= 0 fx))
     15(define-inline (natural? n) (<= 0 n))
     16(define-inline (fxnatural? fx) (fx<= 0 fx))
    1917
    2018(cond-expand
     
    4442
    4543    (define-inline (%alist? obj)
    46       (or (%null? obj)
    47           (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))) )
    4846
    4947    ;;
     
    5856                   (typstr (symbol->string typ))
    5957                   (pred (if (not (null? (cddr frm))) (caddr frm)
    60                            (string->symbol (string-append "%" typstr "?"))))
     58                           (string->symbol (string-append #;"%" typstr "?"))))
    6159                   (nam (string->symbol (string-append "%check-" typstr)))
    6260                   (errnam (string->symbol (string-append "error-" typstr))) )
     
    6967
    7068    (define-inline (%check-positive-fixnum loc obj . args)
    71       (unless (and (%fixnum? obj) (%fxpositive? obj))
     69      (unless (and (fixnum? obj) (fxpositive? obj))
    7270        (error-positive-fixnum loc obj (optional args)))
    7371      obj )
    7472
    7573    (define-inline (%check-natural-fixnum loc obj . args)
    76       (unless (and (%fixnum? obj) (%fxnatural? obj))
     74      (unless (and (fixnum? obj) (fxnatural? obj))
    7775        (error-natural-fixnum loc obj (optional args)))
    7876      obj )
     
    8179
    8280    (define-inline (%check-positive-integer loc obj . args)
    83       (unless (and (%integer? obj) (%positive? obj))
     81      (unless (and (integer? obj) (positive? obj))
    8482        (error-positive-integer loc obj (optional args)))
    8583      obj )
    8684
    8785    (define-inline (%check-natural-integer loc obj . args)
    88       (unless (and (%integer? obj) (%natural? obj))
     86      (unless (and (integer? obj) (natural? obj))
    8987        (error-natural-integer loc obj (optional args)))
    9088      obj )
     
    9391
    9492    (define-inline (%check-positive-number loc obj . args)
    95       (unless (and (%number? obj) (%positive? obj))
     93      (unless (and (number? obj) (positive? obj))
    9694        (error-positive-number loc obj (optional args)))
    9795      obj )
    9896
    9997    (define-inline (%check-natural-number loc obj . args)
    100       (unless (and (%number? obj) (%natural? obj))
     98      (unless (and (number? obj) (natural? obj))
    10199        (error-natural-number loc obj (optional args)))
    102100      obj )
     
    112110
    113111    (define-inline (%check-minimum-argument-count loc argc minargc)
    114       (unless (%fx<= minargc argc)
     112      (unless (fx<= minargc argc)
    115113        (error-minimum-argument-count loc argc minargc))
    116114      argc )
    117115
    118116    (define-inline (%check-argument-count loc argc maxargc)
    119       (unless (%fx<= argc maxargc)
     117      (unless (fx<= argc maxargc)
    120118        (error-argument-count loc argc maxargc))
    121119      argc ) ) )
  • release/5/srfi-41/trunk/streams-derived.scm

    r39707 r39709  
    5959  (chicken base)
    6060  (chicken fixnum)
     61  (chicken syntax)
    6162  (srfi 9)
    6263  (srfi 23)
     
    6869    error-input-port error-list))
    6970
    70 (include-relative "chicken-primitive-object-inlines")
     71(define-inline (%structure-instance? x s) (##core#inline "C_i_structurep" x s))
     72
    7173(include-relative "inline-type-checks")
    7274
  • release/5/srfi-41/trunk/streams-math.scm

    r39706 r39709  
    3737  (chicken base)
    3838  (chicken type)
     39  (chicken syntax)
    3940  streams
    4041  streams-utils)
    4142
    42 (include-relative "chicken-primitive-object-inlines")
     43(define-inline (%structure-instance? x s) (##core#inline "C_i_structurep" x s))
     44
    4345(include-relative "streams-inlines")
    4446
  • release/5/srfi-41/trunk/streams-primitive.scm

    r39707 r39709  
    4444(import scheme
    4545  (chicken base)
     46  (chicken syntax)
    4647  type-checks
    4748  type-errors
    4849  record-variants)
    4950
    50 (include "chicken-primitive-object-inlines")
     51(define-inline (%structure-instance? x s) (##core#inline "C_i_structurep" x s))
    5152
    5253(include "streams-inlines")
  • release/5/srfi-41/trunk/streams-queue.scm

    r39707 r39709  
    2323  (chicken fixnum)
    2424  (chicken type)
     25  (chicken syntax)
    2526  streams
    2627  (only type-errors error-pair))
    2728
    28 (include-relative "chicken-primitive-object-inlines")
     29(define-inline (%structure-instance? x s) (##core#inline "C_i_structurep" x s))
     30
    2931(include-relative "inline-type-checks")
    3032
  • release/5/srfi-41/trunk/streams-utils.scm

    r39707 r39709  
    5050  (chicken base)
    5151  (chicken type)
     52  (chicken syntax)
    5253  streams
    5354  (only type-errors
     
    5556    error-string error-natural-integer))
    5657
    57 (include-relative "chicken-primitive-object-inlines")
     58(define-inline (%structure-instance? x s) (##core#inline "C_i_structurep" x s))
     59
    5860(include-relative "inline-type-checks")
    5961
  • release/5/srfi-41/trunk/tests/srfi-41-test.scm

    r39706 r39709  
    416416(time (times3 SIZE))
    417417
    418 #|
    419 ;FIXME How is this supposed to work? there is no 'eager' bottom for stream-force!
    420 
     418#| ;FIXME How is this supposed to work? there is no 'eager' bottom for stream-force!
    421419;;
    422420
Note: See TracChangeset for help on using the changeset viewer.