Ignore:
Timestamp:
08/29/10 18:21:42 (11 years ago)
Author:
ehuelsmann
Message:

Eliminate SET-COMPILAND-AND-WRITE-CLASS, since it doesn't take care
of most of the other boiler plate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/generic-class-file/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r12904 r12905  
    37903790
    37913791(defun compile-and-write-to-stream (class-file compiland stream)
     3792  (setf (compiland-class-file compiland) class-file)
    37923793  (with-class-file class-file
    37933794    (let ((*current-compiland* compiland))
    37943795      (with-saved-compiler-policy
    3795     (p2-compiland compiland)
     3796        (p2-compiland compiland)
    37963797;;        (finalize-class-file (compiland-class-file compiland))
    3797   (finish-class (compiland-class-file compiland) stream)))))
    3798 
    3799 (defun set-compiland-and-write-class (class-file compiland stream)
    3800   (setf (compiland-class-file compiland) class-file)
    3801   (compile-and-write-to-stream class-file compiland stream))
    3802 
     3798        (finish-class (compiland-class-file compiland) stream)))))
    38033799
    38043800(defmacro with-temp-class-file (pathname class-file lambda-list &body body)
     
    38193815                                                    :lambda-list lambda-list)))
    38203816             (with-open-class-file (f class-file)
    3821                (set-compiland-and-write-class class-file compiland f))
     3817               (compile-and-write-to-stream class-file compiland f))
    38223818             (setf (local-function-class-file local-function) class-file)))
    38233819          (t
    38243820           (let ((class-file (make-abcl-class-file :lambda-list lambda-list)))
    38253821             (with-open-stream (stream (sys::%make-byte-array-output-stream))
    3826                (set-compiland-and-write-class class-file compiland stream)
     3822               (compile-and-write-to-stream class-file compiland stream)
    38273823               (setf (local-function-class-file local-function) class-file)
    38283824               (setf (local-function-function local-function)
     
    38533849                                                    :lambda-list lambda-list)))
    38543850             (with-open-class-file (f class-file)
    3855                (set-compiland-and-write-class class-file compiland f))
     3851               (compile-and-write-to-stream class-file compiland f))
    38563852             (setf (local-function-class-file local-function) class-file)
    38573853             (let ((g (declare-local-function local-function)))
     
    38613857           (let ((class-file (make-abcl-class-file :lambda-list lambda-list)))
    38623858             (with-open-stream (stream (sys::%make-byte-array-output-stream))
    3863                (set-compiland-and-write-class class-file compiland stream)
     3859               (compile-and-write-to-stream class-file compiland stream)
    38643860               (setf (local-function-class-file local-function) class-file)
    38653861               (let ((g (declare-object
     
    39113907    (aver (null (compiland-class-file compiland)))
    39123908    (cond (*file-compilation*
    3913            (setf (compiland-class-file compiland)
    3914                  (make-abcl-class-file :pathname (funcall *pathnames-generator*)
    3915                                        :lambda-list lambda-list))
    3916            (let ((class-file (compiland-class-file compiland)))
     3909           (let ((class-file (make-abcl-class-file
     3910                                :pathname (funcall *pathnames-generator*)
     3911                                :lambda-list lambda-list)))
    39173912       (with-open-class-file (f class-file)
    39183913         (compile-and-write-to-stream class-file compiland f))
     
    39223917                   +lisp-object+)))
    39233918          (t
    3924            (setf (compiland-class-file compiland)
    3925                  (make-abcl-class-file :lambda-list lambda-list))
    39263919           (with-open-stream (stream (sys::%make-byte-array-output-stream))
    3927              (compile-and-write-to-stream (compiland-class-file compiland)
     3920             (compile-and-write-to-stream (make-abcl-class-file :lambda-list
     3921                                                                lambda-list)
    39283922                                          compiland stream)
    39293923             (emit-load-externalized-object (load-compiled-function
Note: See TracChangeset for help on using the changeset viewer.