Changeset 5340


Ignore:
Timestamp:
Oct 13, 2006, 3:53:43 AM (18 years ago)
Author:
Gary Byers
Message:

Change inline expansion: use optimize settings in effect at call time, not
those in effect at definition time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/compiler/nx0.lisp

    r5131 r5340  
    18471847        (make-acode (%nx1-operator self-call) (nx1-arglist args args-in-regs) spread-p))
    18481848      (multiple-value-bind (lambda-form containing-env token) (nx-inline-expansion sym *nx-lexical-environment* global-only)
    1849         (or (nx1-expand-inline-call lambda-form containing-env token args spread-p)
     1849        (or (nx1-expand-inline-call lambda-form containing-env token args spread-p *nx-lexical-environment*)
    18501850            (multiple-value-bind (info afunc) (if (and  (symbolp sym) (not global-only)) (nx-lexical-finfo sym))
    18511851              (when (eq 'macro (car info))
     
    18681868                      val)))))))))
    18691869
    1870 (defun nx1-expand-inline-call (lambda-form env token args spread-p)
     1870(defun nx1-expand-inline-call (lambda-form env token args spread-p old-env)
    18711871  (if (and (or (null spread-p) (eq (length args) 1)))
    18721872    (if (and token (not (memq token *nx-inline-expansions*)))
    18731873      (let* ((*nx-inline-expansions* (cons token *nx-inline-expansions*))
    18741874             (lambda-list (cadr lambda-form))
    1875              (body (cddr lambda-form)))
     1875             (body (cddr lambda-form))
     1876             (new-env (new-lexical-environment env)))
     1877        (setf (lexenv.mdecls new-env)
     1878                `((speed . ,(speed-optimize-quantity old-env))
     1879                           (space . ,(space-optimize-quantity old-env))
     1880                           (safety . ,(space-optimize-quantity old-env))
     1881                           (compilation-speed . ,(compilation-speed-optimize-quantity old-env))
     1882                           (debug . ,(debug-optimize-quantity old-env))))
    18761883        (if spread-p
    1877           (nx1-destructure lambda-list (car args) nil nil body env)
    1878           (nx1-lambda-bind lambda-list args body env))))))
     1884          (nx1-destructure lambda-list (car args) nil nil body new-env)
     1885          (nx1-lambda-bind lambda-list args body new-env))))))
    18791886             
    18801887; note that regforms are reversed: arg_z is always in the car
Note: See TracChangeset for help on using the changeset viewer.