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

Erik Huelsmann ehuelsmann at common-lisp.net
Sun Sep 27 13:41:57 UTC 2009


Author: ehuelsmann
Date: Sun Sep 27 09:41:54 2009
New Revision: 12163

Log:
Make code self-explanatory: add constants for inline numeric values.

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	Sun Sep 27 09:41:54 2009
@@ -1904,16 +1904,19 @@
   (write-u2 (field-descriptor-index field) stream)
   (write-u2 0 stream)) ; attributes count
 
-(defconst +field-access-protected+ #x4) ;; subclass accessible
-(defconst +field-access-private+   #x2) ;; class-only accessible
-(defconst +field-access-public+    #x1) ;; generally accessible
-(defconst +field-access-default+   #x0) ;; package accessible, used for LABELS
+(defconst +field-flag-final+       #x10) ;; final field
+(defconst +field-flag-static+      #x08) ;; static field
+(defconst +field-access-protected+ #x04) ;; subclass accessible
+(defconst +field-access-private+   #x02) ;; class-only accessible
+(defconst +field-access-public+    #x01) ;; generally accessible
+(defconst +field-access-default+   #x00) ;; package accessible, used for LABELS
 
 (defknown declare-field (t t t) t)
 (defun declare-field (name descriptor access-flags)
   (let ((field (make-field name descriptor)))
     ;; final static <access-flags>
-    (setf (field-access-flags field) (logior #x10 #x8 access-flags))
+    (setf (field-access-flags field)
+          (logior +field-flag-final+ +field-flag-static+ access-flags))
     (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