Changeset 11903 in project


Ignore:
Timestamp:
09/05/08 10:05:55 (12 years ago)
Author:
felix winkelmann
Message:

replaced primitives used by synrules to avoid primitive-renaming problem

Location:
chicken/branches/hygienic
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/hygienic/TODO

    r11892 r11903  
    1616
    1717** macros
     18*** synrules must refer to internal bindings
     19    or renames trigger the usual problem with aliased primitives
    1820*** expansion of r5rs_pitfall 4.2 incorrect
    1921    possibly due to a non-aliased implicit "begin" somewhere
    20 
    21 ** dirty-macros.scm loops when using `defile'
    22    possibly due to unrenamed special forms
     22*** dirty-macros.scm loops when using `defile'
     23    possibly due to unrenamed special forms
    2324
    2425** modules
     
    5859*** handle redirects in http-fetch
    5960*** connect timeout and alternative download location
     61*** only download tests on demand (-test option)
    6062** chicken-install
    6163*** handle needs/depends of builtin extension
  • chicken/branches/hygienic/c-platform.scm

    r11892 r11903  
    187187    ##sys#fudge ##sys#immediate? ##sys#direct-return ##sys#context-switch
    188188    ##sys#make-structure ##sys#apply ##sys#apply-values ##sys#continuation-graft
    189     ##sys#bytevector? ##sys#make-vector ##sys#setter
     189    ##sys#bytevector? ##sys#make-vector ##sys#setter ##sys#car ##sys#cdr ##sys#pair?
     190    ##sys#eq? ##sys#list? ##sys#vector?
    190191    ##sys#foreign-char-argument ##sys#foreign-fixnum-argument ##sys#foreign-flonum-argument
    191192    ##sys#foreign-block-argument ##sys#foreign-number-vector-argument
     
    471472
    472473  (rewrite-c..r 'car "C_i_car" "C_u_i_car" 0)
     474  (rewrite-c..r '##sys#car "C_i_car" "C_u_i_car" 0)
     475  (rewrite-c..r '##sys#cdr "C_i_cdr" "C_u_i_cdr" 0)
    473476  (rewrite-c..r 'cadr "C_i_cadr" "C_u_i_cadr" 1)
    474477  (rewrite-c..r 'caddr "C_i_caddr" "C_u_i_caddr" 2)
     
    563566
    564567(rewrite 'eq? 1 2 "C_eqp")
     568(rewrite '##sys#eq? 1 2 "C_eqp")
    565569(rewrite 'eqv? 1 2 "C_i_eqvp")
    566570
     
    568572(rewrite 'list-ref 2 2 "C_i_list_ref" #t "C_i_vector_ref")
    569573(rewrite 'null? 2 1 "C_i_nullp" #t "C_vemptyp")
     574(rewrite '##sys#null? 2 1 "C_i_nullp" #t "C_vemptyp")
    570575(rewrite 'length 2 1 "C_i_length" #t "C_block_size")
    571576(rewrite 'not 2 1 "C_i_not" #t #f)
     
    575580(rewrite 'symbol? 2 1 "C_i_symbolp" #t #f)
    576581(rewrite 'vector? 2 1 "C_i_vectorp" #t #f)
     582(rewrite '##sys#vector? 2 1 "C_i_vectorp" #t #f)
    577583(rewrite 'pair? 2 1 "C_i_pairp" #t "C_notvemptyp")
     584(rewrite '##sys#pair? 2 1 "C_i_pairp" #t "C_notvemptyp")
    578585(rewrite 'procedure? 2 1 "C_i_closurep" #t #f)
    579586(rewrite 'port? 2 1 "C_i_portp" #t #f)
     
    701708
    702709(rewrite 'vector-length 2 1 "C_i_vector_length" #t #f)
     710(rewrite '##sys#vector-length 2 1 "C_i_vector_length" #t #f)
    703711(rewrite 'string-length 2 1 "C_i_string_length" #t #f)
    704712(rewrite 'inexact->exact 2 1 "C_i_inexact_to_exact" #t #f)
     
    744752(rewrite 'vector-set! 11 3 '##sys#setslot #f)
    745753(rewrite 'vector-set! 2 3 "C_i_vector_set" #t #f)
     754
     755(rewrite '##sys#vector->list 11 1 'vector->list #t)
     756(rewrite '##sys#list->vector 11 1 'list->vector #t)
     757(rewrite '##sys#>= 11 2 '>= #t)
     758(rewrite '##sys#= 11 2 '= #t)
    746759
    747760(rewrite 'gcd 12 '##sys#gcd #t 2)
  • chicken/branches/hygienic/library.scm

    r11278 r11903  
    42784278(define ##sys#apply apply)
    42794279(define ##sys#values values)
     4280(define ##sys#equal? equal?)
     4281(define ##sys#car car)
     4282(define ##sys#cdr cdr)
     4283(define ##sys#pair? pair?)
     4284(define ##sys#vector? vector?)
     4285(define ##sys#vector->list vector->list)
     4286(define ##sys#vector-length vector-length)
     4287(define ##sys#vector-ref vector-length)
     4288(define ##sys#vector-length vector-length)
     4289(define ##sys#>= >=)
     4290(define ##sys#= =)
     4291(define ##sys#+ +)
     4292(define ##sys#eq? eq?)
     4293(define ##sys#list? list?)
     4294(define ##sys#null? null?)
     4295(define ##sys#map-n map)
    42804296
    42814297
  • chicken/branches/hygienic/synrules.scm

    r10930 r11903  
    6161(define (##sys#process-syntax-rules ellipsis rules subkeywords r c)
    6262
    63   (define %append (r 'append))
    64   (define %apply (r 'apply))
     63  (define %append '##sys#append)
     64  (define %apply '##sys#apply)
    6565  (define %and (r 'and))
    66   (define %car (r 'car))
    67   (define %cdr (r 'cdr))
    68   (define %vector? (r 'vector?))
    69   (define %vector-length (r 'vector-length))
    70   (define %vector-ref (r 'vector-ref))
    71   (define %vector->list (r 'vector->list))
    72   (define %list->vector (r 'list->vector))
    73   (define %>= (r '>=))
    74   (define %= (r '=))
    75   (define %+ (r '+))
     66  (define %car '##sys#car)
     67  (define %cdr '##sys#cdr)
     68  (define %vector? '##sys#vector?)
     69  (define %vector-length '##sys#vector-length)
     70  (define %vector-ref '##sys#vector-ref)
     71  (define %vector->list '##sys#vector->list)
     72  (define %list->vector '##sys#list->vector)
     73  (define %>= '##sys#>=)
     74  (define %= '##sys#=)
     75  (define %+ '##sys#+)
    7676  (define %i (r 'i))
    7777  (define %compare (r 'compare))
    7878  (define %cond (r 'cond))
    79   (define %cons (r 'cons))
     79  (define %cons '##sys#cons)
    8080  (define %else (r 'else))
    81   (define %eq? (r 'eq?))
    82   (define %equal? (r 'equal?))
     81  (define %eq? '##sys#eq?)
     82  (define %equal? '##sys#equal?)
    8383  (define %input (r 'input))
    8484  (define %l (r 'l))
     
    8686  (define %let (r 'let))
    8787  (define %let* (r 'let*))
    88   (define %list? (r 'list?))
     88  (define %list? '##sys#list?)
    8989  (define %list (r 'list))
    9090  (define %loop (r 'loop))
    91   (define %map (r 'map))
    92   (define %null? (r 'null?))
     91  (define %map1 '##sys#map)
     92  (define %map '##sys#map-n)
     93  (define %null? '##sys#null?)
    9394  (define %or (r 'or))
    94   (define %pair? (r 'pair?))
     95  (define %pair? '##sys#pair?)
    9596  (define %quote (r 'quote))
    9697  (define %rename (r 'rename))
     
    193194                              (mapit (if (eq? %temp x)
    194195                                         path ;+++
    195                                          `(,%map (,%lambda (,%temp) ,x)
    196                                                  ,path))))))
     196                                         `(,%map1 (,%lambda (,%temp) ,x)
     197                                                  ,path))))))
    197198          ((pair? pattern)
    198199           (append (process-pattern (car pattern) `(,%car ,path) mapit)
Note: See TracChangeset for help on using the changeset viewer.