Changeset 9437


Ignore:
Timestamp:
May 9, 2008, 10:22:53 AM (11 years ago)
Author:
gb
Message:

Support PACKAGE-REFs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711-perf/ccl/level-0/nfasload.lisp

    r8867 r9437  
    2222
    2323
    24 
    2524(defconstant $primsizes (make-array 23
    2625                                    :element-type '(unsigned-byte 16)
     
    4241  (assert (= 80 numfaslops)))
    4342
     43
     44
     45
     46(setq *package-refs* (make-hash-table))
     47
    4448(defvar *fasl-dispatch-table* #80(%bad-fasl))
     49
     50
     51
     52
    4553
    4654(defun %bad-fasl (s)
     
    240248        (%epushval s symbol)))))
    241249
     250(defvar *package-refs*)
     251(setq *package-refs* (make-hash-table :test #'equal))
     252
     253(defun register-package-ref (name)
     254  (or (gethash name *package-refs*)
     255      (setf (gethash name *package-refs*) (make-package-ref name))))
     256
     257(dolist (p %all-packages%)
     258  (dolist (name (pkg.names p))
     259    (setf (package-ref.pkg (register-package-ref name)) p)))
     260
     261
    242262(defun find-package (name)
    243263  (if (packagep name)
    244264    name
    245265    (%find-pkg (string name))))
     266
     267(defun %pkg-ref-find-package (ref)
     268  (package-ref.pkg ref))
    246269
    247270(defun set-package (name &aux (pkg (find-package name)))
     
    293316  (multiple-value-bind (str len new-p) (%fasl-nvreadstr s)
    294317    (let* ((p (%find-pkg str len)))
    295       (%epushval s (or p (%kernel-restart $XNOPKG (if new-p str (%fasl-copystr str len))))))))
     318      (%epushval s (or p  (%kernel-restart $XNOPKG (if new-p str (%fasl-copystr str len))))))))
    296319
    297320(defun %fasl-vlistX (s dotp)
Note: See TracChangeset for help on using the changeset viewer.