Changeset 12428


Ignore:
Timestamp:
02/07/10 22:08:01 (11 years ago)
Author:
astalla
Message:

Corrected bugs: inline declaration for local functions was ignored as for
r12420, and the bug r12420 was supposed to fix has been fixed, too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp

    r12420 r12428  
    5252  (expand-function-call-inline
    5353   nil lambda-list
    54    (copy-tree `((block ,name
    55       (locally
    56           (declare (notinline ,name))
    57         ,@body))))
     54   (copy-tree `((block ,name ,@body)))
    5855   args)
    5956  (cond ((intersection lambda-list
     
    928925   (push local-function local-functions)))
    929926      ((with-saved-compiler-policy
    930    (let ((inline-decls *inline-declarations*))
    931      (process-optimization-declarations (cddr form))
    932      (let* ((block (make-flet-node))
    933       (*blocks* (cons block *blocks*))
    934       (body (cddr form))
    935       (*visible-variables* *visible-variables*))
    936        (setf (flet-free-specials block)
    937        (process-declarations-for-vars body nil block))
    938        (dolist (special (flet-free-specials block))
    939          (push special *visible-variables*))
    940        (setf (flet-form block)
    941        (let ((*inline-declarations* inline-decls))
    942          (list* (car form) local-functions (p1-body (cddr form)))))
    943        block))))))
     927   (process-optimization-declarations (cddr form))
     928   (let* ((block (make-flet-node))
     929    (*blocks* (cons block *blocks*))
     930    (body (cddr form))
     931    (*visible-variables* *visible-variables*))
     932     (setf (flet-free-specials block)
     933     (process-declarations-for-vars body nil block))
     934     (dolist (special (flet-free-specials block))
     935       (push special *visible-variables*))
     936     (setf (flet-form block)
     937     (list* (car form) local-functions (p1-body (cddr form))))
     938     block)))))
    944939
    945940
     
    952947               :variable variable))
    953948              (block-name (fdefinition-block-name name)))
     949   (setf (local-function-definition local-function)
     950         (copy-tree (cons lambda-list body)))
    954951   (multiple-value-bind (body decls) (parse-body body)
    955952     (setf (compiland-lambda-expression compiland)
     
    12881285;;            (format t "p1 local call to ~S~%" op)
    12891286;;            (format t "inline-p = ~S~%" (inline-p op))
    1290 
    12911287           (when (and *enable-inline-expansion* (inline-p op)
    12921288          (local-function-definition local-function))
     
    13011297                     (format t ";   inlining call to local function ~S~%" op)))
    13021298                 (return-from p1-function-call
    1303        (p1 expansion)))))
     1299       (let ((*inline-declarations*
     1300        (remove op *inline-declarations* :key #'car)))
     1301         (p1 expansion))))))
    13041302
    13051303           ;; FIXME
Note: See TracChangeset for help on using the changeset viewer.