Changeset 15713 in project


Ignore:
Timestamp:
09/03/09 00:30:25 (10 years ago)
Author:
kon
Message:

Bug fix for duplicated C procedures by compiler.

Location:
release/4/lookup-table
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/lookup-table/tags/1.9.1/lookup-table.scm

    r14543 r15713  
    3838  dict-print )
    3939
    40 (import
    41   scheme chicken
    42   srfi-1 srfi-69 ports data-structures extras
    43   miscmacros type-checks type-errors srfi-9-ext)
    44 (require-library srfi-1 srfi-69 extras miscmacros type-checks type-errors srfi-9-ext)
     40  (import
     41    scheme chicken
     42    srfi-1 srfi-69 ports data-structures extras
     43    miscmacros type-checks type-errors srfi-9-ext)
     44  (require-library srfi-1 srfi-69 extras miscmacros type-checks type-errors srfi-9-ext)
    4545
    4646;;;
     
    8080        dict )
    8181
     82; Representation independent primitive calls
     83
    8284(define (dictbase-test dict) ((dict-test-ref dict) (dict-data-ref dict)))
    8385(define (dictbase->alist dict) ((dict->alist-ref dict) (dict-data-ref dict)))
     
    195197
    196198(define (become-alist-dict! dict)
    197         (dict-data-set! dict (make-alist-data (dictbase-test dict) (dict->alist dict)))
     199        (dict-data-set! dict (make-alist-data (dictbase-test dict) (dictbase->alist dict)))
    198200        (set-alist-dict-procs! dict) )
    199201
     
    244246(define (become-htable-dict! dict)
    245247        (let ((test (dictbase-test dict)))
    246                 (dict-data-set! dict (make-htable-data test (alist->hash-table (dict->alist dict) test))))
     248                (dict-data-set! dict (make-htable-data test (alist->hash-table (dictbase->alist dict) test))))
    247249        (set-htable-dict-procs! dict) )
    248250
     
    255257    (error-argument-type loc obj "non-undefined value" nam)) )
    256258
    257 (define (check-assclist loc obj #!optional nam)
     259(define (check-alist loc obj #!optional nam)
    258260  (check-list loc obj nam)
    259261  (let loop ((al obj) (tal '()))
     
    332334(define (alist->dict al #!optional (test eq?) (size 0))
    333335  (when *dict-safe-mode*
    334     (check-assclist 'alist->dict al "alist")
     336    (check-alist 'alist->dict al "alist")
    335337    (check-cardinal-fixnum 'alist->dict size "size")
    336338    (check-procedure 'alist->dict test) )
  • release/4/lookup-table/trunk/lookup-table.scm

    r14543 r15713  
    3838  dict-print )
    3939
    40 (import
    41   scheme chicken
    42   srfi-1 srfi-69 ports data-structures extras
    43   miscmacros type-checks type-errors srfi-9-ext)
    44 (require-library srfi-1 srfi-69 extras miscmacros type-checks type-errors srfi-9-ext)
     40  (import
     41    scheme chicken
     42    srfi-1 srfi-69 ports data-structures extras
     43    miscmacros type-checks type-errors srfi-9-ext)
     44  (require-library srfi-1 srfi-69 extras miscmacros type-checks type-errors srfi-9-ext)
    4545
    4646;;;
     
    8080        dict )
    8181
     82; Representation independent primitive calls
     83
    8284(define (dictbase-test dict) ((dict-test-ref dict) (dict-data-ref dict)))
    8385(define (dictbase->alist dict) ((dict->alist-ref dict) (dict-data-ref dict)))
     
    195197
    196198(define (become-alist-dict! dict)
    197         (dict-data-set! dict (make-alist-data (dictbase-test dict) (dict->alist dict)))
     199        (dict-data-set! dict (make-alist-data (dictbase-test dict) (dictbase->alist dict)))
    198200        (set-alist-dict-procs! dict) )
    199201
     
    244246(define (become-htable-dict! dict)
    245247        (let ((test (dictbase-test dict)))
    246                 (dict-data-set! dict (make-htable-data test (alist->hash-table (dict->alist dict) test))))
     248                (dict-data-set! dict (make-htable-data test (alist->hash-table (dictbase->alist dict) test))))
    247249        (set-htable-dict-procs! dict) )
    248250
     
    255257    (error-argument-type loc obj "non-undefined value" nam)) )
    256258
    257 (define (check-assclist loc obj #!optional nam)
     259(define (check-alist loc obj #!optional nam)
    258260  (check-list loc obj nam)
    259261  (let loop ((al obj) (tal '()))
     
    332334(define (alist->dict al #!optional (test eq?) (size 0))
    333335  (when *dict-safe-mode*
    334     (check-assclist 'alist->dict al "alist")
     336    (check-alist 'alist->dict al "alist")
    335337    (check-cardinal-fixnum 'alist->dict size "size")
    336338    (check-procedure 'alist->dict test) )
Note: See TracChangeset for help on using the changeset viewer.