Changeset 12948 in project for chicken


Ignore:
Timestamp:
01/07/09 10:59:13 (11 years ago)
Author:
felix winkelmann
Message:

special length procedure in compiler to compute llist lengths (reported by Peter Bex); updated bootstrap tarball

Location:
chicken/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/compiler.scm

    r12937 r12948  
    271271  compiler-arguments process-command-line explicit-use-flag
    272272  default-standard-bindings default-extended-bindings
    273   foldable-bindings
     273  foldable-bindings llist-length
    274274  installation-home decompose-lambda-list external-to-pointer defconstant-bindings constant-declarations
    275275  copy-node! error-is-extended-binding toplevel-scope toplevel-lambda-id
     
    12361236             (##sys#check-syntax 'lambda lexp '(lambda lambda-list . #(_ 1)) #f se)
    12371237             (let ([llist (cadr lexp)])
    1238                (if (and (proper-list? llist) (= (length llist) (length args)))
     1238               (if (and (proper-list? llist) (= (llist-length llist) (length args)))
    12391239                   (walk `(,(macro-alias 'let se)
    12401240                           ,(map list llist args) ,@(cddr lexp)) se dest)
     
    21762176                                                     (= (length refs) (length sites))
    21772177                                                     (proper-list? llist) ) ] )
    2178                                           (when (and name custom (not (= (length llist) (length (cdr subs)))))
     2178                                          (when (and name
     2179                                                     custom
     2180                                                     (not (= (llist-length llist) (length (cdr subs)))))
    21792181                                            (quit
    21802182                                             "known procedure called with wrong number of arguments: ~A"
  • chicken/trunk/optimizer.scm

    r12937 r12948  
    3131  compiler-arguments process-command-line perform-lambda-lifting!
    3232  default-standard-bindings default-extended-bindings
    33   foldable-bindings
     33  foldable-bindings llist-length
    3434  installation-home decompose-lambda-list external-to-pointer
    3535  copy-node! variable-visible? mark-variable intrinsic?
     
    363363                                      [(and (test fid 'explicit-rest)
    364364                                            (not (memq n rest-consers)) ) ; make sure we haven't inlined rest-list already
    365                                        (let ([n (length llist)])
     365                                       (let ([n (llist-length llist)])
    366366                                         (if (< (length args) n)
    367367                                             (walk-generic n class params subs)
  • chicken/trunk/support.scm

    r12937 r12948  
    6767  generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
    6868  foreign-argument-conversion foreign-result-conversion final-foreign-type debugging
    69   constant-declarations process-lambda-documentation big-fixnum? sort-symbols
     69  constant-declarations process-lambda-documentation big-fixnum? sort-symbols llist-length
    7070  export-dump-hook intrinsic? node->sexpr emit-global-inline-file inline-max-size
    7171  make-random-name foreign-type-convert-result foreign-type-convert-argument)
     
    302302(define (process-lambda-documentation id doc proc)
    303303  proc)                                 ; Hook this
     304
     305(define (llist-length llist)
     306  (##core#inline "C_u_i_length" llist))
    304307
    305308
Note: See TracChangeset for help on using the changeset viewer.