Changeset 14258 for trunk/source/level-1


Ignore:
Timestamp:
Sep 14, 2010, 11:57:16 PM (9 years ago)
Author:
gz
Message:

Defstruct changes: Get rid of *defstruct-share-accessor-functions*. Typecheck the structure object in copiers, accessors -- both the accessor functions and compiler transforms -- unless nx-inhibit-safety-checking is true. Try to be more consistent about when/how typecheck struct slot types. Generate setter as well as getter functions.

Added new macro, TYPECHECK, that, depending on the value of nx-inhibit-safety-checking, turns into either a declaration or a require-type with approppriately downgraded type.

I had to turn off the typechecking (with optimize declarations) in a handful of places because of a bootstrapping problem: there are some structure types in the ARCH package which are referenced before the package exists, causing bootstrap to fail.

Location:
trunk/source/level-1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/linux-files.lisp

    r14158 r14258  
    22832283           (arch (backend-target-arch *target-backend*)))
    22842284      (values (%inc-ptr pv (- (* 2 target::node-size) target::fulltag-misc))
    2285               (- (funcall (arch::target-array-data-size-function arch)
     2285              (- (funcall (locally
     2286                              ;; Don't really care about speed, but need to turn off typechecking for bootstrapping reasons
     2287                              (declare (optimize (speed 3) (safety 0)))
     2288                            (arch::target-array-data-size-function arch))
    22862289                          (ctype-subtype ctype)
    22872290                          (length v))
  • trunk/source/level-1/sysutils.lisp

    r13327 r14258  
    762762
    763763(defun type-keyword-code (type-keyword &optional target)
     764  ;; Don't really care about speed, but turn off typechecking for bootstrapping reasons
     765  (declare (optimize (speed 3) (safety 0)))
    764766  (let* ((backend (if target (find-backend target) *target-backend*))
    765767         (alist (arch::target-uvector-subtags (backend-target-arch backend)))
Note: See TracChangeset for help on using the changeset viewer.