Changeset 11782
- Timestamp:
- 04/25/09 05:56:46 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r11781 r11782 2066 2066 (setf (gethash symbol ht) g)))) 2067 2067 2068 (defknown declare-function (symbol ) string)2069 (defun declare-function (symbol )2068 (defknown declare-function (symbol &optional setf) string) 2069 (defun declare-function (symbol &optional setf) 2070 2070 (declare (type symbol symbol)) 2071 2071 (declare-with-hashtable 2072 2072 symbol *declared-functions* ht f 2073 (setf f (symbol-name ( gensym "FUN")))2073 (setf f (symbol-name (if setf (gensym "SETF") (gensym "FUN")))) 2074 2074 (let ((s (sanitize symbol))) 2075 2075 (when s … … 2081 2081 (let ((*code* *static-code*)) 2082 2082 (emit 'getstatic class name +lisp-symbol+) 2083 (emit-invokevirtual +lisp-symbol-class+ "getSymbolFunctionOrDie" 2083 (emit-invokevirtual +lisp-symbol-class+ 2084 (if setf 2085 "getSymbolSetfFunctionOrDie" 2086 "getSymbolFunctionOrDie") 2084 2087 nil +lisp-object+) 2085 2088 (emit 'putstatic *this-class* f +lisp-object+) … … 2089 2092 (defknown declare-setf-function (name) string) 2090 2093 (defun declare-setf-function (name) 2091 (declare-with-hashtable 2092 name *declared-functions* ht f 2093 (let ((symbol (cadr name))) 2094 (declare (type symbol symbol)) 2095 (setf f (symbol-name (gensym))) 2096 (let ((s (sanitize symbol))) 2097 (when s 2098 (setf f (concatenate 'string f "_SETF_" s)))) 2099 (multiple-value-bind 2100 (name class) 2101 (lookup-or-declare-symbol symbol) 2102 (let ((*code* *static-code*)) 2103 (emit 'getstatic class name +lisp-symbol+) 2104 (declare-field f +lisp-object+) 2105 (emit-invokevirtual +lisp-symbol-class+ "getSymbolSetfFunctionOrDie" 2106 nil +lisp-object+) 2107 (emit 'putstatic *this-class* f +lisp-object+) 2108 (setf *static-code* *code*) 2109 (setf (gethash name ht) f)))))) 2094 (declare-function (cadr name) t)) 2110 2095 2111 2096
Note: See TracChangeset
for help on using the changeset viewer.