Ignore:
Timestamp:
Aug 4, 2008, 3:33:13 AM (11 years ago)
Author:
gb
Message:

Early changes to support "istruct cells", which can speed up type/class
operations on istructs.

Some of this is hard to bootstrap, and bootstrapping may involve slowing
things down (e.g., not inlining things) while representations change.

Binaries coming soon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-pred.lisp

    r10247 r10282  
    10101010(defun istruct-typep (thing type)
    10111011  (if (= (the fixnum (typecode thing)) target::subtag-istruct)
     1012    (let* ((cell (%svref thing 0)))
     1013      (eq (if (atom cell) cell (car cell))
     1014          (if (atom type) type (car type))))
     1015    #+istruct-bootstrap
    10121016    (eq (%svref thing 0) type)))
     1017
     1018(defun istruct-type-name (thing)
     1019  (if (= (the fixnum (typecode thing)) target::subtag-istruct)
     1020    (istruct-cell-name (%svref thing 0))))
     1021
     1022
     1023;;; This is actually set to an alist in the xloader.
     1024(defparameter *istruct-cells* nil)
     1025
     1026;;; This should only ever push anything on the list in the cold
     1027;;; load (e.g., when running single-threaded.)
     1028(defun register-istruct-cell (name)
     1029  (or (assq name *istruct-cells*)
     1030      (let* ((pair (cons name nil)))
     1031        (push pair *istruct-cells*)
     1032        pair)))
     1033
     1034(defun set-istruct-cell-info (cell info)
     1035  (etypecase cell
     1036    (cons (%rplacd cell info)))
     1037  info)
     1038
    10131039
    10141040(defun symbolp (thing)
Note: See TracChangeset for help on using the changeset viewer.