Changeset 12705
- Timestamp:
- 05/18/10 22:30:53 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r12704 r12705 2374 2374 g)) 2375 2375 2376 (defknown declare-instance (t) t)2377 (defun declare-instance (obj)2378 (aver (not (null *file-compilation*)))2379 (aver (or (structure-object-p obj) (standard-object-p obj)2380 (java:java-object-p obj)))2381 (let ((g (symbol-name (gensym "INSTANCE")))2382 saved-code)2383 (let* ((s (with-output-to-string (stream) (dump-form obj stream)))2384 (*code* (if *declare-inline* *code* *static-code*)))2385 ;; The readObjectFromString call may require evaluation of2386 ;; lisp code in the string (think #.() syntax), of which the outcome2387 ;; may depend on something which was declared inline2388 (declare-field g +lisp-object+ +field-access-private+)2389 (emit 'ldc (pool-string s))2390 (emit-invokestatic +lisp-class+ "readObjectFromString"2391 (list +java-string+) +lisp-object+)2392 (emit-invokestatic +lisp-class+ "loadTimeValue"2393 (lisp-object-arg-types 1) +lisp-object+)2394 (emit 'putstatic *this-class* g +lisp-object+)2395 (if *declare-inline*2396 (setf saved-code *code*)2397 (setf *static-code* *code*)))2398 (when *declare-inline*2399 (setf *code* saved-code))2400 g))2401 2402 2376 (declaim (ftype (function (t &optional t) string) declare-object)) 2403 2377 (defun declare-object (obj &optional (obj-ref +lisp-object+) … … 2524 2498 (standard-object-p form) 2525 2499 (java:java-object-p form)) 2526 (let ((g (if *file-compilation* 2527 (declare-instance form) 2528 (declare-object form)))) 2529 (emit 'getstatic *this-class* g +lisp-object+))) 2500 (emit-load-externalized-object form)) 2530 2501 (t 2531 2502 (if *file-compilation*
Note: See TracChangeset
for help on using the changeset viewer.