Ignore:
Timestamp:
05/02/10 19:58:56 (13 years ago)
Author:
ehuelsmann
Message:

Fix #79: Equally named -but different- uninterned symbols coalesced into
one in FASLs.

This commit removes the *FASL-ANONYMOUS-PACKAGE*: it's replaced by
*FASL-UNINTERNED-SYMBOLS* and a dispatch macro function which resolves
symbols by index instead of by name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/compile-file.lisp

    r12626 r12650  
    7070(declaim (ftype (function (t) t) verify-load))
    7171(defun verify-load (classfile)
    72   (if (> *safety* 0) 
     72  (if (> *safety* 0)
    7373    (and classfile
    7474         (let ((*load-truename* *output-file-pathname*))
     
    7676            (load-compiled-function classfile))))
    7777    t))
    78    
     78
    7979(declaim (ftype (function (t) t) process-defconstant))
    8080(defun process-defconstant (form)
     
    515515             (namestring (namestring *compile-file-truename*))
    516516             (start (get-internal-real-time))
    517              elapsed)
     517             elapsed
     518             *fasl-uninterned-symbols*)
    518519        (when *compile-verbose*
    519520          (format t "; Compiling ~A ...~%" namestring))
     
    528529                  (jvm::*functions-defined-in-current-file* '())
    529530                  (*fbound-names* '())
    530                   (*fasl-anonymous-package* (%make-package))
    531531                  (*fasl-stream* out)
    532532                  *forms-for-output*)
     
    566566            (write "; -*- Mode: Lisp -*-" :escape nil :stream out)
    567567            (%stream-terpri out)
    568             (let ((*package* (find-package '#:cl))
    569                   (count-sym (gensym)))
     568            (let ((*package* (find-package '#:cl)))
    570569              (write (list 'init-fasl :version *fasl-version*)
    571570                     :stream out)
     
    574573                     :stream out)
    575574              (%stream-terpri out)
    576               (dump-form `(dotimes (,count-sym ,*class-number*)
    577                             (function-preload
    578                              (%format nil "~A-~D.cls"
    579                                       ,(substitute #\_ #\. (pathname-name output-file))
    580                                       (1+ ,count-sym)))) out)
     575              ;; Note: Beyond this point, you can't use DUMP-FORM,
     576              ;; because the list of uninterned symbols has been fixed now.
     577              (when *fasl-uninterned-symbols*
     578                (write (list 'setq '*fasl-uninterned-symbols*
     579                             (coerce (mapcar #'car
     580                                             (nreverse *fasl-uninterned-symbols*))
     581                                     'vector))
     582                       :stream out))
     583              (%stream-terpri out)
     584              ;; we work with a fixed variable name here to work around the
     585              ;; lack of availability of the circle reader in the fasl reader
     586              ;; but it's a toplevel form anyway
     587              (write `(dotimes (i ,*class-number*)
     588                        (function-preload
     589                         (%format nil "~A-~D.cls"
     590                                  ,(substitute #\_ #\. (pathname-name output-file))
     591                                  (1+ i))))
     592                     :stream out
     593                     :circle t)
    581594              (%stream-terpri out))
    582595
Note: See TracChangeset for help on using the changeset viewer.