Changeset 12154


Ignore:
Timestamp:
May 29, 2009, 12:38:48 AM (10 years ago)
Author:
gz
Message:

allow compound type specifiers as declarations identifiers. consistently do not allow unknown types as declaration identifers (i.e. report them as a bad declaration rather than unknown type)

Location:
branches/working-0711/ccl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/compiler/nx0.lisp

    r12073 r12154  
    372372    (dolist (spec (%cdr decl))
    373373      (if (memq (setq s (car spec)) *nx-known-declarations*)
    374         ;;  Hmm, NOTSPECIAL and FUNCTION are in *nx-known-declarations* but have no standard handler.
    375374        (if (setq f (getf *nx-standard-declaration-handlers* s))
    376375          (funcall f pending spec env))
    377376        ; Any type name is now (ANSI CL) a valid declaration.
    378         (if (symbolp s)
    379           (nx-process-type-decl pending spec s (%cdr spec) env)
    380           (nx-bad-decls spec))))))
     377        (if (specifier-type-if-known s env)
     378          (nx-process-type-decl pending spec s (%cdr spec) env)
     379          (nx-bad-decls spec))))))
    381380
    382381; Put all variable decls for the symbol VAR into effect in environment ENV.  Now.
  • branches/working-0711/ccl/level-1/l1-utils.lisp

    r12050 r12154  
    518518
    519519;; Redefined in sysutils.
    520 (%fhave 'type-specifier-p
    521         (qlfun bootstrapping-type-specifier-p (name)
     520(%fhave 'specifier-type-if-known
     521        (qlfun bootstrapping-type-specifier-p (name &optional env &key &allow-other-keys)
     522          (declare (ignore env))
    522523          (memq name *cl-types*)))
     524
     525
    523526
    524527(defun proclaim (spec)
     
    537540    (t (unless (memq (%car spec) *nx-known-declarations*)
    538541         ;; Any type name is now (ANSI CL) a valid declaration.  Any symbol could become a type.
    539          (if (symbolp (%car spec))
     542         (if (specifier-type-if-known (%car spec))
    540543           (apply #'proclaim-type spec)
    541544           (warn "Unknown declaration specifier(s) in ~S" spec))))))
  • branches/working-0711/ccl/lib/nfcomp.lisp

    r12050 r12154  
    901901         (unless (memq sym *nx-known-declarations*)
    902902           ;; Any type name is now (ANSI CL) a valid declaration.
    903            (if (symbolp sym)
     903           (if (specifier-type-if-known sym env)
    904904             (fcomp-proclaim-type sym spec env)
    905905             (nx-bad-decls `(,sym ,@spec)))))))))
Note: See TracChangeset for help on using the changeset viewer.