Changeset 14494
- Timestamp:
- 05/07/13 08:01:24 (10 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Primitives.java
r14493 r14494 2658 2658 value2 = T; 2659 2659 value3 = ((Function)arg).getLambdaName(); 2660 } else if (arg instanceof StandardGenericFunction) {2660 } else if (arg.typep(StandardClass.GENERIC_FUNCTION) != NIL) { 2661 2661 value1 = NIL; 2662 2662 value2 = T; 2663 value3 = ((StandardGenericFunction)arg).getInstanceSlotValue(Symbol.NAME);2663 value3 = Symbol.GENERIC_FUNCTION_NAME.execute(arg); 2664 2664 } else if (arg instanceof FuncallableStandardObject) { 2665 2665 return this.execute(((FuncallableStandardObject)arg).function); … … 4221 4221 return ((Operator)arg).getLambdaName(); 4222 4222 } 4223 if (arg instanceof StandardGenericFunction) {4224 return ((StandardGenericFunction)arg).getInstanceSlotValue(Symbol.NAME);4223 if (arg.typep(StandardClass.GENERIC_FUNCTION) != NIL) { 4224 return Symbol.GENERIC_FUNCTION_NAME.execute(arg); 4225 4225 } 4226 4226 if (arg instanceof FuncallableStandardObject) { … … 4246 4246 return second; 4247 4247 } 4248 if (first instanceof StandardGenericFunction) { 4249 ((StandardGenericFunction)first).setInstanceSlotValue(Symbol.NAME, second); 4248 // KLUDGE: this isn't fully general, but lots of other stuff 4249 // will break for generic functions that aren't subclasses 4250 // of standard-generic-function as well. 4251 if (first.typep(StandardClass.STANDARD_GENERIC_FUNCTION) != NIL) { 4252 ((StandardObject)first).setInstanceSlotValue(Symbol.NAME, second); 4250 4253 return second; 4251 4254 } -
trunk/abcl/src/org/armedbear/lisp/Symbol.java
r14490 r14494 3006 3006 public static final Symbol GENERIC_FUNCTION_METHODS = 3007 3007 PACKAGE_MOP.addExternalSymbol("GENERIC-FUNCTION-METHODS"); 3008 public static final Symbol GENERIC_FUNCTION_NAME = 3009 PACKAGE_MOP.addExternalSymbol("GENERIC-FUNCTION-NAME"); 3008 3010 public static final Symbol METAOBJECT = 3009 3011 PACKAGE_MOP.addExternalSymbol("METAOBJECT"); -
trunk/abcl/src/org/armedbear/lisp/mop.lisp
r14103 r14494 1 ;;;; Does not currently include all the MOP, but it should. 1 2 2 3 3 (in-package #:mop) 4 5 ;;; StandardGenericFunction.java defines FUNCALLABLE-INSTANCE-FUNCTION and6 ;;; SET-FUNCALLABLE-INSTANCE-FUNCTION.7 ;;;8 ;;; TODO9 ;;;10 ;;; 1. Verify that we can make FUNCALLABLE-STANDARD-CLASS instances11 ;;; which work.12 ;;;13 ;;; 2. Tighten the type checks so that only instances of14 ;;; FUNCALLABLE-STANDARD-CLASS are callable.15 4 16 5 ;;; AMOP pg. 240ff.
Note: See TracChangeset
for help on using the changeset viewer.