[armedbear-cvs] r12506 - trunk/abcl/src/org/armedbear/lisp
Mark Evenson
mevenson at common-lisp.net
Wed Feb 24 10:06:46 UTC 2010
Author: mevenson
Date: Wed Feb 24 05:06:43 2010
New Revision: 12506
Log:
Eliminate needless lookup for PATHNAME-MATCH-P primitive.
Modified:
trunk/abcl/src/org/armedbear/lisp/Pathname.java
Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Pathname.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Pathname.java Wed Feb 24 05:06:43 2010
@@ -1242,19 +1242,6 @@
}
}
- private static Function pathname_match_p;
- private static LispObject matchesWildcard(LispObject pathname, LispObject wildcard) {
- if (pathname_match_p == null) {
- pathname_match_p
- = (Function) PACKAGE_SYS.findAccessibleSymbol("PATHNAME-MATCH-P")
- .getSymbolFunction();
- if (pathname_match_p == null) {
- Debug.assertTrue(false);
- }
- }
- return pathname_match_p.execute(pathname, wildcard);
- }
-
// ### list-directory directory
private static final Primitive LIST_DIRECTORY = new pf_list_directory();
private static class pf_list_directory extends Primitive {
@@ -1297,11 +1284,11 @@
String entryName = "/" + entry.getName();
if (entryName.endsWith("/")) {
- matches = matchesWildcard(new SimpleString(entryName),
- wildcardDirectory);
+ matches = Symbol.PATHNAME_MATCH_P
+ .execute(new SimpleString(entryName), wildcardDirectory);
} else {
- matches = matchesWildcard(new SimpleString(entryName),
- wildcard);
+ matches = Symbol.PATHNAME_MATCH_P.
+ execute(new SimpleString(entryName), wildcard);
}
if (!matches.equals(NIL)) {
String namestring = new String(pathname.getNamestring());
@@ -1386,7 +1373,8 @@
ZipEntry entry = entries.nextElement();
String entryName = "/" + entry.getName();
- LispObject matches = matchesWildcard(new SimpleString(entryName), wildcard);
+ LispObject matches = Symbol.PATHNAME_MATCH_P
+ .execute(new SimpleString(entryName), wildcard);
if (!matches.equals(NIL)) {
String namestring = new String(pathname.getNamestring());
More information about the armedbear-cvs
mailing list