Changeset 12357


Ignore:
Timestamp:
01/10/10 14:58:51 (11 years ago)
Author:
ehuelsmann
Message:

Change STREAM and its decendants to a structure class, from built-in,

in an attempt to prepare support for Gray streams.

Note: Many more commits coming this way.

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

Legend:

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

    r12298 r12357  
    9393  public static final BuiltInClass BASE_STRING          = addClass(Symbol.BASE_STRING);
    9494  public static final BuiltInClass BIT_VECTOR           = addClass(Symbol.BIT_VECTOR);
    95   public static final BuiltInClass BROADCAST_STREAM     = addClass(Symbol.BROADCAST_STREAM);
    96   public static final BuiltInClass CASE_FROB_STREAM     = addClass(Symbol.CASE_FROB_STREAM);
    9795  public static final BuiltInClass CHARACTER            = addClass(Symbol.CHARACTER);
    9896  public static final BuiltInClass COMPLEX              = addClass(Symbol.COMPLEX);
    99   public static final BuiltInClass CONCATENATED_STREAM  = addClass(Symbol.CONCATENATED_STREAM);
    10097  public static final BuiltInClass CONS                 = addClass(Symbol.CONS);
    10198  public static final BuiltInClass DOUBLE_FLOAT         = addClass(Symbol.DOUBLE_FLOAT);
    102   public static final BuiltInClass ECHO_STREAM          = addClass(Symbol.ECHO_STREAM);
    10399  public static final BuiltInClass ENVIRONMENT          = addClass(Symbol.ENVIRONMENT);
    104   public static final BuiltInClass FILE_STREAM          = addClass(Symbol.FILE_STREAM);
    105100  public static final BuiltInClass FIXNUM               = addClass(Symbol.FIXNUM);
    106101  public static final BuiltInClass FLOAT                = addClass(Symbol.FLOAT);
     
    132127  public static final BuiltInClass SIMPLE_VECTOR        = addClass(Symbol.SIMPLE_VECTOR);
    133128  public static final BuiltInClass SINGLE_FLOAT         = addClass(Symbol.SINGLE_FLOAT);
    134   public static final BuiltInClass SLIME_INPUT_STREAM   = addClass(Symbol.SLIME_INPUT_STREAM);
    135   public static final BuiltInClass SLIME_OUTPUT_STREAM  = addClass(Symbol.SLIME_OUTPUT_STREAM);
    136   public static final BuiltInClass SOCKET_STREAM        = addClass(Symbol.SOCKET_STREAM);
    137   public static final BuiltInClass STREAM               = addClass(Symbol.STREAM);
    138129  public static final BuiltInClass STRING               = addClass(Symbol.STRING);
    139   public static final BuiltInClass STRING_INPUT_STREAM  = addClass(Symbol.STRING_INPUT_STREAM);
    140   public static final BuiltInClass STRING_OUTPUT_STREAM = addClass(Symbol.STRING_OUTPUT_STREAM);
    141   public static final BuiltInClass STRING_STREAM        = addClass(Symbol.STRING_STREAM);
    142130  public static final BuiltInClass SYMBOL               = addClass(Symbol.SYMBOL);
    143   public static final BuiltInClass SYNONYM_STREAM       = addClass(Symbol.SYNONYM_STREAM);
    144131  public static final BuiltInClass THREAD               = addClass(Symbol.THREAD);
    145   public static final BuiltInClass TWO_WAY_STREAM       = addClass(Symbol.TWO_WAY_STREAM);
    146132  public static final BuiltInClass VECTOR               = addClass(Symbol.VECTOR);
    147133  public static final BuiltInClass STACK_FRAME          = addClass(Symbol.STACK_FRAME);
     
    151137
    152138  public static final StructureClass STRUCTURE_OBJECT =
    153     new StructureClass(Symbol.STRUCTURE_OBJECT, list(CLASS_T));
    154   static
    155   {
    156     addClass(Symbol.STRUCTURE_OBJECT, STRUCTURE_OBJECT);
    157   }
     139    (StructureClass)addClass(Symbol.STRUCTURE_OBJECT,
     140             new StructureClass(Symbol.STRUCTURE_OBJECT, list(CLASS_T)));
     141
     142  public static final LispClass STREAM =
     143    addClass(Symbol.STREAM,
     144             new StructureClass(Symbol.STREAM, list(STRUCTURE_OBJECT)));
     145  public static final LispClass SYSTEM_STREAM =
     146    addClass(Symbol.SYSTEM_STREAM,
     147             new StructureClass(Symbol.SYSTEM_STREAM, list(STREAM)));
     148  public static final LispClass TWO_WAY_STREAM =
     149    addClass(Symbol.TWO_WAY_STREAM,
     150             new StructureClass(Symbol.TWO_WAY_STREAM, list(SYSTEM_STREAM)));
     151  public static final LispClass BROADCAST_STREAM =
     152    addClass(Symbol.BROADCAST_STREAM,
     153             new StructureClass(Symbol.BROADCAST_STREAM, list(SYSTEM_STREAM)));
     154  public static final LispClass ECHO_STREAM =
     155    addClass(Symbol.ECHO_STREAM,
     156             new StructureClass(Symbol.ECHO_STREAM, list(SYSTEM_STREAM)));
     157  public static final LispClass CASE_FROB_STREAM =
     158    addClass(Symbol.CASE_FROB_STREAM,
     159             new StructureClass(Symbol.CASE_FROB_STREAM, list(SYSTEM_STREAM)));
     160  public static final LispClass STRING_STREAM =
     161    addClass(Symbol.STRING_STREAM,
     162             new StructureClass(Symbol.STRING_STREAM, list(SYSTEM_STREAM)));
     163  public static final LispClass STRING_INPUT_STREAM =
     164    addClass(Symbol.STRING_INPUT_STREAM,
     165             new StructureClass(Symbol.STRING_INPUT_STREAM, list(STRING_STREAM)));
     166  public static final LispClass STRING_OUTPUT_STREAM =
     167    addClass(Symbol.STRING_OUTPUT_STREAM,
     168             new StructureClass(Symbol.STRING_OUTPUT_STREAM, list(STRING_STREAM)));
     169  public static final LispClass SYNONYM_STREAM =
     170    addClass(Symbol.SYNONYM_STREAM,
     171             new StructureClass(Symbol.SYNONYM_STREAM, list(SYSTEM_STREAM)));
     172  public static final LispClass FILE_STREAM =
     173    addClass(Symbol.FILE_STREAM,
     174             new StructureClass(Symbol.FILE_STREAM, list(SYSTEM_STREAM)));
     175  public static final LispClass CONCATENATED_STREAM =
     176    addClass(Symbol.CONCATENATED_STREAM,
     177             new StructureClass(Symbol.CONCATENATED_STREAM, list(SYSTEM_STREAM)));
     178
     179
     180
     181    // Implementation defined streams
     182  public static final LispClass SOCKET_STREAM =
     183    addClass(Symbol.SOCKET_STREAM,
     184             new StructureClass(Symbol.SOCKET_STREAM, list(TWO_WAY_STREAM)));
     185  public static final LispClass SLIME_INPUT_STREAM =
     186    addClass(Symbol.SLIME_INPUT_STREAM,
     187             new StructureClass(Symbol.SLIME_INPUT_STREAM, list(STRING_STREAM)));
     188  public static final LispClass SLIME_OUTPUT_STREAM =
     189    addClass(Symbol.SLIME_OUTPUT_STREAM,
     190             new StructureClass(Symbol.SLIME_OUTPUT_STREAM, list(STRING_STREAM)));
     191
     192
    158193
    159194  static
     
    167202    BIT_VECTOR.setDirectSuperclass(VECTOR);
    168203    BIT_VECTOR.setCPL(BIT_VECTOR, VECTOR, ARRAY, SEQUENCE, CLASS_T);
    169     BROADCAST_STREAM.setDirectSuperclass(STREAM);
    170204    BROADCAST_STREAM.setCPL(BROADCAST_STREAM, STREAM, CLASS_T);
    171205    CASE_FROB_STREAM.setDirectSuperclass(STREAM);
     
    176210    COMPLEX.setDirectSuperclass(NUMBER);
    177211    COMPLEX.setCPL(COMPLEX, NUMBER, CLASS_T);
    178     CONCATENATED_STREAM.setDirectSuperclass(STREAM);
    179212    CONCATENATED_STREAM.setCPL(CONCATENATED_STREAM, STREAM, CLASS_T);
    180213    CONS.setDirectSuperclass(LIST);
     
    182215    DOUBLE_FLOAT.setDirectSuperclass(FLOAT);
    183216    DOUBLE_FLOAT.setCPL(DOUBLE_FLOAT, FLOAT, REAL, NUMBER, CLASS_T);
    184     ECHO_STREAM.setDirectSuperclass(STREAM);
    185217    ECHO_STREAM.setCPL(ECHO_STREAM, STREAM, CLASS_T);
    186218    ENVIRONMENT.setDirectSuperclass(CLASS_T);
     
    188220    FIXNUM.setDirectSuperclass(INTEGER);
    189221    FIXNUM.setCPL(FIXNUM, INTEGER, RATIONAL, REAL, NUMBER, CLASS_T);
    190     FILE_STREAM.setDirectSuperclass(STREAM);
    191222    FILE_STREAM.setCPL(FILE_STREAM, STREAM, CLASS_T);
    192223    FLOAT.setDirectSuperclass(REAL);
     
    251282    SINGLE_FLOAT.setDirectSuperclass(FLOAT);
    252283    SINGLE_FLOAT.setCPL(SINGLE_FLOAT, FLOAT, REAL, NUMBER, CLASS_T);
    253     SLIME_INPUT_STREAM.setDirectSuperclass(STRING_STREAM);
    254284    SLIME_INPUT_STREAM.setCPL(SLIME_INPUT_STREAM, STRING_STREAM, STREAM,
    255285                              CLASS_T);
    256     SLIME_OUTPUT_STREAM.setDirectSuperclass(STRING_STREAM);
    257286    SLIME_OUTPUT_STREAM.setCPL(SLIME_OUTPUT_STREAM, STRING_STREAM, STREAM,
    258287                               CLASS_T);
    259     SOCKET_STREAM.setDirectSuperclass(TWO_WAY_STREAM);
    260288    SOCKET_STREAM.setCPL(SOCKET_STREAM, TWO_WAY_STREAM, STREAM, CLASS_T);
    261     STREAM.setDirectSuperclass(CLASS_T);
    262289    STREAM.setCPL(STREAM, CLASS_T);
    263290    STRING.setDirectSuperclass(VECTOR);
    264291    STRING.setCPL(STRING, VECTOR, ARRAY, SEQUENCE, CLASS_T);
    265     STRING_INPUT_STREAM.setDirectSuperclass(STRING_STREAM);
    266292    STRING_INPUT_STREAM.setCPL(STRING_INPUT_STREAM, STRING_STREAM, STREAM,
    267293                               CLASS_T);
    268     STRING_OUTPUT_STREAM.setDirectSuperclass(STRING_STREAM);
    269294    STRING_OUTPUT_STREAM.setCPL(STRING_OUTPUT_STREAM, STRING_STREAM, STREAM,
    270295                                CLASS_T);
    271     STRING_STREAM.setDirectSuperclass(STREAM);
    272296    STRING_STREAM.setCPL(STRING_STREAM, STREAM, CLASS_T);
    273297    STRUCTURE_OBJECT.setCPL(STRUCTURE_OBJECT, CLASS_T);
    274298    SYMBOL.setDirectSuperclass(CLASS_T);
    275299    SYMBOL.setCPL(SYMBOL, CLASS_T);
    276     SYNONYM_STREAM.setDirectSuperclass(STREAM);
    277300    SYNONYM_STREAM.setCPL(SYNONYM_STREAM, STREAM, CLASS_T);
    278301    THREAD.setDirectSuperclass(CLASS_T);
    279302    THREAD.setCPL(THREAD, CLASS_T);
    280     TWO_WAY_STREAM.setDirectSuperclass(STREAM);
    281303    TWO_WAY_STREAM.setCPL(TWO_WAY_STREAM, STREAM, CLASS_T);
    282304    VECTOR.setDirectSuperclasses(list(ARRAY, SEQUENCE));
  • trunk/abcl/src/org/armedbear/lisp/Symbol.java

    r12306 r12357  
    30413041  public static final Symbol STRING_OUTPUT_STREAM =
    30423042    PACKAGE_SYS.addInternalSymbol("STRING-OUTPUT-STREAM");
     3043  public static final Symbol SYSTEM_STREAM =
     3044    PACKAGE_SYS.addInternalSymbol("SYSTEM-STREAM");
    30433045  public static final Symbol STACK_FRAME =
    30443046    PACKAGE_SYS.addInternalSymbol("STACK-FRAME");
Note: See TracChangeset for help on using the changeset viewer.