[armedbear-cvs] r12529 - branches/metaclass/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sat Mar 13 22:51:25 UTC 2010
Author: ehuelsmann
Date: Sat Mar 13 17:51:23 2010
New Revision: 12529
Log:
Re #38: CLASSP can't be checked with instanceof alone any longer.
Modified:
branches/metaclass/abcl/src/org/armedbear/lisp/Primitives.java
branches/metaclass/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
Modified: branches/metaclass/abcl/src/org/armedbear/lisp/Primitives.java
==============================================================================
--- branches/metaclass/abcl/src/org/armedbear/lisp/Primitives.java (original)
+++ branches/metaclass/abcl/src/org/armedbear/lisp/Primitives.java Sat Mar 13 17:51:23 2010
@@ -5603,7 +5603,7 @@
@Override
public LispObject execute(LispObject arg) {
- return arg instanceof LispClass ? T : NIL;
+ return (arg instanceof LispClass) ? T : arg.typep(Symbol.CLASS);
}
};
Modified: branches/metaclass/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- branches/metaclass/abcl/src/org/armedbear/lisp/compiler-pass2.lisp (original)
+++ branches/metaclass/abcl/src/org/armedbear/lisp/compiler-pass2.lisp Sat Mar 13 17:51:23 2010
@@ -3402,7 +3402,6 @@
(BIT-VECTOR-P p2-test-bit-vector-p)
(CHAR= p2-test-char=)
(CHARACTERP p2-test-characterp)
- (CLASSP p2-test-classp)
(CONSP p2-test-consp)
(CONSTANTP p2-test-constantp)
(ENDP p2-test-endp)
@@ -3543,9 +3542,6 @@
(defun p2-test-special-variable-p (form)
(p2-test-predicate form "isSpecialVariable"))
-(defun p2-test-classp (form)
- (p2-test-instanceof-predicate form +lisp-class-class+))
-
(defun p2-test-symbolp (form)
(p2-test-instanceof-predicate form +lisp-symbol-class+))
@@ -4827,9 +4823,6 @@
(defun p2-characterp (form target representation)
(p2-instanceof-predicate form target representation +lisp-character-class+))
-(defun p2-classp (form target representation)
- (p2-instanceof-predicate form target representation +lisp-class-class+))
-
(defun p2-consp (form target representation)
(p2-instanceof-predicate form target representation +lisp-cons-class+))
@@ -8875,7 +8868,6 @@
(install-p2-handler 'java:jmethod 'p2-java-jmethod)
(install-p2-handler 'char= 'p2-char=)
(install-p2-handler 'characterp 'p2-characterp)
- (install-p2-handler 'classp 'p2-classp)
(install-p2-handler 'coerce-to-function 'p2-coerce-to-function)
(install-p2-handler 'cons 'p2-cons)
(install-p2-handler 'sys::backq-cons 'p2-cons)
More information about the armedbear-cvs
mailing list