Changeset 11453
 Timestamp:
 12/19/08 19:46:24 (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/j/src/org/armedbear/lisp/jvm.lisp
r11452 r11453 863 863 (let ((form (copytree form)) 864 864 localfunction) 865 (cond ((and (consp (cadr form)) (eq (caadr form) 'LAMBDA)) 866 (when *currentcompiland* 867 (incf (compilandchildren *currentcompiland*))) 868 (let* ((*currentcompiland* *currentcompiland*) 869 (lambdaform (cadr form)) 865 (cond ((and (consp (cadr form)) 866 (or (eq (caadr form) 'LAMBDA) 867 (eq (caadr form) 'NAMEDLAMBDA))) 868 (let* ((namedlambdap (eq (caadr form) 'NAMEDLAMBDA)) 869 (namedlambdaform (when namedlambdap 870 (cadr form))) 871 (name (when namedlambdap 872 (cadr namedlambdaform))) 873 (lambdaform (if namedlambdap 874 (cons 'LAMBDA (cddr namedlambdaform)) 875 (cadr form))) 870 876 (lambdalist (cadr lambdaform)) 871 877 (body (cddr lambdaform)) 872 (compiland (makecompiland :name (gensym "ANONYMOUSLAMBDA") 878 (compiland (makecompiland :name (if namedlambdap 879 name (gensym "ANONYMOUSLAMBDA")) 873 880 :lambdaexpression lambdaform 874 881 :parent *currentcompiland*))) 882 (when *currentcompiland* 883 (incf (compilandchildren *currentcompiland*))) 875 884 (multiplevaluebind (body decls) 876 885 (parsebody body) 877 886 (setf (compilandlambdaexpression compiland) 878 `(lambda ,lambdalist ,@decls ,@body)) 879 (let ((*visiblevariables* *visiblevariables*) 880 (*currentcompiland* compiland)) 881 (p1compiland compiland))) 882 (list 'FUNCTION compiland))) 883 ((and (consp (cadr form)) (eq (caadr form) 'NAMEDLAMBDA)) 884 (when *currentcompiland* 885 (incf (compilandchildren *currentcompiland*))) 886 (let* ((*currentcompiland* *currentcompiland*) 887 ;; (lambdaform (cadr form)) 888 (namedlambdaform (cadr form)) 889 (name (cadr namedlambdaform)) 890 (lambdaform (cons 'LAMBDA (cddr namedlambdaform))) 891 (lambdalist (cadr lambdaform)) 892 (body (cddr lambdaform)) 893 (compiland (makecompiland :name name 894 :lambdaexpression lambdaform 895 :parent *currentcompiland*))) 896 ;; (format t "p1function namedlambdaform = ~S~%" namedlambdaform) 897 ;; (format t "p1function name = ~S~%" name) 898 ;; (format t "p1function lambdaform = ~S~%" lambdaform) 899 (multiplevaluebind (body decls) 900 (parsebody body) 901 (setf (compilandlambdaexpression compiland) 902 `(lambda ,lambdalist ,@decls (block nil ,@body))) 887 (if namedlambdap 888 `(lambda ,lambdalist ,@decls (block nil ,@body)) 889 `(lambda ,lambdalist ,@decls ,@body))) 903 890 (let ((*visiblevariables* *visiblevariables*) 904 891 (*currentcompiland* compiland)) … … 3828 3815 (defknown processargs (t) t) 3829 3816 (defun processargs (args) 3817 "" 3830 3818 (when args 3831 3819 (let ((numargs (length args)))
Note: See TracChangeset
for help on using the changeset viewer.