Changeset 12723


Ignore:
Timestamp:
05/23/10 09:31:32 (14 years ago)
Author:
ehuelsmann
Message:

Style nit: I like tables and loops for their compactness.

File:
1 edited

Legend:

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

    r12717 r12723  
    431431    }
    432432
     433    private static Symbol[] savedSpecials =
     434        new Symbol[] { // CLHS Specified
     435                       Symbol.CURRENT_READTABLE, Symbol._PACKAGE_,
     436                       // Compiler policy
     437                       _SPEED_, _SPACE_, _SAFETY_, _DEBUG_, _EXPLAIN_ };
     438
    433439    // A nil TRUENAME signals a load from stream which has no possible path
    434440    private static final LispObject loadFileFromStream(LispObject pathname,
     
    444450        final LispThread thread = LispThread.currentThread();
    445451        final SpecialBindingsMark mark = thread.markSpecialBindings();
    446         // "LOAD binds *READTABLE* and *PACKAGE* to the values they held before
    447         // loading the file."
    448         thread.bindSpecialToCurrentValue(Symbol.CURRENT_READTABLE);
    449         thread.bindSpecialToCurrentValue(Symbol._PACKAGE_);
     452
     453        for (Symbol special : savedSpecials)
     454            thread.bindSpecialToCurrentValue(special);
     455
    450456        int loadDepth = Fixnum.getValue(_LOAD_DEPTH_.symbolValue(thread));
    451457        thread.bindSpecial(_LOAD_DEPTH_, Fixnum.getInstance(++loadDepth));
    452         // Compiler policy.
    453         thread.bindSpecialToCurrentValue(_SPEED_);
    454         thread.bindSpecialToCurrentValue(_SPACE_);
    455         thread.bindSpecialToCurrentValue(_SAFETY_);
    456         thread.bindSpecialToCurrentValue(_DEBUG_);
    457         thread.bindSpecialToCurrentValue(_EXPLAIN_);
    458458        final String prefix = getLoadVerbosePrefix(loadDepth);
    459459        try {
Note: See TracChangeset for help on using the changeset viewer.