Changeset 12506


Ignore:
Timestamp:
02/24/10 10:06:43 (12 years ago)
Author:
Mark Evenson
Message:

Eliminate needless lookup for PATHNAME-MATCH-P primitive.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Pathname.java

    r12503 r12506  
    12431243    }
    12441244
    1245     private static Function pathname_match_p;
    1246     private static LispObject matchesWildcard(LispObject pathname, LispObject wildcard) {
    1247         if (pathname_match_p == null) {
    1248             pathname_match_p
    1249               = (Function) PACKAGE_SYS.findAccessibleSymbol("PATHNAME-MATCH-P")
    1250                 .getSymbolFunction();
    1251             if (pathname_match_p == null) {
    1252                 Debug.assertTrue(false);
    1253             }
    1254         }
    1255         return pathname_match_p.execute(pathname, wildcard);
    1256     }
    1257 
    12581245    // ### list-directory directory
    12591246    private static final Primitive LIST_DIRECTORY = new pf_list_directory();
     
    12981285
    12991286                    if (entryName.endsWith("/")) {
    1300                         matches = matchesWildcard(new SimpleString(entryName),
    1301                                                   wildcardDirectory);
     1287                        matches = Symbol.PATHNAME_MATCH_P
     1288                            .execute(new SimpleString(entryName), wildcardDirectory);
    13021289                    } else {
    1303                         matches = matchesWildcard(new SimpleString(entryName),
    1304                                                   wildcard);
     1290                        matches = Symbol.PATHNAME_MATCH_P.
     1291                            execute(new SimpleString(entryName), wildcard);
    13051292                    }
    13061293                    if (!matches.equals(NIL)) {
     
    13871374                String entryName = "/" + entry.getName();
    13881375               
    1389                 LispObject matches = matchesWildcard(new SimpleString(entryName), wildcard);
     1376                LispObject matches = Symbol.PATHNAME_MATCH_P
     1377                    .execute(new SimpleString(entryName), wildcard);
    13901378
    13911379                if (!matches.equals(NIL)) {
Note: See TracChangeset for help on using the changeset viewer.