[armedbear-cvs] r12594 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sat Apr 10 20:17:11 UTC 2010
Author: ehuelsmann
Date: Sat Apr 10 16:17:10 2010
New Revision: 12594
Log:
Switch Stream.readList 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:17:10 2010
@@ -111,7 +111,7 @@
public LispObject execute(Stream stream, char ignored)
{
- return stream.readList(false, true);
+ return stream.readList(false, Stream.faslReadtable);
}
};
@@ -153,7 +153,7 @@
{
final LispThread thread = LispThread.currentThread();
- LispObject list = stream.readList(true, true);
+ LispObject list = stream.readList(true, Stream.faslReadtable);
if (_BACKQUOTE_COUNT_.symbolValue(thread).zerop()) {
if (n >= 0) {
LispObject[] array = new LispObject[n];
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:17:10 2010
@@ -138,7 +138,7 @@
public LispObject execute(Stream stream, char ignored)
{
- return stream.readList(false, false);
+ return stream.readList(false, Stream.currentReadtable);
}
};
@@ -193,7 +193,7 @@
{
final LispThread thread = LispThread.currentThread();
- LispObject list = stream.readList(true, false);
+ LispObject list = stream.readList(true, Stream.currentReadtable);
if (_BACKQUOTE_COUNT_.symbolValue(thread).zerop()) {
if (n >= 0) {
LispObject[] array = new LispObject[n];
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:17:10 2010
@@ -642,19 +642,16 @@
this));
}
- public LispObject readList(boolean requireProperList, boolean useFaslReadtable)
-
+ public LispObject readList(boolean requireProperList,
+ ReadtableAccessor rta)
{
final LispThread thread = LispThread.currentThread();
Cons first = null;
Cons last = null;
- Readtable rt = null;
- if (useFaslReadtable)
- rt = FaslReadtable.getInstance();
+ Readtable rt;
try {
while (true) {
- if (!useFaslReadtable)
- rt = (Readtable) Symbol.CURRENT_READTABLE.symbolValue(thread);
+ rt = rta.rt(thread);
char c = flushWhitespace(rt);
if (c == ')') {
return first == null ? NIL : first;
More information about the armedbear-cvs
mailing list