Changeset 10309


Ignore:
Timestamp:
Aug 4, 2008, 9:44:06 AM (11 years ago)
Author:
gb
Message:

Don't assume that (uvref istruct 0) is a symbol; try to use accessors
instead, and hope that I caught everything ...

Location:
trunk/source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/nx-basic.lisp

    r9879 r10309  
    152152                                  (push '(inline . notinline) decls)))))
    153153                  (values nil nil decls))))
    154           (if (eq (uvref contour 0) 'definition-environment)
     154          (if (istruct-typep contour 'definition-environment)
    155155            (if (assq name (defenv.functions contour))
    156156              (return (values :macro nil nil))
     
    186186                     (setq vartype :symbol-macro)))))
    187187             (return))
    188             ((eq (setq envtype (%svref env 0)) 'definition-environment)
     188            ((eq (setq envtype (istruct-type-name env)) 'definition-environment)
    189189             (cond ((assq var (defenv.constants env))
    190190                    (setq vartype :constant)
     
    235235(defun nx-declared-type (sym &optional (env *nx-lexical-environment*))
    236236  (loop
    237     (when (or (null env) (eq (uvref env 0) 'definition-environment)) (return))
     237    (when (or (null env) (istruct-typep env 'definition-environment)) (return))
    238238    (dolist (decl (lexenv.vdecls env))
    239239      (if (and (eq (car decl) sym)
  • trunk/source/level-0/l0-pred.lisp

    r10282 r10309  
    374374        (if (= x-type y-type)
    375375            (if (= x-type target::subtag-istruct)
    376                 (and (let* ((structname (%svref x 0)))
    377                        (and (eq structname (%svref y 0))
     376                (and (let* ((structname (istruct-cell-name (%svref x 0))))
     377                       (and (eq structname (istruct-cell-name (%svref y 0)))
    378378                            (or (eq structname 'pathname)
    379379                                (eq structname 'logical-pathname)))
  • trunk/source/level-1/l1-clos-boot.lisp

    r10299 r10309  
    22052205              #'(lambda (s) (%structure-class-of s))) ; need DEFSTRUCT
    22062206        (setf (%svref v target::subtag-istruct)
    2207               #'(lambda (i) (or (find-class (%svref i 0) nil) *istruct-class*)))
     2207              #'(lambda (i)
     2208                  (let* ((cell (%svref i 0))
     2209                         (wrapper (istruct-cell-info  cell)))
     2210                    (if wrapper
     2211                      (%wrapper-class wrapper)
     2212                      (or (find-class (istruct-cell-name cell) nil)
     2213                          *istruct-class*)))))
    22082214        (setf (%svref v target::subtag-basic-stream)
    22092215              #'(lambda (b) (basic-stream.class b)))
  • trunk/source/level-1/l1-typesys.lisp

    r9892 r10309  
    488488(defun ctype-p (x)
    489489  (and (eql (typecode x) target::subtag-istruct)
    490        (memq (%svref x 0)
     490       (memq (istruct-type-name x)
    491491             '#.(cons 'ctype
    492492                      (cons 'unknown-ctype                             
     
    13831383;;; be stack-allocated or might be EQUAL without being EQL.
    13841384(defun cacheable-ctype-p (ctype)
    1385   (case (%svref ctype 0)
     1385  (case (istruct-cell-name (%svref ctype 0))
    13861386    (member-ctype
    13871387     (dolist (m (member-ctype-members ctype) t)
     
    14031403                     (cacheable-ctype-p (key-info-type info)))
    14041404                 (values-ctype-keywords ctype))
    1405           (or (not (eq (%svref ctype 0) 'function-ctype))
     1405          (or (not (eq (istruct-cell-name (%svref ctype 0)) 'function-ctype))
    14061406              (let* ((result (function-ctype-returns ctype)))
    14071407                (or (null result)
     
    34133413
    34143414(defun args-ctype-p (x) (and (eql (typecode x) target::subtag-istruct)
    3415                              (member (%svref x 0)
     3415                             (member (istruct-type-name x)
    34163416                                     '(args-ctype values-ctype function-ctype))))
    34173417
  • trunk/source/level-1/sysutils.lisp

    r9917 r10309  
    235235       (t
    236236        (if (eql (typecode form) target::subtag-istruct)
    237           (%svref form 0)
     237          (istruct-type-name form)
    238238          (let* ((class (class-of form))
    239239                 (class-name (class-name class)))
  • trunk/source/lib/nfcomp.lisp

    r10300 r10309  
    10341034             (#.target::subtag-package (fasl-scan-ref exp))
    10351035             (#.target::subtag-istruct
    1036               (if (memq (uvref exp 0) *istruct-make-load-form-types*)
     1036              (if (memq (istruct-type-name exp) *istruct-make-load-form-types*)
    10371037                (progn
    10381038                  (if (hash-table-p exp)
Note: See TracChangeset for help on using the changeset viewer.