Changeset 4283
- Timestamp:
- 10/10/03 14:21:55 (20 years ago)
- Location:
- trunk/j/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/Autoload.java
r4249 r4283 3 3 * 4 4 * Copyright (C) 2003 Peter Graves 5 * $Id: Autoload.java,v 1.8 3 2003-10-07 17:23:21piso Exp $5 * $Id: Autoload.java,v 1.84 2003-10-10 14:21:55 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 188 188 autoload("copy-structure", "StructureObject"); 189 189 autoload("delete-package", "PackageFunctions"); 190 autoload("describe", "describe"); 190 191 autoload("directory-namestring", "Pathname"); 191 autoload("describe", "describe");192 192 autoload("file-write-date", "Time"); 193 193 autoload("find-class", "LispClass"); … … 252 252 autoload(PACKAGE_SYS, "%open-input-file", "open"); 253 253 autoload(PACKAGE_SYS, "%open-output-file", "open"); 254 autoload(PACKAGE_SYS, "%set-class-slots", "StandardClass"); 254 255 autoload(PACKAGE_SYS, "%string-capitalize", "StringFunctions"); 255 256 autoload(PACKAGE_SYS, "%string-downcase", "StringFunctions"); … … 276 277 autoload(PACKAGE_SYS, "%structure-set-2", "StructureObject"); 277 278 autoload(PACKAGE_SYS, "%time", "Time"); 279 autoload(PACKAGE_SYS, "class-slots", "StandardClass"); 278 280 autoload(PACKAGE_SYS, "default-time-zone", "Time"); 279 281 autoload(PACKAGE_SYS, "hash-table-entries", "HashTable"); -
trunk/j/src/org/armedbear/lisp/StandardClass.java
r4111 r4283 3 3 * 4 4 * Copyright (C) 2003 Peter Graves 5 * $Id: StandardClass.java,v 1. 6 2003-09-28 19:34:28piso Exp $5 * $Id: StandardClass.java,v 1.7 2003-10-10 14:18:24 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 24 24 public class StandardClass extends LispClass 25 25 { 26 private LispObject directSlots; 27 private LispObject effectiveSlots; 28 private LispObject directSubclasses; 29 private LispObject directMethods; 30 31 public StandardClass() 32 { 33 } 34 26 35 public StandardClass(Symbol symbol, LispObject directSuperclasses) 27 36 { … … 56 65 } 57 66 58 // ### make-instance-standard-class 59 // make-instance-standard-class name all-keys => class 60 private static final Primitive2 MAKE_INSTANCE_STANDARD_CLASS = 61 new Primitive2("make-instance-standard-class", PACKAGE_SYS, false) 67 // ### class-slots 68 private static final Primitive1 CLASS_SLOTS = 69 new Primitive1("class-slots", PACKAGE_SYS, false) 70 { 71 public LispObject execute(LispObject arg) 72 throws ConditionThrowable 73 { 74 if (arg instanceof StandardClass) 75 return ((StandardClass)arg).effectiveSlots; 76 if (arg == BuiltInClass.STANDARD_CLASS) 77 return NIL; // FIXME 78 throw new ConditionThrowable(new TypeError(arg, "standard class")); 79 } 80 }; 81 82 // ### %set-class-slots 83 private static final Primitive2 _SET_CLASS_SLOTS = 84 new Primitive2("%set-class-slots", PACKAGE_SYS, false) 62 85 { 63 86 public LispObject execute(LispObject first, LispObject second) 64 87 throws ConditionThrowable 65 88 { 66 Symbol symbol = checkSymbol(first); 67 LispObject directSuperclasses = NIL; 68 LispObject allKeys = second; 69 while (allKeys != NIL) { 70 LispObject key = allKeys.car(); 71 LispObject value = allKeys.cadr(); 72 if (key == Keyword.DIRECT_SUPERCLASSES) 73 directSuperclasses = value; 74 allKeys = allKeys.cddr(); 89 if (first instanceof StandardClass) { 90 ((StandardClass)first).effectiveSlots = second; 91 return second; 75 92 } 76 return new StandardClass(symbol, directSuperclasses);93 throw new ConditionThrowable(new TypeError(first, "standard class")); 77 94 } 78 95 };
Note: See TracChangeset
for help on using the changeset viewer.