1 21 22 package org.armedbear.lisp; 23 24 public final class function_info extends Lisp 25 { 26 static { 27 FUNCTION_TABLE = new EqualHashTable(64, NIL, NIL); 28 } 29 30 private static final Primitive1 FUNCTION_INFO = 32 new Primitive1("function-info", PACKAGE_SYS, false) 33 { 34 public LispObject execute(LispObject arg) throws ConditionThrowable 35 { 36 LispObject info = FUNCTION_TABLE.get(arg); 37 return info != null ? info : NIL; 38 } 39 }; 40 41 private static final Primitive2 _SET_FUNCTION_INFO = 43 new Primitive2("%set-function-info", PACKAGE_SYS, false) 44 { 45 public LispObject execute(LispObject first, LispObject second) 46 throws ConditionThrowable 47 { 48 if (second == NIL) 49 FUNCTION_TABLE.remhash(first); 50 FUNCTION_TABLE.put(first, second); 51 return second; 52 } 53 }; 54 } 55 | Popular Tags |