[armedbear-devel] Why field LispStatckFrame.UNAVAILABLE_ARG is not static ?

Dmitry Nadezhin dmitry.nadezhin at oracle.com
Sat Aug 10 05:11:06 UTC 2013


Memory profiling of ABCL shows that the classes with largest allocation count are
LispStackFrame and LispStackFrame.UnavailableArgument .
It seems to me that LispStatckFrame.UNAVAILABLE_ARG can be a singleton object, can't it ?

===================================================================
--- LispStackFrame.java	(revision 14571)
+++ LispStackFrame.java	(working copy)
@@ -44,7 +44,7 @@
   private final LispObject third;
   private final LispObject[] args;
 
-  private final class UnavailableArgument extends LispObject 
+  private static final class UnavailableArgument extends LispObject 
   {
     public UnavailableArgument () { }
     @Override
@@ -53,7 +53,7 @@
     }
   }
 
-  private final LispObject UNAVAILABLE_ARG = new UnavailableArgument();
+  private static final LispObject UNAVAILABLE_ARG = new UnavailableArgument();
 
   public LispStackFrame(LispObject operator)
   {
====================================================================



More information about the armedbear-devel mailing list