Changeset 11652
- Timestamp:
- 02/10/09 07:10:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r11651 r11652 2070 2070 (cond ((null (symbol-package symbol)) 2071 2071 (setf g (if *compile-file-truename* 2072 (declare-object-as-string symbol +lisp-symbol+) 2073 (declare-object symbol +lisp-symbol+)))) 2072 (declare-object-as-string symbol +lisp-symbol+ 2073 +lisp-symbol-class+) 2074 (declare-object symbol +lisp-symbol+ 2075 +lisp-symbol-class+)))) 2074 2076 (t 2075 2077 (let ((*code* *static-code*) … … 2268 2270 2269 2271 (defknown declare-object-as-string (t &optional t) string) 2270 (defun declare-object-as-string (obj &optional (obj-class +lisp-object+)) 2272 (defun declare-object-as-string (obj &optional (obj-ref +lisp-object+) 2273 obj-class) 2271 2274 (let* ((g (symbol-name (gensym "OBJSTR"))) 2272 2275 (s (with-output-to-string (stream) (dump-form obj stream))) 2273 2276 (*code* *static-code*)) 2274 (declare-field g obj- class)2277 (declare-field g obj-ref) 2275 2278 (emit 'ldc (pool-string s)) 2276 2279 (emit-invokestatic +lisp-class+ "readObjectFromString" 2277 2280 (list +java-string+) +lisp-object+) 2278 (when ( string/= obj-class +lisp-object+)2281 (when (and obj-class (string/= obj-class +lisp-object+)) 2279 2282 (emit 'checkcast obj-class)) 2280 (emit 'putstatic *this-class* g obj- class)2283 (emit 'putstatic *this-class* g obj-ref) 2281 2284 (setf *static-code* *code*) 2282 2285 g)) … … 2329 2332 2330 2333 (declaim (ftype (function (t &optional t) string) declare-object)) 2331 (defun declare-object (obj &optional (obj-class +lisp-object+)) 2334 (defun declare-object (obj &optional (obj-ref +lisp-object+) 2335 obj-class) 2332 2336 (let ((key (symbol-name (gensym "OBJ")))) 2333 2337 (remember key obj) … … 2336 2340 (let* ( 2337 2341 (*code* *static-code*)) 2338 (declare-field g2 obj- class)2342 (declare-field g2 obj-ref) 2339 2343 (emit 'getstatic *this-class* g1 +lisp-simple-string+) 2340 2344 (emit-invokestatic +lisp-class+ "recall" 2341 2345 (list +lisp-simple-string+) +lisp-object+) 2342 (when ( string/= obj-class +lisp-object+)2346 (when (and obj-class (string/= obj-class +lisp-object-class+)) 2343 2347 (emit 'checkcast obj-class)) 2344 (emit 'putstatic *this-class* g2 obj- class)2348 (emit 'putstatic *this-class* g2 obj-ref) 2345 2349 (setf *static-code* *code*) 2346 2350 g2))))
Note: See TracChangeset
for help on using the changeset viewer.