Remove 'private' keyword to eliminate the Java requirement

  for the compiler to generate synthetic accessors: functions that
  don't appear in the source but do appear in the class file.

Patch by: Douglas Miles <dmiles _at_ users.sf.net>
parent f03306ba
......@@ -100,7 +100,7 @@ public class ArithmeticError extends LispError
return super.typep(type);
}
private final LispObject getOperation()
final LispObject getOperation()
{
return getInstanceSlotValue(Symbol.OPERATION);
}
......@@ -111,7 +111,7 @@ public class ArithmeticError extends LispError
setInstanceSlotValue(Symbol.OPERATION, operation);
}
private final LispObject getOperands()
final LispObject getOperands()
{
return getInstanceSlotValue(Symbol.OPERANDS);
}
......
......@@ -47,7 +47,7 @@ public final class AutoloadMacro extends Autoload
super(symbol, fileName, null);
}
private static void installAutoloadMacro(Symbol symbol, String fileName)
static void installAutoloadMacro(Symbol symbol, String fileName)
{
AutoloadMacro am = new AutoloadMacro(symbol, fileName);
......
......@@ -46,7 +46,7 @@ public class AutoloadedFunctionProxy extends Function {
/** List of symbols that need to be saved upon instantiation of a
* proxy and restored while loading the actual function.
*/
final static private Symbol[] symsToSave =
final static Symbol[] symsToSave =
new Symbol[]
{
AUTOLOADING_CACHE, // allow loading local preloaded functions
......
......@@ -37,9 +37,9 @@ import static org.armedbear.lisp.Lisp.*;
public final class BroadcastStream extends Stream
{
private final Stream[] streams;
final Stream[] streams;
private BroadcastStream(Stream[] streams)
BroadcastStream(Stream[] streams)
{
super(Symbol.BROADCAST_STREAM);
this.streams = streams;
......
......@@ -44,7 +44,7 @@ public final class ByteArrayOutputStream extends Stream
this(UNSIGNED_BYTE_8); //Declared in Stream.java
}
private ByteArrayOutputStream(LispObject elementType)
ByteArrayOutputStream(LispObject elementType)
{
super(Symbol.SYSTEM_STREAM);
this.elementType = elementType;
......
......@@ -1026,12 +1026,12 @@ public class Closure extends Function
public static class Parameter
{
private final Symbol var;
private final LispObject initForm;
private final LispObject initVal;
private final LispObject svar;
final Symbol var;
final LispObject initForm;
final LispObject initVal;
final LispObject svar;
private final int type;
private final Symbol keyword;
final Symbol keyword;
public Parameter(Symbol var)
{
......
......@@ -37,9 +37,9 @@ import static org.armedbear.lisp.Lisp.*;
public final class ConcatenatedStream extends Stream
{
private LispObject streams;
LispObject streams;
private ConcatenatedStream(LispObject streams)
ConcatenatedStream(LispObject streams)
{
super(Symbol.CONCATENATED_STREAM);
this.streams = streams;
......
......@@ -66,7 +66,7 @@ public final class Do {
}
};
private static final LispObject _do(LispObject args, Environment env,
static final LispObject _do(LispObject args, Environment env,
boolean sequential)
{
......
......@@ -37,8 +37,8 @@ import static org.armedbear.lisp.Lisp.*;
public final class Environment extends LispObject
{
private Binding vars;
private FunctionBinding lastFunctionBinding;
Binding vars;
FunctionBinding lastFunctionBinding;
private Binding blocks;
private Binding tags;
public boolean inactive; //default value: false == active
......
......@@ -37,9 +37,9 @@ import static org.armedbear.lisp.Lisp.*;
public final class FillPointerOutputStream extends Stream
{
private ComplexString string;
ComplexString string;
private FillPointerOutputStream(ComplexString string)
FillPointerOutputStream(ComplexString string)
{
super(Symbol.SYSTEM_STREAM);
elementType = Symbol.CHARACTER;
......@@ -69,7 +69,7 @@ public final class FillPointerOutputStream extends Stream
}
};
private class Writer extends java.io.Writer
class Writer extends java.io.Writer
{
@Override
public void write(char cbuf[], int off, int len)
......
......@@ -198,8 +198,8 @@ public final class FloatFunctions
}
};
private static final Fixnum FIXNUM_24 = Fixnum.getInstance(24);
private static final Fixnum FIXNUM_53 = Fixnum.getInstance(53);
static final Fixnum FIXNUM_24 = Fixnum.getInstance(24);
static final Fixnum FIXNUM_53 = Fixnum.getInstance(53);
// ### float-digits
// float-digits float => float-digits
......
......@@ -37,13 +37,13 @@ import static org.armedbear.lisp.Lisp.*;
public final class HashTableFunctions
{
private static final LispObject FUNCTION_EQ =
static final LispObject FUNCTION_EQ =
Symbol.EQ.getSymbolFunction();
private static final LispObject FUNCTION_EQL =
static final LispObject FUNCTION_EQL =
Symbol.EQL.getSymbolFunction();
private static final LispObject FUNCTION_EQUAL =
static final LispObject FUNCTION_EQUAL =
Symbol.EQUAL.getSymbolFunction();
private static final LispObject FUNCTION_EQUALP =
static final LispObject FUNCTION_EQUALP =
Symbol.EQUALP.getSymbolFunction();
// ### %make-hash-table
......
......@@ -41,7 +41,7 @@ import java.util.WeakHashMap;
public final class JHandler
{
private static final Map<Object,Map<String,Entry>> table =
static final Map<Object,Map<String,Entry>> table =
new WeakHashMap<Object,Map<String,Entry>>();
public static void callLisp (String s, Object o)
......
......@@ -44,7 +44,7 @@ import java.util.WeakHashMap;
public final class JProxy
{
private static final Map<Object,Entry> table = new WeakHashMap<Object,Entry>();
static final Map<Object,Entry> table = new WeakHashMap<Object,Entry>();
// ### %jnew-proxy interface &rest method-names-and-defs
private static final Primitive _JNEW_PROXY =
......@@ -135,7 +135,7 @@ public final class JProxy
/**
* A weak map associating each proxy instance with a "Lisp-this" object.
*/
private static final Map<Object, LispObject> proxyMap = new WeakHashMap<Object, LispObject>();
static final Map<Object, LispObject> proxyMap = new WeakHashMap<Object, LispObject>();
public static class LispInvocationHandler implements InvocationHandler {
......@@ -238,7 +238,7 @@ public final class JProxy
}
};
private static LispObject toLispObject(Object obj) {
static LispObject toLispObject(Object obj) {
return (obj instanceof LispObject) ? (LispObject) obj : new JavaObject(obj);
}
......
......@@ -49,12 +49,12 @@ import java.util.*;
public final class Java
{
private static final Map<Class,Symbol> registeredExceptions =
static final Map<Class,Symbol> registeredExceptions =
new HashMap<Class,Symbol>();
private static final LispClass java_exception = LispClass.findClass(Symbol.JAVA_EXCEPTION);
private static boolean isJavaException(LispClass lc)
static boolean isJavaException(LispClass lc)
{
return lc.subclassp(java_exception);
}
......@@ -93,7 +93,7 @@ public final class Java
}
};
private static Symbol getCondition(Class cl)
static Symbol getCondition(Class cl)
{
Class o = classForName("java.lang.Object");
for (Class c = cl ; c != o ; c = c.getSuperclass()) {
......@@ -146,7 +146,7 @@ public final class Java
// derived from the instance.
//
private static final LispObject jfield(Primitive fun, LispObject[] args, boolean translate)
static final LispObject jfield(Primitive fun, LispObject[] args, boolean translate)
{
if (args.length < 2 || args.length > 4)
......@@ -347,7 +347,7 @@ public final class Java
}
};
private static final LispObject jstatic(Primitive fun, LispObject[] args, boolean translate)
static final LispObject jstatic(Primitive fun, LispObject[] args, boolean translate)
{
if (args.length < 2)
......@@ -511,7 +511,7 @@ public final class Java
}
};
private static final LispObject jarray_ref(Primitive fun, LispObject[] args, boolean translate)
static final LispObject jarray_ref(Primitive fun, LispObject[] args, boolean translate)
{
if (args.length < 2)
......@@ -623,7 +623,7 @@ public final class Java
}
};
private static LispObject jcall(Primitive fun, LispObject[] args, boolean translate)
static LispObject jcall(Primitive fun, LispObject[] args, boolean translate)
{
if (args.length < 2)
......@@ -764,7 +764,7 @@ public final class Java
return findMethod(methods, methodName, javaArgs);
}
private static Constructor findConstructor(Class<?> c, LispObject[] args) throws NoSuchMethodException {
static Constructor findConstructor(Class<?> c, LispObject[] args) throws NoSuchMethodException {
int argCount = args.length - 1;
Object[] javaArgs = translateMethodArguments(args, 1);
Constructor[] ctors = c.getConstructors();
......@@ -1015,7 +1015,7 @@ public final class Java
}
};
private static PropertyDescriptor getPropertyDescriptor(Object obj, LispObject propertyName) throws IntrospectionException {
static PropertyDescriptor getPropertyDescriptor(Object obj, LispObject propertyName) throws IntrospectionException {
String prop = ((AbstractString) propertyName).getStringValue();
BeanInfo beanInfo = Introspector.getBeanInfo(obj.getClass());
for(PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) {
......@@ -1028,7 +1028,7 @@ public final class Java
return null; // not reached
}
private static Class classForName(String className)
static Class classForName(String className)
{
try {
return Class.forName(className);
......@@ -1046,7 +1046,7 @@ public final class Java
}
// Supports Java primitive types too.
private static Class javaClass(LispObject obj)
static Class javaClass(LispObject obj)
{
if (obj instanceof AbstractString || obj instanceof Symbol) {
String s = javaString(obj);
......@@ -1092,7 +1092,7 @@ public final class Java
return null;
}
private static final String getMessage(Throwable t)
static final String getMessage(Throwable t)
{
String message = t.getMessage();
if (message == null || message.length() == 0)
......
......@@ -42,7 +42,7 @@ import java.math.BigInteger;
import java.util.*;
public final class JavaObject extends LispObject {
private final Object obj;
final Object obj;
private final Class<?> intendedClass;
public JavaObject(Object obj) {
......
......@@ -40,8 +40,8 @@ public class Layout extends LispObject
private final LispClass lispClass;
public final EqHashTable slotTable;
private final LispObject[] slotNames;
private final LispObject sharedSlots;
final LispObject[] slotNames;
final LispObject sharedSlots;
private boolean invalid;
......@@ -74,7 +74,7 @@ public class Layout extends LispObject
}
// Copy constructor.
private Layout(Layout oldLayout)
Layout(Layout oldLayout)
{
lispClass = oldLayout.getLispClass();
slotNames = oldLayout.slotNames;
......
......@@ -2028,7 +2028,7 @@ public final class Lisp
}
// The compiler's object table.
private static final Hashtable<String,LispObject> objectTable =
static final Hashtable<String,LispObject> objectTable =
new Hashtable<String,LispObject>();
public static final LispObject recall(String key)
......@@ -2620,7 +2620,7 @@ public final class Lisp
exportSpecial("*COMPILE-FILE-ENVIRONMENT*", PACKAGE_SYS, NIL);
public static final LispObject UNBOUND_VALUE = new unboundValue();
private static class unboundValue extends LispObject
static class unboundValue extends LispObject
{
@Override
public String writeToString()
......@@ -2630,7 +2630,7 @@ public final class Lisp
}
public static final LispObject NULL_VALUE = new nullValue();
private static class nullValue extends LispObject
static class nullValue extends LispObject
{
@Override
public String writeToString()
......
......@@ -129,7 +129,7 @@ public final class LispCharacter extends LispObject
return new SimpleString(value);
}
private boolean isStandardChar()
boolean isStandardChar()
{
if (value >= ' ' && value < 127)
return true;
......@@ -682,7 +682,7 @@ public final class LispCharacter extends LispObject
}
}
private static final char[] UPPER_CASE_CHARS = new char[128];
static final char[] UPPER_CASE_CHARS = new char[128];
static
{
......@@ -697,7 +697,7 @@ public final class LispCharacter extends LispObject
return Character.toLowerCase(c);
}
private static final char[] LOWER_CASE_CHARS = new char[128];
static final char[] LOWER_CASE_CHARS = new char[128];
static
{
......
......@@ -41,11 +41,11 @@ import java.util.concurrent.atomic.AtomicInteger;
public final class LispThread extends LispObject
{
private static boolean use_fast_calls = false;
static boolean use_fast_calls = false;
// use a concurrent hashmap: we may want to add threads
// while at the same time iterating the hash
final private static ConcurrentHashMap<Thread,LispThread> map =
final static ConcurrentHashMap<Thread,LispThread> map =
new ConcurrentHashMap<Thread,LispThread>();
private static ThreadLocal<LispThread> threads = new ThreadLocal<LispThread>(){
......@@ -66,20 +66,20 @@ public final class LispThread extends LispObject
return threads.get();
}
private final Thread javaThread;
final Thread javaThread;
private boolean destroyed;
private final LispObject name;
final LispObject name;
public LispObject[] _values;
private boolean threadInterrupted;
private LispObject pending = NIL;
private LispThread(Thread javaThread)
LispThread(Thread javaThread)
{
this.javaThread = javaThread;
name = new SimpleString(javaThread.getName());
}
private LispThread(final Function fun, LispObject name)
LispThread(final Function fun, LispObject name)
{
Runnable r = new Runnable() {
public void run()
......@@ -141,17 +141,17 @@ public final class LispThread extends LispObject
return destroyed;
}
private final synchronized boolean isInterrupted()
final synchronized boolean isInterrupted()
{
return threadInterrupted;
}
private final synchronized void setDestroyed(boolean b)
final synchronized void setDestroyed(boolean b)
{
destroyed = b;
}
private final synchronized void interrupt(LispObject function, LispObject args)
final synchronized void interrupt(LispObject function, LispObject args)
{
pending = new Cons(args, pending);
pending = new Cons(function, pending);
......@@ -159,7 +159,7 @@ public final class LispThread extends LispObject
javaThread.interrupt();
}
private final synchronized void processThreadInterrupts()
final synchronized void processThreadInterrupts()
{
while (pending != NIL) {
......
......@@ -324,7 +324,7 @@ public final class Load
// ### *fasl-version*
// internal symbol
private static final Symbol _FASL_VERSION_ =
static final Symbol _FASL_VERSION_ =
exportConstant("*FASL-VERSION*", PACKAGE_SYS, Fixnum.getInstance(35));
// ### *fasl-external-format*
......@@ -530,7 +530,7 @@ public final class Load
}
}
private static final LispObject faslLoadStream(LispThread thread)
static final LispObject faslLoadStream(LispThread thread)
{
Stream in = (Stream) _LOAD_STREAM_.symbolValue(thread);
final Environment env = new Environment();
......@@ -589,7 +589,7 @@ public final class Load
}
}
private static final LispObject load(LispObject filespec,
static final LispObject load(LispObject filespec,
LispObject verbose,
LispObject print,
LispObject ifDoesNotExist,
......
......@@ -47,7 +47,7 @@ public final class MathFunctions
}
};
private static LispObject sin(LispObject arg)
static LispObject sin(LispObject arg)
{
if (arg instanceof DoubleFloat)
return new DoubleFloat(Math.sin(((DoubleFloat)arg).value));
......@@ -74,7 +74,7 @@ public final class MathFunctions
}
};
private static LispObject cos(LispObject arg)
static LispObject cos(LispObject arg)
{
if (arg instanceof DoubleFloat)
return new DoubleFloat(Math.cos(((DoubleFloat)arg).value));
......@@ -114,7 +114,7 @@ public final class MathFunctions
}
};
private static LispObject asin(LispObject arg)
static LispObject asin(LispObject arg)
{
if (arg instanceof SingleFloat) {
float f = ((SingleFloat)arg).value;
......@@ -155,7 +155,7 @@ public final class MathFunctions
}
};
private static LispObject acos(LispObject arg)
static LispObject acos(LispObject arg)
{
if (arg instanceof DoubleFloat) {
double d = ((DoubleFloat)arg).value;
......@@ -225,7 +225,7 @@ public final class MathFunctions
}
};
private static LispObject atan(LispObject arg)
static LispObject atan(LispObject arg)
{
if (arg instanceof Complex) {
LispObject im = ((Complex)arg).imagpart;
......@@ -259,7 +259,7 @@ public final class MathFunctions
}
};
private static LispObject sinh(LispObject arg)
static LispObject sinh(LispObject arg)
{
if (arg instanceof Complex) {
LispObject im = ((Complex)arg).getImaginaryPart();
......@@ -297,7 +297,7 @@ public final class MathFunctions
}
};
private static LispObject cosh(LispObject arg)
static LispObject cosh(LispObject arg)
{
if (arg instanceof Complex) {
LispObject im = ((Complex)arg).getImaginaryPart();
......@@ -352,7 +352,7 @@ public final class MathFunctions
}
};
private static LispObject asinh(LispObject arg)
static LispObject asinh(LispObject arg)
{
if (arg instanceof Complex) {
LispObject im = ((Complex)arg).getImaginaryPart();
......@@ -385,7 +385,7 @@ public final class MathFunctions
}
};
private static LispObject acosh(LispObject arg)
static LispObject acosh(LispObject arg)
{
if (arg instanceof Complex) {
LispObject im = ((Complex)arg).getImaginaryPart();
......@@ -422,7 +422,7 @@ public final class MathFunctions
}
};
private static LispObject atanh(LispObject arg)
static LispObject atanh(LispObject arg)
{
if (arg instanceof Complex) {
LispObject im = ((Complex)arg).getImaginaryPart();
......@@ -454,7 +454,7 @@ public final class MathFunctions
}
};
private static LispObject cis(LispObject arg)
static LispObject cis(LispObject arg)
{
if (arg.realp())
return Complex.getInstance(cos(arg), sin(arg));
......@@ -471,7 +471,7 @@ public final class MathFunctions
}
};
private static LispObject exp(LispObject arg)
static LispObject exp(LispObject arg)
{
if (arg.realp()) {
if (arg instanceof DoubleFloat) {
......@@ -499,7 +499,7 @@ public final class MathFunctions
}
};
private static final LispObject sqrt(LispObject obj)
static final LispObject sqrt(LispObject obj)
{
if (obj instanceof DoubleFloat) {
if (obj.minusp())
......@@ -552,7 +552,7 @@ public final class MathFunctions
}
};
private static final LispObject log(LispObject obj)
static final LispObject log(LispObject obj)
{
if (obj.realp() && !obj.minusp()) {
// Result is real.
......@@ -706,7 +706,7 @@ public final class MathFunctions
* @param number
* @return number or signals an appropriate error
*/
private final static LispObject OverUnderFlowCheck(LispObject number)
final static LispObject OverUnderFlowCheck(LispObject number)
{
if (number instanceof Complex) {
......@@ -773,7 +773,7 @@ public final class MathFunctions
* @param base A value of any type
* @param power An integer (fixnum or bignum) value
*/
private static final LispObject intexp(LispObject base, LispObject power)
static final LispObject intexp(LispObject base, LispObject power)
{
if (power.isEqualTo(0))
......
......@@ -849,7 +849,7 @@ public class Pathname extends LispObject {
}
}
private static final void checkCaseArgument(LispObject arg) {
static final void checkCaseArgument(LispObject arg) {
if (arg != Keyword.COMMON && arg != Keyword.LOCAL) {
type_error(arg, list(Symbol.MEMBER, Keyword.COMMON,
Keyword.LOCAL));
......@@ -1029,7 +1029,7 @@ public class Pathname extends LispObject {
return new Pathname(namestring);
}
private static final Pathname _makePathname(LispObject[] args) {
static final Pathname _makePathname(LispObject[] args) {
if (args.length % 2 != 0) {
error(new ProgramError("Odd number of keyword arguments."));
}
......
......@@ -345,7 +345,7 @@ public final class Primitives {
};
// ### eql
private static final Primitive EQL = new pf_eql();
static final Primitive EQL = new pf_eql();
private static final class pf_eql extends Primitive {
pf_eql() {
super(Symbol.EQL, "x y");
......@@ -1718,7 +1718,7 @@ for (LispObject a : args)
private static final Symbol _SIMPLE_FORMAT_FUNCTION_ =
internSpecial("*SIMPLE-FORMAT-FUNCTION*", PACKAGE_SYS, _FORMAT);
private static void checkRedefinition(LispObject arg)
static void checkRedefinition(LispObject arg)
{
final LispThread thread = LispThread.currentThread();
......@@ -4312,7 +4312,7 @@ for (LispObject a : args)
}
};
private static final LispObject list_subseq(LispObject list, int start,
static final LispObject list_subseq(LispObject list, int start,
int end)
{
......@@ -4521,7 +4521,7 @@ for (LispObject a : args)
};
// ### list-delete-eq item list => result-list
private static final Primitive LIST_DELETE_EQ = new pf_list_delete_eq();
static final Primitive LIST_DELETE_EQ = new pf_list_delete_eq();
private static final class pf_list_delete_eq extends Primitive {
pf_list_delete_eq() {
super("list-delete-eq", PACKAGE_SYS, true, "item list");
......@@ -4565,7 +4565,7 @@ for (LispObject a : args)
};
// ### list-delete-eql item list => result-list
private static final Primitive LIST_DELETE_EQL = new pf_list_delete_eql();
static final Primitive LIST_DELETE_EQL = new pf_list_delete_eql();
private static final class pf_list_delete_eql extends Primitive {
pf_list_delete_eql() {
super("list-delete-eql", PACKAGE_SYS, true, "item list");
......
......@@ -37,7 +37,7 @@ import static org.armedbear.lisp.Lisp.*;
public class Profiler
{
private static int sleep = 1;
static int sleep = 1;
// ### %start-profiler
// %start-profiler type granularity
......
......@@ -135,7 +135,7 @@ public class Readtable extends LispObject
}
// FIXME synchronization
private static void copyReadtable(Readtable from, Readtable to)
static void copyReadtable(Readtable from, Readtable to)
{
Iterator<Character> charIterator = from.syntax.getCharIterator();
while (charIterator.hasNext()) {
......@@ -252,7 +252,7 @@ public class Readtable extends LispObject
return readerMacroFunctions.get(c);
}
private LispObject getMacroCharacter(char c)
LispObject getMacroCharacter(char c)
{
LispObject function = getReaderMacroFunction(c);
LispObject non_terminating_p;
......@@ -271,7 +271,7 @@ public class Readtable extends LispObject
return LispThread.currentThread().setValues(function, non_terminating_p);
}
private