Changeset 9526


Ignore:
Timestamp:
May 16, 2008, 2:15:40 AM (11 years ago)
Author:
gb
Message:

Bump the fasl version.

Bring the list of istruct types that have MAKE-LOAD-FORM methods
defined on them up to date.

When we scan lists, try to recognize lists that're used as
"istruct cells". (Having a separate typecode for istruct cells
would obviate the need for this, but it's probably not a huge
performance hit.) When we dump lists, dump istruct cells with
a new fasl operator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711-perf/ccl/lib/nfcomp.lisp

    r9434 r9526  
    10241024;These should be constants, but it's too much trouble when need to change 'em.
    10251025(defparameter FASL-FILE-ID #xFF00)  ;Overall file format, shouldn't change much
    1026 (defparameter FASL-VERSION #xFF51)  ;Fasl block format.
     1026(defparameter FASL-VERSION #xFF53)  ;Fasl block format.
    10271027
    10281028(defvar *fasdump-hash*)
     
    11281128             (#.target::subtag-package (fasl-scan-ref exp))
    11291129             (#.target::subtag-istruct
    1130               (if (memq (uvref exp 0) *istruct-make-load-form-types*)
     1130              (if (memq (istruct-type-name exp) *istruct-make-load-form-types*)
    11311131                (progn
    11321132                  (if (hash-table-p exp)
     
    11501150    ctype unknown-ctype class-ctype foreign-ctype union-ctype member-ctype
    11511151    array-ctype numeric-ctype hairy-ctype named-ctype constant-ctype args-ctype
    1152     hash-table))
     1152    hash-table package-ref type-cell class-cell slot-id))
    11531153
    11541154
     
    11791179       (null (%cddr form))))
    11801180
     1181;;; We currently represent istruct-cells as conses.  That's not
     1182;;; incredibly efficient (among other things, we have to do this
     1183;;; check when scanning/dumping any list, but it's probably not
     1184;;; worth burning a tag on them.  There are currently about 50
     1185;;; entries on the *istruct-cells* list.
     1186(defun istruct-cell-p (x)
     1187  (and (consp x)
     1188       (typep (%car x) 'symbol)
     1189       (atom (%cdr x))
     1190       (not (null (memq x *istruct-cells*)))))
     1191
    11811192(defun fasl-scan-list (list)
    11821193  (cond ((eq (%car list) cfasl-load-time-eval-sym)
     
    11851196                             (%cadr form)
    11861197                             form))))
     1198        ((istruct-cell-p list)
     1199         (fasl-scan-form (%car list)))
    11871200        (t (when list
    11881201             (fasl-scan-ref list)
     
    16451658               (fasl-out-byte opcode)
    16461659               (fasl-dump-form form)))))
     1660        ((istruct-cell-p list)
     1661         (fasl-out-opcode $fasl-istruct-cell (car list))
     1662         (fasl-dump-symbol (car list)))
    16471663        (t (fasl-dump-cons list))))
    16481664
Note: See TracChangeset for help on using the changeset viewer.