[armedbear-cvs] r11632 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Thu Feb 5 21:47:35 UTC 2009


Author: ehuelsmann
Date: Thu Feb  5 21:47:34 2009
New Revision: 11632

Log:
Make our (static) fields FINAL, as we only write to them once: during object construction.

Found by: dmiles.

Modified:
   trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	Thu Feb  5 21:47:34 2009
@@ -2023,7 +2023,8 @@
 (defknown declare-field (t t) t)
 (defun declare-field (name descriptor)
   (let ((field (make-field name descriptor)))
-    (setf (field-access-flags field) (logior #x8 #x2)) ; private static
+    ;; final private static
+    (setf (field-access-flags field) (logior #x10 #x8 #x2))
     (setf (field-name-index field) (pool-name (field-name field)))
     (setf (field-descriptor-index field) (pool-name (field-descriptor field)))
     (push field *fields*)))




More information about the armedbear-cvs mailing list