[armedbear-cvs] r12593 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sat Apr 10 20:04:15 UTC 2010
Author: ehuelsmann
Date: Sat Apr 10 16:04:15 2010
New Revision: 12593
Log:
Switch Stream.readDispatchChar to use ReadtableAccessors.
Modified:
trunk/abcl/src/org/armedbear/lisp/FaslReader.java
trunk/abcl/src/org/armedbear/lisp/LispReader.java
trunk/abcl/src/org/armedbear/lisp/Stream.java
Modified: trunk/abcl/src/org/armedbear/lisp/FaslReader.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/FaslReader.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/FaslReader.java Sat Apr 10 16:04:15 2010
@@ -139,7 +139,7 @@
public LispObject execute(Stream stream, char c)
{
- return stream.readDispatchChar(c, true);
+ return stream.readDispatchChar(c, Stream.faslReadtable);
}
};
Modified: trunk/abcl/src/org/armedbear/lisp/LispReader.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/LispReader.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/LispReader.java Sat Apr 10 16:04:15 2010
@@ -179,7 +179,7 @@
public LispObject execute(Stream stream, char c)
{
- return stream.readDispatchChar(c, false);
+ return stream.readDispatchChar(c, Stream.currentReadtable);
}
};
Modified: trunk/abcl/src/org/armedbear/lisp/Stream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Stream.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Stream.java Sat Apr 10 16:04:15 2010
@@ -725,8 +725,8 @@
}
}
- public LispObject readDispatchChar(char dispChar, boolean useFaslReadtable)
-
+ public LispObject readDispatchChar(char dispChar,
+ ReadtableAccessor rta)
{
int numArg = -1;
char c = 0;
@@ -746,11 +746,7 @@
error(new StreamError(this, e));
}
final LispThread thread = LispThread.currentThread();
- final Readtable rt;
- if (useFaslReadtable)
- rt = FaslReadtable.getInstance();
- else
- rt = (Readtable) Symbol.CURRENT_READTABLE.symbolValue(thread);
+ final Readtable rt = rta.rt(thread);
LispObject fun = rt.getDispatchMacroCharacter(dispChar, c);
if (fun instanceof DispatchMacroFunction)
return ((DispatchMacroFunction)fun).execute(this, c, numArg);
More information about the armedbear-cvs
mailing list