[armedbear-cvs] r12726 - trunk/abcl/src/org/armedbear/lisp

Ville Voutilainen vvoutilainen at common-lisp.net
Sun May 23 18:20:49 UTC 2010


Author: vvoutilainen
Date: Sun May 23 14:20:48 2010
New Revision: 12726

Log:
Use BitSet's bulk set operation.


Modified:
   trunk/abcl/src/org/armedbear/lisp/Stream.java

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	Sun May 23 14:20:48 2010
@@ -1138,8 +1138,7 @@
                 sb.setLength(0);
                 sb.append(readMultipleEscape(rt));
                 flags = new BitSet(sb.length());
-                for (int i = sb.length(); i-- > 0;)
-                    flags.set(i);
+                flags.set(0, sb.length());
             } else if (rt.isInvalid(c)) {
                 rt.checkInvalid(c, this); // Signals a reader-error.
             } else if (readtableCase == Keyword.UPCASE) {
@@ -1180,8 +1179,7 @@
                     int end = sb.length();
                     if (flags == null)
                         flags = new BitSet(sb.length());
-                    for (int i = begin; i < end; i++)
-                        flags.set(i);
+                    flags.set(begin, end);
                     continue;
                 }
                 if (readtableCase == Keyword.UPCASE)




More information about the armedbear-cvs mailing list