Changeset 14157
- Timestamp:
- 09/29/12 21:17:04 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/clos.lisp
r14156 r14157 1945 1945 (auxs ()) 1946 1946 (allow-other-keys nil) 1947 (state : parsing-required))1947 (state :required)) 1948 1948 (dolist (arg lambda-list) 1949 1949 (if (member arg lambda-list-keywords) 1950 1950 (ecase arg 1951 1951 (&optional 1952 (setq state :parsing-optional)) 1952 (unless (eq state :required) 1953 (error 'program-error 1954 :format-control "~A followed by &OPTIONAL not allowed ~ 1955 in lambda list ~S" 1956 :format-arguments (list state lambda-list))) 1957 (setq state '&optional)) 1953 1958 (&rest 1954 (setq state :parsing-rest)) 1959 (unless (or (eq state :required) 1960 (eq state '&optional)) 1961 (error 'program-error 1962 :format-control "~A followed by &REST not allowed ~ 1963 in lambda list ~S" 1964 :format-arguments (list state lambda-list))) 1965 (setq state '&rest)) 1955 1966 (&key 1967 (unless (or (eq state :required) 1968 (eq state '&optional) 1969 (eq state '&rest)) 1970 (error 'program-error 1971 :format-control "~A followed by &KEY not allowed 1972 in lambda list ~S" 1973 :format-arguments (list state lambda-list))) 1956 1974 (setq keysp t) 1957 (setq state :parsing-key))1975 (setq state '&key)) 1958 1976 (&allow-other-keys 1977 (unless (eq state '&key) 1978 (error 'program-error 1979 :format-control "&ALLOW-OTHER-KEYS not allowed while 1980 parsing ~A in lambda list ~S" 1981 :format-arguments (list state lambda-list))) 1959 1982 (setq allow-other-keys 't)) 1960 1983 (&aux 1984 ;; &aux comes last; any other previous state is fine 1961 1985 (setq state :parsing-aux))) 1962 1986 (case state 1963 (: parsing-required1987 (:required 1964 1988 (push-on-end arg required-args) 1965 1989 (if (listp arg) … … 1968 1992 (progn (push-on-end arg required-names) 1969 1993 (push-on-end 't specializers)))) 1970 ( :parsing-optional (push-on-end arg optionals))1971 ( :parsing-rest (setq rest-var arg))1972 ( :parsing-key1994 (&optional (push-on-end arg optionals)) 1995 (&rest (setq rest-var arg)) 1996 (&key 1973 1997 (push-on-end (get-keyword-from-arg arg) keys) 1974 1998 (push-on-end arg key-args)) 1975 ( :parsing-aux (push-on-end arg auxs)))))1999 (&aux (push-on-end arg auxs))))) 1976 2000 (list :required-names required-names 1977 2001 :required-args required-args … … 3144 3168 3145 3169 (defmethod ensure-class-using-class ((class class) name 3170 &rest all-keys 3146 3171 &key (metaclass +the-standard-class+ metaclassp) 3147 direct-superclasses &rest all-keys3172 direct-superclasses 3148 3173 &allow-other-keys) 3149 3174 (declare (ignore name)) … … 3871 3896 3872 3897 (defmethod reinitialize-instance :before ((class standard-class) 3873 & key direct-superclasses3874 & rest all-keys)3898 &rest all-keys 3899 &key direct-superclasses) 3875 3900 (check-initargs (list #'allocate-instance 3876 3901 #'initialize-instance) … … 3886 3911 3887 3912 (defmethod reinitialize-instance :before ((class funcallable-standard-class) 3888 & key direct-superclasses3889 & rest all-keys)3913 &rest all-keys 3914 &key direct-superclasses) 3890 3915 (check-initargs (list #'allocate-instance 3891 3916 #'initialize-instance)
Note: See TracChangeset
for help on using the changeset viewer.