Changeset 13947
- Timestamp:
- 05/24/12 17:50:29 (12 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Primitives.java
r13942 r13947 5562 5562 return ((LispClass)arg).getDocumentation(); 5563 5563 else 5564 return ((StandardObject)arg).getInstanceSlotValue(Symbol. DOCUMENTATION);5564 return ((StandardObject)arg).getInstanceSlotValue(Symbol._DOCUMENTATION); 5565 5565 } 5566 5566 }; … … 5580 5580 ((LispClass)first).setDocumentation(second); 5581 5581 else 5582 ((StandardObject)first).setInstanceSlotValue(Symbol. DOCUMENTATION, second);5582 ((StandardObject)first).setInstanceSlotValue(Symbol._DOCUMENTATION, second); 5583 5583 return second; 5584 5584 } -
trunk/abcl/src/org/armedbear/lisp/SlotDefinition.java
r13897 r13947 105 105 } 106 106 107 public SlotDefinition(LispObject name, LispObject readers, 108 Function initFunction, LispObject initargs) 109 { 110 this(); 111 Debug.assertTrue(name instanceof Symbol); 112 slots[SlotDefinitionClass.SLOT_INDEX_NAME] = name; 113 slots[SlotDefinitionClass.SLOT_INDEX_INITFUNCTION] = initFunction; 114 slots[SlotDefinitionClass.SLOT_INDEX_INITFORM] = NIL; 115 slots[SlotDefinitionClass.SLOT_INDEX_INITARGS] = initargs; 116 slots[SlotDefinitionClass.SLOT_INDEX_READERS] = readers; 117 slots[SlotDefinitionClass.SLOT_INDEX_ALLOCATION] = Keyword.INSTANCE; 118 } 119 107 120 public static StandardObject checkSlotDefinition(LispObject obj) { 108 121 if (obj instanceof StandardObject) return (StandardObject)obj; … … 279 292 }; 280 293 281 privatestatic final Primitive SET_SLOT_DEFINITION_INITARGS294 static final Primitive SET_SLOT_DEFINITION_INITARGS 282 295 = new pf_set_slot_definition_initargs(); 283 296 @DocString(name="set-slot-definition-initargs", -
trunk/abcl/src/org/armedbear/lisp/SlotDefinitionClass.java
r13897 r13947 67 67 pkg.intern("ALLOCATION-CLASS"), 68 68 pkg.intern("LOCATION"), 69 Symbol. TYPE,70 Symbol. DOCUMENTATION69 Symbol._TYPE, 70 Symbol._DOCUMENTATION 71 71 }; 72 72 setClassLayout(new Layout(this, instanceSlotNames, NIL)); … … 79 79 // in its constructor; here we make Lisp-side subclasses of 80 80 // standard-*-slot-definition do the same. 81 LispObject locationSlot = slotDefinitions.nthcdr( 8).car();81 LispObject locationSlot = slotDefinitions.nthcdr(SLOT_INDEX_LOCATION).car(); 82 82 SlotDefinition.SET_SLOT_DEFINITION_INITFORM.execute(locationSlot, NIL); 83 83 SlotDefinition.SET_SLOT_DEFINITION_INITFUNCTION.execute(locationSlot, StandardClass.constantlyNil); 84 84 setDirectSlotDefinitions(slotDefinitions); 85 85 setSlotDefinitions(slotDefinitions); 86 // Fix initargs of TYPE, DOCUMENTATION slots. 87 LispObject typeSlot = slotDefinitions.nthcdr(SLOT_INDEX_TYPE).car(); 88 SlotDefinition.SET_SLOT_DEFINITION_INITARGS.execute(typeSlot, list(internKeyword("TYPE"))); 89 LispObject documentationSlot = slotDefinitions.nthcdr(SLOT_INDEX_DOCUMENTATION).car(); 90 SlotDefinition.SET_SLOT_DEFINITION_INITARGS.execute(documentationSlot, list(internKeyword("DOCUMENTATION"))); 86 91 87 92 setFinalized(true); -
trunk/abcl/src/org/armedbear/lisp/StandardClass.java
r13871 r13947 84 84 symDefaultInitargs, 85 85 symFinalizedP, 86 Symbol. DOCUMENTATION),86 Symbol._DOCUMENTATION), 87 87 NIL) 88 88 { … … 107 107 symDefaultInitargs, 108 108 symFinalizedP, 109 Symbol. DOCUMENTATION),109 Symbol._DOCUMENTATION), 110 110 NIL) 111 111 { … … 293 293 public LispObject getDocumentation() 294 294 { 295 return getInstanceSlotValue(Symbol. DOCUMENTATION);295 return getInstanceSlotValue(Symbol._DOCUMENTATION); 296 296 } 297 297 … … 299 299 public void setDocumentation(LispObject doc) 300 300 { 301 setInstanceSlotValue(Symbol. DOCUMENTATION, doc);301 setInstanceSlotValue(Symbol._DOCUMENTATION, doc); 302 302 } 303 303 … … 413 413 helperMakeSlotDefinition("DEFAULT-INITARGS", constantlyNil), 414 414 helperMakeSlotDefinition("FINALIZED-P", constantlyNil), 415 helperMakeSlotDefinition("DOCUMENTATION", constantlyNil)); 415 new SlotDefinition(Symbol._DOCUMENTATION, 416 list(PACKAGE_MOP.intern("CLASS-DOCUMENTATION")), 417 constantlyNil, list(internKeyword("DOCUMENTATION")))); 416 418 } 417 419 … … 740 742 BuiltInClass.CLASS_T); 741 743 STANDARD_METHOD.setDirectSlotDefinitions( 742 list(new SlotDefinition(Symbol.GENERIC_FUNCTION, NIL, constantlyNil), 744 list(new SlotDefinition(Symbol._GENERIC_FUNCTION, NIL, constantlyNil, 745 list(internKeyword("GENERIC-FUNCTION"))), 743 746 new SlotDefinition(Symbol.LAMBDA_LIST, NIL, constantlyNil), 744 747 new SlotDefinition(Symbol.KEYWORDS, NIL, constantlyNil), … … 746 749 new SlotDefinition(Symbol.SPECIALIZERS, NIL, constantlyNil), 747 750 new SlotDefinition(Symbol.QUALIFIERS, NIL, constantlyNil), 748 new SlotDefinition(Symbol.FUNCTION, NIL, constantlyNil), 751 new SlotDefinition(Symbol._FUNCTION, NIL, constantlyNil, 752 list(internKeyword("FUNCTION"))), 749 753 new SlotDefinition(Symbol.FAST_FUNCTION, NIL, constantlyNil), 750 new SlotDefinition(Symbol.DOCUMENTATION, NIL, constantlyNil))); 754 new SlotDefinition(Symbol._DOCUMENTATION, NIL, constantlyNil, 755 list(internKeyword("DOCUMENTATION"))))); 751 756 STANDARD_ACCESSOR_METHOD.setCPL(STANDARD_ACCESSOR_METHOD, STANDARD_METHOD, 752 757 METHOD, METAOBJECT, STANDARD_OBJECT, 753 758 BuiltInClass.CLASS_T); 754 759 STANDARD_ACCESSOR_METHOD.setDirectSlotDefinitions( 755 list(new SlotDefinition(Symbol.SLOT_DEFINITION, NIL))); 760 list(new SlotDefinition(Symbol._SLOT_DEFINITION, NIL, constantlyNil, 761 list(internKeyword("SLOT-DEFINITION"))))); 756 762 STANDARD_READER_METHOD.setCPL(STANDARD_READER_METHOD, 757 763 STANDARD_ACCESSOR_METHOD, STANDARD_METHOD, … … 768 774 list(Symbol.METHOD_COMBINATION_NAME), 769 775 constantlyNil), 770 new SlotDefinition(Symbol. DOCUMENTATION,776 new SlotDefinition(Symbol._DOCUMENTATION, 771 777 list(Symbol.METHOD_COMBINATION_DOCUMENTATION), 772 constantlyNil )));778 constantlyNil, list(internKeyword("DOCUMENTATION"))))); 773 779 SHORT_METHOD_COMBINATION.setCPL(SHORT_METHOD_COMBINATION, 774 780 METHOD_COMBINATION, METAOBJECT, -
trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java
r13888 r13947 94 94 StandardObject method 95 95 = (StandardObject)StandardClass.STANDARD_METHOD.allocateInstance(); 96 method.setInstanceSlotValue(Symbol. GENERIC_FUNCTION, this);96 method.setInstanceSlotValue(Symbol._GENERIC_FUNCTION, this); 97 97 method.setInstanceSlotValue(Symbol.LAMBDA_LIST, lambdaList); 98 98 method.setInstanceSlotValue(Symbol.KEYWORDS, NIL); … … 104 104 // removed for the implementation of subclassable standard-method). 105 105 // (rudi 2012-01-27) 106 method.setInstanceSlotValue(Symbol. FUNCTION, NIL);106 method.setInstanceSlotValue(Symbol._FUNCTION, NIL); 107 107 method.setInstanceSlotValue(Symbol.FAST_FUNCTION, function); 108 method.setInstanceSlotValue(Symbol. DOCUMENTATION, NIL);108 method.setInstanceSlotValue(Symbol._DOCUMENTATION, NIL); 109 109 slots[StandardGenericFunctionClass.SLOT_INDEX_METHODS] = 110 110 list(method); -
trunk/abcl/src/org/armedbear/lisp/StandardGenericFunctionClass.java
r13871 r13947 64 64 pkg.intern("METHODS"), 65 65 pkg.intern("METHOD-CLASS"), 66 pkg.intern(" METHOD-COMBINATION"),66 pkg.intern("%METHOD-COMBINATION"), 67 67 pkg.intern("ARGUMENT-PRECEDENCE-ORDER"), 68 68 pkg.intern("CLASSES-TO-EMF-TABLE"), 69 Symbol. DOCUMENTATION69 Symbol._DOCUMENTATION 70 70 }; 71 71 setClassLayout(new Layout(this, instanceSlotNames, NIL)); -
trunk/abcl/src/org/armedbear/lisp/Symbol.java
r13814 r13947 3163 3163 PACKAGE_SYS.addInternalSymbol("FORMAT-CONTROL"); 3164 3164 public static final Symbol FSET = PACKAGE_SYS.addInternalSymbol("FSET"); 3165 public static final Symbol _FUNCTION = 3166 PACKAGE_SYS.addInternalSymbol("%FUNCTION"); 3165 3167 public static final Symbol FUNCTION_PRELOAD = 3166 3168 PACKAGE_SYS.addInternalSymbol("FUNCTION-PRELOAD"); 3169 public static final Symbol _GENERIC_FUNCTION = 3170 PACKAGE_SYS.addInternalSymbol("%GENERIC-FUNCTION"); 3167 3171 public static final Symbol INSTANCE = 3168 3172 PACKAGE_SYS.addInternalSymbol("INSTANCE"); … … 3185 3189 public static final Symbol QUALIFIERS = 3186 3190 PACKAGE_SYS.addInternalSymbol("QUALIFIERS"); 3191 public static final Symbol _SLOT_DEFINITION = 3192 PACKAGE_SYS.addInternalSymbol("%SLOT-DEFINITION"); 3187 3193 public static final Symbol _SOURCE = 3188 3194 PACKAGE_SYS.addInternalSymbol("%SOURCE"); … … 3199 3205 public static final Symbol STACK_FRAME = 3200 3206 PACKAGE_SYS.addInternalSymbol("STACK-FRAME"); 3207 public static final Symbol _TYPE = 3208 PACKAGE_SYS.addInternalSymbol("%TYPE"); 3201 3209 public static final Symbol LISP_STACK_FRAME = 3202 3210 PACKAGE_SYS.addInternalSymbol("LISP-STACK-FRAME"); -
trunk/abcl/src/org/armedbear/lisp/clos.lisp
r13939 r13947 211 211 funcallable-standard-class)))) 212 212 (fixup-standard-class-hierarchy) 213 214 213 215 214 (defun no-applicable-method (generic-function &rest args) … … 870 869 (let ((instance (std-allocate-instance (find-class 'long-method-combination)))) 871 870 (setf (std-slot-value instance 'sys::name) name) 872 (setf (std-slot-value instance ' documentation) documentation)871 (setf (std-slot-value instance 'sys:%documentation) documentation) 873 872 (setf (std-slot-value instance 'sys::lambda-list) lambda-list) 874 873 (setf (std-slot-value instance 'method-group-specs) method-group-specs) … … 888 887 (defun method-combination-documentation (method-combination) 889 888 (check-type method-combination method-combination) 890 (std-slot-value method-combination ' documentation))889 (std-slot-value method-combination 'sys:%documentation)) 891 890 892 891 (defun short-method-combination-operator (method-combination) … … 944 943 (find-class 'short-method-combination)))) 945 944 (setf (std-slot-value instance 'sys::name) ',name) 946 (setf (std-slot-value instance ' documentation) ',documentation)945 (setf (std-slot-value instance 'sys:%documentation) ',documentation) 947 946 (setf (std-slot-value instance 'operator) ',operator) 948 947 (setf (std-slot-value instance 'identity-with-one-argument) … … 1278 1277 1279 1278 (defun std-method-function (method) 1280 (std-slot-value method ' cl:function))1279 (std-slot-value method 'sys::%function)) 1281 1280 1282 1281 (defun std-method-generic-function (method) 1283 (std-slot-value method ' cl:generic-function))1282 (std-slot-value method 'sys::%generic-function)) 1284 1283 1285 1284 (defun std-method-specializers (method) … … 1290 1289 1291 1290 (defun std-accessor-method-slot-definition (accessor-method) 1292 (std-slot-value accessor-method 'sys: slot-definition))1291 (std-slot-value accessor-method 'sys::%slot-definition)) 1293 1292 1294 1293 ;;; Additional method readers … … 1373 1372 1374 1373 (defun method-documentation (method) 1375 (std-slot-value method ' documentation))1374 (std-slot-value method 'sys:%documentation)) 1376 1375 1377 1376 (defun (setf method-documentation) (new-value method) 1378 (setf (std-slot-value method ' documentation) new-value))1377 (setf (std-slot-value method 'sys:%documentation) new-value)) 1379 1378 1380 1379 ;;; defgeneric … … 1870 1869 (canonicalize-specializers specializers)) 1871 1870 (setf (method-documentation method) documentation) 1872 (setf (std-slot-value method ' generic-function) nil) ; set by add-method1873 (setf (std-slot-value method ' function) function)1871 (setf (std-slot-value method 'sys::%generic-function) nil) ; set by add-method 1872 (setf (std-slot-value method 'sys::%function) function) 1874 1873 (setf (std-slot-value method 'sys::fast-function) fast-function) 1875 1874 (setf (std-slot-value method 'sys::keywords) (getf analyzed-args :keywords)) … … 1904 1903 (when old-method 1905 1904 (std-remove-method gf old-method))) 1906 (setf (std-slot-value method ' generic-function) gf)1905 (setf (std-slot-value method 'sys::%generic-function) gf) 1907 1906 (push method (generic-function-methods gf)) 1908 1907 (dolist (specializer (method-specializers method)) … … 1914 1913 (setf (generic-function-methods gf) 1915 1914 (remove method (generic-function-methods gf))) 1916 (setf (std-slot-value method ' generic-function) nil)1915 (setf (std-slot-value method 'sys::%generic-function) nil) 1917 1916 (dolist (specializer (method-specializers method)) 1918 1917 (remove-direct-method specializer method)) … … 2567 2566 (canonicalize-specializers specializers)) 2568 2567 (setf (method-documentation method) documentation) 2569 (setf (std-slot-value method ' generic-function) nil)2570 (setf (std-slot-value method ' function) function)2568 (setf (std-slot-value method 'sys::%generic-function) nil) 2569 (setf (std-slot-value method 'sys::%function) function) 2571 2570 (setf (std-slot-value method 'sys::fast-function) fast-function) 2572 (setf (std-slot-value method 'sys: slot-definition) slot-definition)2571 (setf (std-slot-value method 'sys::%slot-definition) slot-definition) 2573 2572 (setf (std-slot-value method 'sys::keywords) nil) 2574 2573 (setf (std-slot-value method 'sys::other-keywords-p) nil) … … 3680 3679 (slot-definition-dispatch slot-definition 3681 3680 (%slot-definition-type slot-definition) 3682 (slot-value slot-definition ' cl:type))))3681 (slot-value slot-definition 'sys::%type)))) 3683 3682 3684 3683 (atomic-defgeneric (setf slot-definition-type) (value slot-definition) … … 3686 3685 (slot-definition-dispatch slot-definition 3687 3686 (set-slot-definition-type slot-definition value) 3688 (setf (slot-value slot-definition ' cl:type) value))))3687 (setf (slot-value slot-definition 'sys::%type) value)))) 3689 3688 3690 3689 (atomic-defgeneric slot-definition-documentation (slot-definition) … … 3692 3691 (slot-definition-dispatch slot-definition 3693 3692 (%slot-definition-documentation slot-definition) 3694 (slot-value slot-definition ' cl:documentation))))3693 (slot-value slot-definition 'sys:%documentation)))) 3695 3694 3696 3695 (atomic-defgeneric (setf slot-definition-documentation) (value slot-definition) … … 3698 3697 (slot-definition-dispatch slot-definition 3699 3698 (set-slot-definition-documentation slot-definition value) 3700 (setf (slot-value slot-definition ' cl:documentation) value))))3699 (setf (slot-value slot-definition 'sys:%documentation) value)))) 3701 3700 3702 3701
Note: See TracChangeset
for help on using the changeset viewer.