Changeset 12932


Ignore:
Timestamp:
10/01/10 08:24:41 (11 years ago)
Author:
ehuelsmann
Message:

Fix #88: "We need SYS:COMPILED-LISP-FUNCTION-P" to distinguish
Java-defined and Lisp-defined functions (for SLIME).

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Primitives.java

    r12809 r12932  
    199199        }
    200200    };
     201
     202    // ### compiled-lisp-function-p
     203    private static final Primitive COMPILED_LISP_FUNCTION_P =
     204        new pf_compiled_lisp_function_p();
     205    private static final class pf_compiled_lisp_function_p extends Primitive {
     206        pf_compiled_lisp_function_p() {
     207            super(Symbol.COMPILED_LISP_FUNCTION_P, "object");
     208        }
     209
     210        @Override
     211        public LispObject execute(LispObject arg) {
     212            return (arg instanceof CompiledClosure
     213                    || arg instanceof CompiledPrimitive) ? T : NIL;
     214        }
     215    }
    201216
    202217    // ### consp
  • trunk/abcl/src/org/armedbear/lisp/Symbol.java

    r12930 r12932  
    29872987  public static final Symbol _CLASS_SLOTS =
    29882988    PACKAGE_SYS.addExternalSymbol("%CLASS-SLOTS");
     2989  public static final Symbol COMPILED_LISP_FUNCTION_P =
     2990    PACKAGE_SYS.addExternalSymbol("COMPILED-LISP-FUNCTION-P");
    29892991  public static final Symbol LAYOUT =
    29902992    PACKAGE_SYS.addExternalSymbol("LAYOUT");
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r12918 r12932  
    809809         (*current-code-attribute* code))
    810810    (setf (code-max-locals code) 1)
    811     (unless (eq super +lisp-primitive+)
     811    (unless (eq super +lisp-compiled-primitive+)
    812812      (multiple-value-bind
    813813            (req opt key key-p rest
     
    877877                                            +lisp-object+ +lisp-object+))))))
    878878    (aload 0) ;; this
    879     (cond ((eq super +lisp-primitive+)
     879    (cond ((eq super +lisp-compiled-primitive+)
    880880           (emit-constructor-lambda-name lambda-name)
    881881           (emit-constructor-lambda-list args)
     
    70517051      (and *child-p* *closure-variables*))
    70527052        +lisp-compiled-closure+
    7053       +lisp-primitive+))
     7053      +lisp-compiled-primitive+))
    70547054
    70557055    (setf (abcl-class-file-lambda-list class-file) args)
  • trunk/abcl/src/org/armedbear/lisp/jvm-class-file.lisp

    r12918 r12932  
    168168(define-class-name +lisp-go+ "org.armedbear.lisp.Go")
    169169(define-class-name +lisp-primitive+ "org.armedbear.lisp.Primitive")
     170(define-class-name +lisp-compiled-primitive+
     171    "org.armedbear.lisp.CompiledPrimitive")
    170172(define-class-name +lisp-eql-hash-table+ "org.armedbear.lisp.EqlHashTable")
    171173(define-class-name +lisp-hash-table+ "org.armedbear.lisp.HashTable")
Note: See TracChangeset for help on using the changeset viewer.