Changeset 11798 for trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
- Timestamp:
- 04/29/09 19:49:19 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r11795 r11798 8096 8096 (write-u2 0 stream)))))) 8097 8097 8098 (defun compile-xep (xep)8099 (declare (type compiland xep))8100 (let ((*all-variables* ())8101 (*closure-variables* ())8102 (*current-compiland* xep)8103 (*speed* 3)8104 (*safety* 0)8105 (*debug* 0))8106 8107 (aver (not (null (compiland-class-file xep))))8108 8109 ;; Pass 1.8110 (p1-compiland xep)8111 ;; (dformat t "*all-variables* = ~S~%" (mapcar #'variable-name *all-variables*))8112 (setf *closure-variables*8113 (remove-if-not #'variable-used-non-locally-p *all-variables*))8114 (setf *closure-variables*8115 (remove-if #'variable-special-p *closure-variables*))8116 ;; (dformat t "*closure-variables* = ~S~%" (mapcar #'variable-name *closure-variables*))8117 8118 (when *closure-variables*8119 (let ((i 0))8120 (dolist (var (reverse *closure-variables*))8121 (setf (variable-closure-index var) i)8122 (dformat t "var = ~S closure index = ~S~%" (variable-name var)8123 (variable-closure-index var))8124 (incf i))))8125 8126 ;; Pass 2.8127 (with-class-file (compiland-class-file xep)8128 (p2-compiland xep))))8129 8130 8131 (defun p2-%call-internal (form target representation)8132 (dformat t "p2-%call-internal~%")8133 (aload 0) ; this8134 (let ((args (cdr form))8135 (must-clear-values nil))8136 (dformat t "args = ~S~%" args)8137 (dolist (arg args)8138 (compile-form arg 'stack nil)8139 (unless must-clear-values8140 (unless (single-valued-p arg)8141 (setf must-clear-values t))))8142 (let ((arg-types (lisp-object-arg-types (length args)))8143 (return-type +lisp-object+))8144 (emit-invokevirtual *this-class* "_execute" arg-types return-type))8145 (emit-move-from-stack target representation)))8146 8147 8098 (defknown p2-compiland-process-type-declarations (list) t) 8148 8099 (defun p2-compiland-process-type-declarations (body) … … 8765 8716 nth 8766 8717 progn)) 8767 (install-p2-handler '%call-internal 'p2-%call-internal)8768 8718 (install-p2-handler '%ldb 'p2-%ldb) 8769 8719 (install-p2-handler '%make-structure 'p2-%make-structure)
Note: See TracChangeset
for help on using the changeset viewer.