Changeset 16029 in project


Ignore:
Timestamp:
09/22/09 04:29:57 (10 years ago)
Author:
Kon Lovett
Message:

Use of new synch wrappers

Location:
release/4/lookup-table/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/lookup-table/trunk/lookup-table-synch.scm

    r15955 r16029  
    3232;;; Synchronized Dictionary
    3333
    34 (define-syntax synch-wrap-make
    35   (lambda (frm rnm cmp)
    36     (let ((_define (rnm 'define))
    37           (_let (rnm 'let))
    38           (_and (rnm 'and))
    39           (_or (rnm 'or))
    40           (_not (rnm 'not))
    41           (_null? (rnm 'null?))
    42           (_symbol? (rnm 'symbol?))
    43           (_car (rnm 'car))
    44           (_cdr (rnm 'cdr))
    45           (_if (rnm 'if))
    46           (_apply (rnm 'apply))
    47           (_make-object/synch (rnm 'make-object/synch))
    48           (_gensym (rnm 'gensym)) )
    49       (let* ((prcnam (cadr frm))
    50              (newnam (string->symbol (string-append (symbol->string prcnam) "/synch"))) )
    51         `(,_define (,newnam . args)
    52            (,_let ((id (,_and (,_not (,_null? args)) (,_symbol? (,_car args)) (,_car args))))
    53              (,_make-object/synch (,_apply ,prcnam (,_if id (,_cdr args) args))
    54                                   (,_or id (,_gensym 'object/synch-))) ) ) ) ) ) )
    55 
    56 (define-syntax synch-wrap
    57   (lambda (frm rnm cmp)
    58     (let ((_define (rnm 'define))
    59           (_apply (rnm 'apply))
    60           (_let/synch (rnm 'let/synch)) )
    61       (let* ((prcnam (cadr frm))
    62              (newnam (string->symbol (string-append (symbol->string prcnam) "/synch"))) )
    63         `(,_define (,newnam os . args) (,_let/synch ((o os)) (,_apply ,prcnam o args))) ) ) ) )
    64 
    65 (synch-wrap-make make-dict)
    66 (synch-wrap alist->dict)
    67 (synch-wrap dict->alist)
    68 (synch-wrap dict?)
    69 (synch-wrap dict-equivalence-function)
    70 (synch-wrap dict-count)
    71 (synch-wrap dict-keys)
    72 (synch-wrap dict-values)
    73 (synch-wrap dict-ref)
    74 (synch-wrap dict-indempotent-ref!)
    75 (synch-wrap dict-set!)
    76 (synch-wrap dict-exists?)
    77 (synch-wrap dict-update!)
    78 (synch-wrap dict-update-list!)
    79 (synch-wrap dict-update-dict!)
    80 (synch-wrap dict-delete!)
    81 (synch-wrap dict-for-each)
    82 (synch-wrap dict-search)
    83 (synch-wrap dict-merge!)
    84 (synch-wrap dict-print)
     34(define-constructor/synch make-dict dict/synch:)
     35(define-predicate/synch dict?)
     36(define-operation/synch alist->dict)
     37(define-operation/synch dict->alist)
     38(define-operation/synch dict?)
     39(define-operation/synch dict-equivalence-function)
     40(define-operation/synch dict-count)
     41(define-operation/synch dict-keys)
     42(define-operation/synch dict-values)
     43(define-operation/synch dict-ref)
     44(define-operation/synch dict-indempotent-ref!)
     45(define-operation/synch dict-set!)
     46(define-operation/synch dict-exists?)
     47(define-operation/synch dict-update!)
     48(define-operation/synch dict-update-list!)
     49(define-operation/synch dict-update-dict!)
     50(define-operation/synch dict-delete!)
     51(define-operation/synch dict-for-each)
     52(define-operation/synch dict-search)
     53(define-operation/synch dict-merge!)
     54(define-operation/synch dict-print)
    8555
    8656) ;module lookup-table-synch
  • release/4/lookup-table/trunk/lookup-table-unsafe-synch.scm

    r15955 r16029  
    3232;;; Synchronized Dictionary
    3333
    34 (define-syntax synch-wrap-make
    35   (lambda (frm rnm cmp)
    36     (let ((_define (rnm 'define))
    37           (_let (rnm 'let))
    38           (_and (rnm 'and))
    39           (_or (rnm 'or))
    40           (_not (rnm 'not))
    41           (_null? (rnm 'null?))
    42           (_symbol? (rnm 'symbol?))
    43           (_car (rnm 'car))
    44           (_cdr (rnm 'cdr))
    45           (_if (rnm 'if))
    46           (_apply (rnm 'apply))
    47           (_make-object/synch (rnm 'make-object/synch))
    48           (_gensym (rnm 'gensym)) )
    49       (let* ((prcnam (cadr frm))
    50              (newnam (string->symbol (string-append (symbol->string prcnam) "/%synch"))) )
    51         `(,_define (,newnam . args)
    52            (,_let ((id (,_and (,_not (,_null? args)) (,_symbol? (,_car args)) (,_car args))))
    53              (,_make-object/synch (,_apply ,prcnam (,_if id (,_cdr args) args))
    54                                    (,_or id (,_gensym 'object/%synch-))) ) ) ) ) ) )
    5534
    56 (define-syntax synch-wrap
    57   (lambda (frm rnm cmp)
    58     (let ((_define (rnm 'define))
    59           (_apply (rnm 'apply))
    60           (_%let/synch (rnm '%let/synch)) )
    61       (let* ((prcnam (cadr frm))
    62              (newnam (string->symbol (string-append (symbol->string prcnam) "/%synch"))) )
    63         `(,_define (,newnam os . args) (,_%let/synch ((o os)) (,_apply ,prcnam o args))) ) ) ) )
    64 
    65 (synch-wrap-make make-dict)
    66 (synch-wrap alist->dict)
    67 (synch-wrap dict->alist)
    68 (synch-wrap dict?)
    69 (synch-wrap dict-equivalence-function)
    70 (synch-wrap dict-count)
    71 (synch-wrap dict-keys)
    72 (synch-wrap dict-values)
    73 (synch-wrap dict-ref)
    74 (synch-wrap dict-indempotent-ref!)
    75 (synch-wrap dict-set!)
    76 (synch-wrap dict-exists?)
    77 (synch-wrap dict-update!)
    78 (synch-wrap dict-update-list!)
    79 (synch-wrap dict-update-dict!)
    80 (synch-wrap dict-delete!)
    81 (synch-wrap dict-for-each)
    82 (synch-wrap dict-search)
    83 (synch-wrap dict-merge!)
    84 (synch-wrap dict-print)
     35(define-constructor/%synch make-dict dict/%synch:)
     36(define-predicate/%synch dict?)
     37(define-operation/%synch alist->dict)
     38(define-operation/%synch dict->alist)
     39(define-operation/%synch dict?)
     40(define-operation/%synch dict-equivalence-function)
     41(define-operation/%synch dict-count)
     42(define-operation/%synch dict-keys)
     43(define-operation/%synch dict-values)
     44(define-operation/%synch dict-ref)
     45(define-operation/%synch dict-indempotent-ref!)
     46(define-operation/%synch dict-set!)
     47(define-operation/%synch dict-exists?)
     48(define-operation/%synch dict-update!)
     49(define-operation/%synch dict-update-list!)
     50(define-operation/%synch dict-update-dict!)
     51(define-operation/%synch dict-delete!)
     52(define-operation/%synch dict-for-each)
     53(define-operation/%synch dict-search)
     54(define-operation/%synch dict-merge!)
     55(define-operation/%synch dict-print)
    8556
    8657) ;module lookup-table-unsafe-synch
  • release/4/lookup-table/trunk/lookup-table.setup

    r16019 r16029  
    66
    77(required-extension-version
     8  "synch"                      "2.1.0"
    89  "check-errors"                "1.5.0")
    910
     
    1415    -fixnum-arithmetic
    1516    -disable-interrupts
    16     -inline-limit 50))
     17    -inline-limit 50
     18    -no-procedure-checks))
    1719
    1820(setup-shared-extension-module 'lookup-table (extension-version "1.11.0")
     
    2022
    2123(setup-shared-extension-module 'lookup-table-unsafe (extension-version "1.11.0")
    22   #:compile-options (append opts '(-debug-level 0
    23                                    -no-procedure-checks -no-bound-checks -no-argc-checks)))
     24  #:compile-options (append opts '(-debug-level 0 -no-bound-checks -no-argc-checks)))
    2425
    2526(setup-shared-extension-module 'lookup-table-synch (extension-version "1.11.0")
    2627  #:compile-options (append opts '(-debug-level 1)))
    2728
     29#; ;BAD IDEA
    2830(setup-shared-extension-module 'lookup-table-unsafe-synch (extension-version "1.11.0")
    29   #:compile-options (append opts '(-debug-level 0
    30                                    -no-procedure-checks -no-bound-checks -no-argc-checks)))
     31  #:compile-options (append opts '(-debug-level 0 -no-bound-checks -no-argc-checks)))
Note: See TracChangeset for help on using the changeset viewer.