Changeset 11935
- Timestamp:
- 05/23/09 17:15:36 (15 years ago)
- Location:
- branches/fewer-executes/abcl/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/fewer-executes/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r11886 r11935 2784 2784 in order to call the relevant `execute' form. The function call 2785 2785 itself is *not* compiled by this function." 2786 (when args 2787 (let ((numargs (length args))) 2788 (let ((must-clear-values nil)) 2789 (declare (type boolean must-clear-values)) 2790 (cond ((<= numargs call-registers-limit) 2791 (dolist (arg args) 2792 (compile-form arg 'stack nil) 2793 (unless must-clear-values 2794 (unless (single-valued-p arg) 2795 (setf must-clear-values t))))) 2796 (t 2797 (emit-push-constant-int numargs) 2798 (emit 'anewarray +lisp-object-class+) 2799 (let ((i 0)) 2800 (dolist (arg args) 2801 (emit 'dup) 2802 (emit-push-constant-int i) 2803 (compile-form arg 'stack nil) 2804 (emit 'aastore) ; store value in array 2805 (unless must-clear-values 2806 (unless (single-valued-p arg) 2807 (setf must-clear-values t))) 2808 (incf i))))) 2809 (when must-clear-values 2810 (emit-clear-values))))) 2786 (let ((numargs (length args))) 2787 (let ((must-clear-values nil)) 2788 (declare (type boolean must-clear-values)) 2789 (emit-push-constant-int numargs) 2790 (emit 'anewarray +lisp-object-class+) 2791 (let ((i 0)) 2792 (dolist (arg args) 2793 (emit 'dup) 2794 (emit-push-constant-int i) 2795 (compile-form arg 'stack nil) 2796 (emit 'aastore) ; store value in array 2797 (unless must-clear-values 2798 (unless (single-valued-p arg) 2799 (setf must-clear-values t))) 2800 (incf i))) 2801 (when must-clear-values 2802 (emit-clear-values)))) 2811 2803 t) 2812 2804 … … 2825 2817 (declaim (ftype (function (t) t) emit-call-execute)) 2826 2818 (defun emit-call-execute (numargs) 2827 (let ((arg-types (if (<= numargs call-registers-limit) 2828 (lisp-object-arg-types numargs) 2829 (list +lisp-object-array+))) 2819 (declare (ignore numargs)) 2820 (let ((arg-types (list +lisp-object-array+)) 2830 2821 (return-type +lisp-object+)) 2831 2822 (emit-invokevirtual +lisp-object-class+ "execute" arg-types return-type))) … … 2833 2824 (declaim (ftype (function (t) t) emit-call-thread-execute)) 2834 2825 (defun emit-call-thread-execute (numargs) 2835 (let ((arg-types (if (<= numargs call-registers-limit) 2836 (lisp-object-arg-types (1+ numargs)) 2837 (list +lisp-object+ +lisp-object-array+))) 2826 (declare (ignore numargs)) 2827 (let ((arg-types (list +lisp-object+ +lisp-object-array+)) 2838 2828 (return-type +lisp-object+)) 2839 2829 (emit-invokevirtual +lisp-thread-class+ "execute" arg-types return-type))) … … 2893 2883 is registered (or not)." 2894 2884 (let ((numargs (length args))) 2895 (cond (( > *speed* *debug*)2885 (cond ((and (> *speed* *debug*) (not *require-stack-frame*)) 2896 2886 (process-args args) 2897 2887 (emit-call-execute numargs)) … … 3840 3830 (emit-invokestatic +lisp-class+ "coerceToFunction" 3841 3831 (lisp-object-arg-types 1) +lisp-object+) 3842 (emit-invokevirtual +lisp-object-class+ "execute" nil+lisp-object+))3832 (emit-invokevirtual +lisp-object-class+ "execute" (list +lisp-object-array+) +lisp-object+)) 3843 3833 (3 3844 3834 (let* ((*register* *register*) … … 7867 7857 (get-descriptor (list +lisp-object-array+) +lisp-object+))) 7868 7858 (return-from analyze-args 7869 (cond ((<= arg-count call-registers-limit) 7870 (get-descriptor (lisp-object-arg-types arg-count) +lisp-object+)) 7871 (t (setf *using-arg-array* t) 7859 (cond (t (setf *using-arg-array* t) 7872 7860 (setf (compiland-arity compiland) arg-count) 7873 7861 (get-descriptor (list +lisp-object-array+) +lisp-object+))))) … … 7879 7867 (return-from analyze-args 7880 7868 (get-descriptor (list +lisp-object-array+) +lisp-object+))) 7881 (cond ((<= arg-count call-registers-limit) 7882 (get-descriptor (lisp-object-arg-types (length args)) 7883 +lisp-object+)) 7884 (t 7885 (setf *using-arg-array* t) 7886 (setf (compiland-arity compiland) arg-count) 7887 (get-descriptor (list +lisp-object-array+) +lisp-object+))))) 7869 (setf *using-arg-array* t) 7870 (setf (compiland-arity compiland) arg-count) 7871 (get-descriptor (list +lisp-object-array+) +lisp-object+))) 7888 7872 7889 7873 (defun write-class-file (class-file) … … 7998 7982 (find compiland *closure-variables* :key #'variable-compiland)) 7999 7983 (body (cddr p1-result)) 8000 (*using-arg-array* nil)7984 (*using-arg-array* t) 8001 7985 (*hairy-arglist-p* nil) 8002 7986 ;; *hairy-arglist-p* != NIL --> *using-arglist-array* != NIL -
branches/fewer-executes/abcl/src/org/armedbear/lisp/jvm.lisp
r11880 r11935 342 342 (return local-function)))) 343 343 344 (defvar *using-arg-array* nil)344 (defvar *using-arg-array* t) 345 345 (defvar *hairy-arglist-p* nil) 346 346
Note: See TracChangeset
for help on using the changeset viewer.