Changeset 13777
- Timestamp:
- 01/15/12 13:06:26 (11 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java
r13775 r13777 67 67 slots[StandardGenericFunctionClass.SLOT_INDEX_REQUIRED_ARGS] = 68 68 lambdaList; 69 slots[StandardGenericFunctionClass.SLOT_INDEX_OPTIONAL_ARGS] = 70 NIL; 69 71 numberOfRequiredArgs = lambdaList.length(); 70 72 slots[StandardGenericFunctionClass.SLOT_INDEX_INITIAL_METHODS] = … … 248 250 }; 249 251 252 private static final Primitive GF_OPTIONAL_ARGS 253 = new pf_gf_optional_args(); 254 @DocString(name="gf-optional-args") 255 private static final class pf_gf_optional_args extends Primitive 256 { 257 pf_gf_optional_args() 258 { 259 super("gf-optional-args", PACKAGE_SYS, true); 260 } 261 @Override 262 public LispObject execute(LispObject arg) 263 { 264 return checkStandardGenericFunction(arg).slots[StandardGenericFunctionClass.SLOT_INDEX_OPTIONAL_ARGS]; 265 } 266 }; 267 268 private static final Primitive _SET_GF_OPTIONAL_ARGS 269 = new pf__set_gf_optional_args(); 270 @DocString(name="%set-gf-optional-args") 271 private static final class pf__set_gf_optional_args extends Primitive 272 { 273 pf__set_gf_optional_args() 274 { 275 super("%set-gf-optional-args", PACKAGE_SYS, true); 276 } 277 @Override 278 public LispObject execute(LispObject first, LispObject second) 279 { 280 final StandardGenericFunction gf = checkStandardGenericFunction(first); 281 gf.slots[StandardGenericFunctionClass.SLOT_INDEX_OPTIONAL_ARGS] = second; 282 return second; 283 } 284 }; 285 250 286 private static final Primitive GENERIC_FUNCTION_INITIAL_METHODS 251 287 = new pf_generic_function_initial_methods(); -
trunk/abcl/src/org/armedbear/lisp/StandardGenericFunctionClass.java
r12288 r13777 41 41 public static final int SLOT_INDEX_LAMBDA_LIST = 1; 42 42 public static final int SLOT_INDEX_REQUIRED_ARGS = 2; 43 public static final int SLOT_INDEX_INITIAL_METHODS = 3; 44 public static final int SLOT_INDEX_METHODS = 4; 45 public static final int SLOT_INDEX_METHOD_CLASS = 5; 46 public static final int SLOT_INDEX_METHOD_COMBINATION = 6; 47 public static final int SLOT_INDEX_ARGUMENT_PRECEDENCE_ORDER = 7; 48 public static final int SLOT_INDEX_CLASSES_TO_EMF_TABLE = 8; 49 public static final int SLOT_INDEX_DOCUMENTATION = 9; 43 public static final int SLOT_INDEX_OPTIONAL_ARGS = 3; 44 public static final int SLOT_INDEX_INITIAL_METHODS = 4; 45 public static final int SLOT_INDEX_METHODS = 5; 46 public static final int SLOT_INDEX_METHOD_CLASS = 6; 47 public static final int SLOT_INDEX_METHOD_COMBINATION = 7; 48 public static final int SLOT_INDEX_ARGUMENT_PRECEDENCE_ORDER = 8; 49 public static final int SLOT_INDEX_CLASSES_TO_EMF_TABLE = 9; 50 public static final int SLOT_INDEX_DOCUMENTATION = 10; 50 51 51 52 public StandardGenericFunctionClass() … … 59 60 pkg.intern("LAMBDA-LIST"), 60 61 pkg.intern("REQUIRED-ARGS"), 62 pkg.intern("OPTIONAL-ARGS"), 61 63 pkg.intern("INITIAL-METHODS"), 62 64 pkg.intern("METHODS"),
Note: See TracChangeset
for help on using the changeset viewer.