Changeset 13331


Ignore:
Timestamp:
Dec 22, 2009, 10:23:44 PM (10 years ago)
Author:
gz
Message:

Transform APPLY with constant arg into FUNCALL (r13231 from trunk)

Location:
branches/working-0711/ccl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl

  • branches/working-0711/ccl/compiler/optimizers.lisp

    r13070 r13331  
    327327      call)))
    328328
     329
    329330(define-compiler-macro apply  (&whole call fn arg0 &rest args)
    330331  ;; Special-case (apply #'make-instance 'name ...)
     
    362363                   original-fn
    363364                   (nreconc (cdr (reverse args)) (%cdr last))))
    364             call))))))
     365            (if (and (consp last)
     366                     (eq (car last) 'quote)
     367                     (proper-list-p (cadr last)))
     368              (flet ((quotify (arg)
     369                       (if (self-evaluating-p arg)
     370                         arg
     371                         (list 'quote arg))))
     372                (cons 'funcall (cons original-fn
     373                                     (nreconc (cdr (reverse args)) (mapcar #'quotify (%cadr last))))))
     374              call)))))))
     375
    365376
    366377
Note: See TracChangeset for help on using the changeset viewer.