[armedbear-cvs] r14448 - trunk/abcl/src/org/armedbear/lisp

rschlatte at common-lisp.net rschlatte at common-lisp.net
Wed Mar 27 10:30:01 UTC 2013


Author: rschlatte
Date: Wed Mar 27 03:29:58 2013
New Revision: 14448

Log:
Remove most references to StandardGenericFunction

- use TYPEP or "instanceof FuncallableStandardObject" instead

Modified:
   trunk/abcl/src/org/armedbear/lisp/Lisp.java
   trunk/abcl/src/org/armedbear/lisp/LispObject.java
   trunk/abcl/src/org/armedbear/lisp/Profiler.java
   trunk/abcl/src/org/armedbear/lisp/Readtable.java
   trunk/abcl/src/org/armedbear/lisp/SpecialOperators.java

Modified: trunk/abcl/src/org/armedbear/lisp/Lisp.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Lisp.java	Sun Mar 24 12:15:26 2013	(r14447)
+++ trunk/abcl/src/org/armedbear/lisp/Lisp.java	Wed Mar 27 03:29:58 2013	(r14448)
@@ -1809,7 +1809,7 @@
   {
     if (obj instanceof Function)
       return obj;
-    if (obj instanceof StandardGenericFunction)
+    if (obj instanceof FuncallableStandardObject)
       return obj;
     if (obj instanceof Symbol)
       {

Modified: trunk/abcl/src/org/armedbear/lisp/LispObject.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/LispObject.java	Sun Mar 24 12:15:26 2013	(r14447)
+++ trunk/abcl/src/org/armedbear/lisp/LispObject.java	Wed Mar 27 03:29:58 2013	(r14448)
@@ -670,10 +670,8 @@
                     SimpleString doc = new SimpleString(docstring);
                     ((Symbol)this).setDocumentation(Symbol.FUNCTION, doc);
                     return doc;
-                } else if (fn instanceof StandardGenericFunction) {
-                    return 
-                        StandardGenericFunction.checkStandardGenericFunction(fn)
-                        .slots[StandardGenericFunctionClass.SLOT_INDEX_DOCUMENTATION];
+                } else if (fn.typep(StandardClass.STANDARD_GENERIC_FUNCTION) != NIL) {
+                    return Symbol.SLOT_VALUE.execute(fn, Symbol._DOCUMENTATION);
                 }
             }
         }

Modified: trunk/abcl/src/org/armedbear/lisp/Profiler.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Profiler.java	Sun Mar 24 12:15:26 2013	(r14447)
+++ trunk/abcl/src/org/armedbear/lisp/Profiler.java	Wed Mar 27 03:29:58 2013	(r14448)
@@ -72,7 +72,7 @@
                             object.setCallCount(0);
                             object.setHotCount(0);
                             LispObject methods = null;
-                            if (object instanceof StandardGenericFunction) {
+                            if (object.typep(StandardClass.STANDARD_GENERIC_FUNCTION) != NIL) {
                                 methods =
                                     Symbol.GENERIC_FUNCTION_METHODS.execute(object);
                             }

Modified: trunk/abcl/src/org/armedbear/lisp/Readtable.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Readtable.java	Sun Mar 24 12:15:26 2013	(r14447)
+++ trunk/abcl/src/org/armedbear/lisp/Readtable.java	Wed Mar 27 03:29:58 2013	(r14448)
@@ -415,7 +415,7 @@
         char c = LispCharacter.getValue(first);
         final LispObject designator;
         if (second instanceof Function
-            || second instanceof StandardGenericFunction)
+            || second instanceof FuncallableStandardObject)
           designator = second;
         else if (second instanceof Symbol)
           designator = second;

Modified: trunk/abcl/src/org/armedbear/lisp/SpecialOperators.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/SpecialOperators.java	Sun Mar 24 12:15:26 2013	(r14447)
+++ trunk/abcl/src/org/armedbear/lisp/SpecialOperators.java	Wed Mar 27 03:29:58 2013	(r14448)
@@ -469,7 +469,7 @@
                 }
                 if (operator instanceof Function)
                     return operator;
-                if (operator instanceof StandardGenericFunction)
+                if (operator instanceof FuncallableStandardObject)
                     return operator;
                 return error(new UndefinedFunction(arg));
             }




More information about the armedbear-cvs mailing list