Changeset 13714


Ignore:
Timestamp:
01/04/12 13:44:29 (10 years ago)
Author:
Mark Evenson
Message:

[PATCH 2/2] add class SPECIALIZER, splice it into mop class

From 3d54c11cd984ce6df5a563c57dce85765c1ab602 Mon Sep 17 00:00:00 2001

hierarchy.

---

src/org/armedbear/lisp/Specializer.java | 52 +++++++++++++++++++++++++++++
src/org/armedbear/lisp/StandardClass.java | 18 ++++++----
src/org/armedbear/lisp/Symbol.java | 2 +
3 files changed, 65 insertions(+), 7 deletions(-)
create mode 100644 src/org/armedbear/lisp/Specializer.java

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
1 added
2 edited

Legend:

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

    r13713 r13714  
    388388  public static final StandardClass METAOBJECT =
    389389    addStandardClass(Symbol.METAOBJECT, list(STANDARD_OBJECT));
     390  public static final StandardClass SPECIALIZER =
     391    addStandardClass(Symbol.SPECIALIZER, list(METAOBJECT));
    390392
    391393    public static final StandardClass SLOT_DEFINITION =
     
    423425
    424426  public static final StandardClass CLASS =
    425     addStandardClass(Symbol.CLASS, list(STANDARD_OBJECT));
     427    addStandardClass(Symbol.CLASS, list(SPECIALIZER));
    426428
    427429  public static final StandardClass BUILT_IN_CLASS =
     
    579581            new SlotDefinition(Symbol.OPERANDS,
    580582                               list(PACKAGE_CL.intern("ARITHMETIC-ERROR-OPERANDS")))));
    581     BUILT_IN_CLASS.setCPL(BUILT_IN_CLASS, CLASS, STANDARD_OBJECT,
     583    BUILT_IN_CLASS.setCPL(BUILT_IN_CLASS, CLASS, SPECIALIZER, METAOBJECT, STANDARD_OBJECT,
    582584                          BuiltInClass.CLASS_T);
    583585    CELL_ERROR.setCPL(CELL_ERROR, ERROR, SERIOUS_CONDITION, CONDITION,
     
    586588      list(new SlotDefinition(Symbol.NAME,
    587589                               list(Symbol.CELL_ERROR_NAME))));
    588     CLASS.setCPL(CLASS, STANDARD_OBJECT, BuiltInClass.CLASS_T);
     590    CLASS.setCPL(CLASS, SPECIALIZER, METAOBJECT, STANDARD_OBJECT, BuiltInClass.CLASS_T);
    589591    COMPILER_ERROR.setCPL(COMPILER_ERROR, CONDITION, STANDARD_OBJECT,
    590592                          BuiltInClass.CLASS_T);
     
    633635                                    STANDARD_OBJECT, BuiltInClass.CLASS_T);
    634636    FORWARD_REFERENCED_CLASS.setCPL(FORWARD_REFERENCED_CLASS, CLASS,
    635                                     BuiltInClass.CLASS_T);
     637                                    SPECIALIZER, METAOBJECT, STANDARD_OBJECT, BuiltInClass.CLASS_T);
    636638    GENERIC_FUNCTION.setCPL(GENERIC_FUNCTION, METAOBJECT, STANDARD_OBJECT,
    637639                            BuiltInClass.FUNCTION,
     
    642644      list(new SlotDefinition(Symbol.CAUSE, list(Symbol.JAVA_EXCEPTION_CAUSE))));
    643645    METAOBJECT.setCPL(METAOBJECT, STANDARD_OBJECT, BuiltInClass.CLASS_T);
     646    SPECIALIZER.setCPL(SPECIALIZER, METAOBJECT, STANDARD_OBJECT, BuiltInClass.CLASS_T);
    644647    METHOD.setCPL(METHOD, METAOBJECT, STANDARD_OBJECT, BuiltInClass.CLASS_T);
    645648    PACKAGE_ERROR.setCPL(PACKAGE_ERROR, ERROR, SERIOUS_CONDITION, CONDITION,
     
    675678    SIMPLE_WARNING.setCPL(SIMPLE_WARNING, SIMPLE_CONDITION, WARNING,
    676679                          CONDITION, STANDARD_OBJECT, BuiltInClass.CLASS_T);
    677     STANDARD_CLASS.setCPL(STANDARD_CLASS, CLASS,
     680    STANDARD_CLASS.setCPL(STANDARD_CLASS, CLASS, SPECIALIZER, METAOBJECT,
    678681                          STANDARD_OBJECT, BuiltInClass.CLASS_T);
    679682    STANDARD_OBJECT.setCPL(STANDARD_OBJECT, BuiltInClass.CLASS_T);
     
    685688      list(new SlotDefinition(Symbol.STREAM,
    686689                               list(PACKAGE_CL.intern("STREAM-ERROR-STREAM")))));
    687     STRUCTURE_CLASS.setCPL(STRUCTURE_CLASS, CLASS, STANDARD_OBJECT,
    688                            BuiltInClass.CLASS_T);
     690    STRUCTURE_CLASS.setCPL(STRUCTURE_CLASS, CLASS, SPECIALIZER, METAOBJECT,
     691                           STANDARD_OBJECT, BuiltInClass.CLASS_T);
    689692    STYLE_WARNING.setCPL(STYLE_WARNING, WARNING, CONDITION, STANDARD_OBJECT,
    690693                         BuiltInClass.CLASS_T);
     
    730733    JAVA_EXCEPTION.finalizeClass();
    731734    METAOBJECT.finalizeClass();
     735    SPECIALIZER.finalizeClass();
    732736    PACKAGE_ERROR.finalizeClass();
    733737    PARSE_ERROR.finalizeClass();
  • trunk/abcl/src/org/armedbear/lisp/Symbol.java

    r13713 r13714  
    29702970  public static final Symbol METAOBJECT =
    29712971    PACKAGE_MOP.addExternalSymbol("METAOBJECT");
     2972  public static final Symbol SPECIALIZER =
     2973    PACKAGE_MOP.addExternalSymbol("SPECIALIZER");
    29722974  public static final Symbol STANDARD_READER_METHOD =
    29732975    PACKAGE_MOP.addExternalSymbol("STANDARD-READER-METHOD");
Note: See TracChangeset for help on using the changeset viewer.