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

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) { ====================================================================

On 8/10/13 7:11 AM, Dmitry Nadezhin wrote:
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 ?
Indeed the "unavailable argument" abstraction should be a singleton. Committed in [14572][] (with an unfortunate, inadvertent, superfluous change of Netbeans build artifacts). [14572]: http://lisp.not.org/trac/armedbear/changeset/14572 Thanks for the profiling! -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now."
participants (2)
-
Dmitry Nadezhin
-
Mark Evenson