Changeset 12131


Ignore:
Timestamp:
May 26, 2009, 6:47:21 PM (10 years ago)
Author:
gb
Message:

Allow any type specifier to be used as a declaration identifier.
(I'm not sure if PROCLAIM/DECLAIM/DECLARE are all consistent about
whether the check for a valid type specifier happens before or
after the declaration is passed to the TYPE handler.)

Location:
trunk/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/nx0.lisp

    r12071 r12131  
    370370          (funcall f pending spec env))
    371371        ; Any type name is now (ANSI CL) a valid declaration.
    372         (if (symbolp s)
    373           (nx-process-type-decl pending spec s (%cdr spec) env)
    374           (nx-bad-decls spec))))))
     372        (nx-process-type-decl pending spec s (%cdr spec) env)))))
    375373
    376374; Put all variable decls for the symbol VAR into effect in environment ENV.  Now.
  • trunk/source/level-1/l1-utils.lisp

    r12069 r12131  
    519519
    520520;; Redefined in sysutils.
    521 (%fhave 'type-specifier-p
    522         (qlfun bootstrapping-type-specifier-p (name)
     521(%fhave 'specifier-type-if-known
     522        (qlfun bootstrapping-type-specifier-p (name &optional env &key &allow-other-keys)
     523          (declare (ignore env))
    523524          (memq name *cl-types*)))
     525
     526
    524527
    525528(defun proclaim (spec)
     
    538541    (t (unless (memq (%car spec) *nx-known-declarations*)
    539542         ;; Any type name is now (ANSI CL) a valid declaration.  Any symbol could become a type.
    540          (if (symbolp (%car spec))
     543         (if (specifier-type-if-known (%car spec))
    541544           (apply #'proclaim-type spec)
    542545           (warn "Unknown declaration specifier(s) in ~S" spec))))))
  • trunk/source/lib/nfcomp.lisp

    r12069 r12131  
    837837         (unless (memq sym *nx-known-declarations*)
    838838           ;; Any type name is now (ANSI CL) a valid declaration.
    839            (if (symbolp sym)
     839           (if (specifier-type-if-known sym env :whine t)
    840840             (fcomp-proclaim-type sym spec env)
    841841             (nx-bad-decls `(,sym ,@spec)))))))))
Note: See TracChangeset for help on using the changeset viewer.