[armedbear-cvs] r12852 - branches/generic-class-file/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Mon Aug 2 10:48:47 UTC 2010
Author: ehuelsmann
Date: Mon Aug 2 06:48:45 2010
New Revision: 12852
Log:
Convert GENERATE-LOADER-FUNCTION to use CLASS-NAMEs
instead of literal strings.
Modified:
branches/generic-class-file/abcl/src/org/armedbear/lisp/compile-file.lisp
Modified: branches/generic-class-file/abcl/src/org/armedbear/lisp/compile-file.lisp
==============================================================================
--- branches/generic-class-file/abcl/src/org/armedbear/lisp/compile-file.lisp (original)
+++ branches/generic-class-file/abcl/src/org/armedbear/lisp/compile-file.lisp Mon Aug 2 06:48:45 2010
@@ -672,6 +672,9 @@
(ncase ,expr ,middle ,max ,@(subseq clauses half)))
`(case ,expr , at clauses))))
+(defconstant +fasl-classloader+
+ (jvm::make-class-name "org.armedbear.lisp.FaslClassLoader"))
+
(defun generate-loader-function ()
(let* ((basename (base-classname))
(expr `(lambda (fasl-loader fn-index)
@@ -680,19 +683,22 @@
,@(loop
:for i :from 1 :to *class-number*
:collect
- (let ((class (%format nil "org/armedbear/lisp/~A_~A" basename i)))
+ (let* ((class (%format nil "org/armedbear/lisp/~A_~A"
+ basename i))
+ (class-name (jvm::make-class-name class)))
`(,(1- i)
(jvm::with-inline-code ()
(jvm::emit 'jvm::aload 1)
(jvm::emit-invokevirtual jvm::+lisp-object+ "javaInstance"
nil jvm::+java-object+)
- (jvm::emit 'jvm::checkcast "org/armedbear/lisp/FaslClassLoader")
+ (jvm::emit 'jvm::checkcast +fasl-classloader+)
(jvm::emit 'jvm::dup)
(jvm::emit-push-constant-int ,(1- i))
- (jvm::emit 'jvm::new ,class)
+ (jvm::emit 'jvm::new ,class-name)
(jvm::emit 'jvm::dup)
- (jvm::emit-invokespecial-init ,class '())
- (jvm::emit-invokevirtual "org/armedbear/lisp/FaslClassLoader" "putFunction"
+ (jvm::emit-invokespecial-init ,class-name '())
+ (jvm::emit-invokevirtual +fasl-classloader+
+ "putFunction"
(list "I" jvm::+lisp-object+) jvm::+lisp-object+)
(jvm::emit 'jvm::pop))
t))))))
More information about the armedbear-cvs
mailing list