Changeset 11529
- Timestamp:
- 01/03/09 13:17:22 (15 years ago)
- Location:
- trunk/abcl
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/build.properties.in
r11528 r11529 1 1 # build.properties 2 2 # $Id: build.properties,v 1.23 2007-03-03 19:19:11 piso Exp $ 3 4 #additional.jars=${user.home}/work/lsw/lib/bsh-2.0b4.jar:${user.home}/work/lsw/lib/jscheme.jar5 #java.options=-Xmx2g6 7 #abcl.src.version=r14888+possibly-scripting8 9 10 #abcl.build.module=scripting -
trunk/abcl/nbproject/build-impl.xml
r11528 r11529 65 65 </condition> 66 66 <condition property="have.tests"> 67 <or> 68 <available file="${test.src.dir}"/> 69 </or> 67 <or/> 70 68 </condition> 71 69 <condition property="have.sources"> … … 126 124 <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> 127 125 <fail unless="src.dir">Must set src.dir</fail> 128 <fail unless="test.src.dir">Must set test.src.dir</fail>129 126 <fail unless="build.dir">Must set build.dir</fail> 130 127 <fail unless="dist.dir">Must set dist.dir</fail> … … 200 197 <sequential> 201 198 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true"> 202 <batchtest todir="${build.test.results.dir}"> 203 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> 204 <filename name="@{testincludes}"/> 205 </fileset> 206 </batchtest> 199 <batchtest todir="${build.test.results.dir}"/> 207 200 <classpath> 208 201 <path path="${run.test.classpath}"/> … … 509 502 </target> 510 503 <target if="do.depend.true" name="-compile-test-depend"> 511 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=" ${test.src.dir}"/>504 <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=""/> 512 505 </target> 513 506 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> 514 <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> 515 <copy todir="${build.test.classes.dir}"> 516 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> 517 </copy> 507 <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir=""/> 508 <copy todir="${build.test.classes.dir}"/> 518 509 </target> 519 510 <target name="-post-compile-test"> … … 529 520 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> 530 521 <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> 531 <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> 532 <copy todir="${build.test.classes.dir}"> 533 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> 534 </copy> 522 <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="" srcdir=""/> 523 <copy todir="${build.test.classes.dir}"/> 535 524 </target> 536 525 <target name="-post-compile-test-single"> -
trunk/abcl/nbproject/genfiles.properties
r11528 r11529 4 4 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 5 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 nbproject/build-impl.xml.data.CRC32=7 42204ce7 nbproject/build-impl.xml.script.CRC32= b94c76f86 nbproject/build-impl.xml.data.CRC32=71623fcd 7 nbproject/build-impl.xml.script.CRC32=7d8238bd 8 8 nbproject/build-impl.xml.stylesheet.CRC32=e55b27f5 9 9 nbproject/profiler-build-impl.xml.data.CRC32=71623fcd -
trunk/abcl/nbproject/project.properties
r11528 r11529 18 18 dist.jar=${dist.dir}/abcl.jar 19 19 dist.javadoc.dir=${dist.dir}/javadoc 20 excludes= org/armedbear/lisp/scripting/*.java20 excludes= 21 21 file.reference.abcl-src=src 22 22 includes=org/armedbear/lisp/**/*.java,org/armedbear/lisp/**/*.lisp 23 23 jar.compress=true 24 javac.classpath=25 24 # Space-separated list of extra javac options 26 25 javac.compilerargs= … … 67 66 src.doc.dir=doc 68 67 src.themes.dir=themes 69 test.src.dir=test/src -
trunk/abcl/nbproject/project.xml
r11528 r11529 9 9 <root id="src.dir"/> 10 10 </source-roots> 11 <test-roots> 12 <root id="test.src.dir" name="test/src"/> 13 </test-roots> 11 <test-roots/> 14 12 </data> 15 13 </configuration> -
trunk/abcl/netbeans-build.xml
r11528 r11529 6 6 probably fail otherwise. --> 7 7 <import file="nbproject/build-impl.xml"/> 8 <import file="nbproject/profiler-build-impl.xml" optional="true"/>9 8 10 9 <target name="-post-compile"> -
trunk/abcl/src/org/armedbear/lisp/Autoload.java
r11528 r11529 453 453 autoload("probe-file", "probe_file"); 454 454 autoload("rational", "FloatFunctions"); 455 autoload("read-char-no-hang", "read_char_no_hang");456 autoload("read-delimited-list", "read_delimited_list");457 455 autoload("rem", "rem"); 458 456 autoload("remhash", "HashTableFunctions"); … … 516 514 autoload(PACKAGE_EXT, "thread-unlock", "ThreadLock", true); 517 515 autoload(PACKAGE_JAVA, "%jnew-proxy", "JProxy"); 518 autoload(PACKAGE_JAVA, "%find-java-class", "JavaClass");519 autoload(PACKAGE_JAVA, "%jmake-invocation-handler", "JProxy");520 autoload(PACKAGE_JAVA, "%jmake-proxy", "JProxy");521 516 autoload(PACKAGE_JAVA, "%jnew-runtime-class", "RuntimeClass"); 522 517 autoload(PACKAGE_JAVA, "%jredefine-method", "RuntimeClass"); -
trunk/abcl/src/org/armedbear/lisp/Closure.java
r11528 r11529 596 596 SpecialBinding lastSpecialBinding = thread.lastSpecialBinding; 597 597 Environment ext = new Environment(environment); 598 for (Symbol special: specials)599 ext.declareSpecial(special);600 598 bindRequiredParameters(ext, thread, first, second, third, fourth, 601 599 fifth, sixth, seventh); -
trunk/abcl/src/org/armedbear/lisp/StandardClass.java
r11528 r11529 124 124 addStandardClass(Symbol.BUILT_IN_CLASS, list1(CLASS)); 125 125 126 public static final StandardClass JAVA_CLASS =127 addStandardClass(Symbol.JAVA_CLASS, list1(CLASS));128 129 126 public static final StandardClass FORWARD_REFERENCED_CLASS = 130 127 addStandardClass(Symbol.FORWARD_REFERENCED_CLASS, list1(CLASS)); … … 283 280 list1(PACKAGE_CL.intern("ARITHMETIC-ERROR-OPERANDS"))))); 284 281 BUILT_IN_CLASS.setCPL(BUILT_IN_CLASS, CLASS, STANDARD_OBJECT, 285 BuiltInClass.CLASS_T);286 JAVA_CLASS.setCPL(JAVA_CLASS, CLASS, STANDARD_OBJECT,287 282 BuiltInClass.CLASS_T); 288 283 CELL_ERROR.setCPL(CELL_ERROR, ERROR, SERIOUS_CONDITION, CONDITION, -
trunk/abcl/src/org/armedbear/lisp/Symbol.java
r11528 r11529 2901 2901 public static final Symbol JAVA_OBJECT = 2902 2902 PACKAGE_JAVA.addExternalSymbol("JAVA-OBJECT"); 2903 public static final Symbol JAVA_CLASS =2904 PACKAGE_JAVA.addExternalSymbol("JAVA-CLASS");2905 2903 public static final Symbol JCALL = 2906 2904 PACKAGE_JAVA.addExternalSymbol("JCALL"); -
trunk/abcl/src/org/armedbear/lisp/Version.java
r11528 r11529 42 42 public static String getVersion() 43 43 { 44 return "0.1 2.25";44 return "0.13.0-dev"; 45 45 } 46 46 } -
trunk/abcl/src/org/armedbear/lisp/autoloads.lisp
r11528 r11529 202 202 (export 'jobject-class "JAVA") 203 203 (autoload 'jobject-class "java") 204 (export 'jproperty-value "JAVA")205 (autoload 'jproperty-value "java")206 204 (export 'jclass-superclass "JAVA") 207 205 (autoload 'jclass-superclass "java") -
trunk/abcl/src/org/armedbear/lisp/java.lisp
r11528 r11529 76 76 (apply #'%jnew-proxy interface method-names-and-defs))) 77 77 78 (defun jmake-invocation-handler (function)79 (%jmake-invocation-handler function))80 81 (when (autoloadp 'jmake-proxy)82 (fmakunbound 'jmake-proxy))83 84 (defgeneric jmake-proxy (interface implementation &optional lisp-this)85 (:documentation "Returns a proxy Java object implementing the86 provided interface using methods implemented in Lisp - typically87 closures, but implementations are free to provide other88 mechanisms. You can pass an optional 'lisp-this' object that will89 be passed to the implementing methods as their first argument. If90 you don't provide this object, NIL will be used. The second91 argument of the Lisp methods is the name of the Java method being92 implemented. This has the implication that overloaded methods are93 merged, so you have to manually discriminate them if you want94 to. The remaining arguments are java-objects wrapping the method's95 parameters."))96 97 (defmethod jmake-proxy (interface invocation-handler &optional lisp-this)98 "Basic implementation that directly uses an invocation handler."99 (%jmake-proxy (jclass interface) invocation-handler lisp-this))100 101 (defmethod jmake-proxy (interface (implementation function) &optional lisp-this)102 "Implements a Java interface forwarding method calls to a Lisp function."103 (%jmake-proxy (jclass interface) (jmake-invocation-handler implementation) lisp-this))104 105 (defmethod jmake-proxy (interface (implementation package) &optional lisp-this)106 "Implements a Java interface mapping Java method names to symbols107 in a given package. javaMethodName is mapped to a JAVA-METHOD-NAME108 symbol. An error is signaled if no such symbol exists in the package,109 or if the symbol exists but does not name a function."110 111 (flet ((java->lisp (name)112 (with-output-to-string (str)113 (let ((last-lower-p nil))114 (map nil (lambda (char)115 (let ((upper-p (char= (char-upcase char) char)))116 (when (and last-lower-p upper-p)117 (princ "-" str))118 (setf last-lower-p (not upper-p))119 (princ (char-upcase char) str)))120 name)))))121 (%jmake-proxy (jclass interface)122 (jmake-invocation-handler123 (lambda (obj method &rest args)124 (let ((sym (find-symbol125 (java->lisp method)126 implementation)))127 (unless sym128 (error "Symbol ~A, implementation of method ~A, not found in ~A"129 (java->lisp method)130 method131 implementation))132 (if (fboundp sym)133 (apply (symbol-function sym) obj method args)134 (error "Function ~A, implementation of method ~A, not found in ~A"135 sym method implementation)))))136 lisp-this)))137 138 (defmethod jmake-proxy (interface (implementation hash-table) &optional lisp-this)139 "Implements a Java interface using closures in an hash-table keyed140 by Java method name."141 (%jmake-proxy (jclass interface)142 (jmake-invocation-handler143 (lambda (obj method &rest args)144 (let ((fn (gethash method implementation)))145 (if fn146 (apply fn obj args)147 (error "Implementation for method ~A not found in ~A"148 method implementation)))))149 lisp-this))150 151 78 (defun jobject-class (obj) 152 79 "Returns the Java class that OBJ belongs to" … … 307 234 308 235 (provide "JAVA-EXTENSIONS") 309 (defun jproperty-value (obj prop)310 (%jget-property-value obj prop))311 312 (defun (setf jproperty-value) (value obj prop)313 (%jset-property-value obj prop value))314 -
trunk/abcl/src/org/armedbear/lisp/print-object.lisp
r11528 r11529 50 50 (format stream "~S" (class-name (class-of object)))) 51 51 object) 52 53 (defmethod print-object ((class java:java-class) stream)54 (write-string (%write-to-string class) stream))55 52 56 53 (defmethod print-object ((class class) stream) … … 124 121 (if *print-escape* 125 122 (print-unreadable-object (e stream :type t :identity t) 126 (format stream "~A"127 (java:jcall (java:jmethod "java.lang.Object" "toString")128 (java:java-exception-cause e))))129 (format stream "Java exception '~A'."130 (java:jcall (java:jmethod "java.lang.Object" "toString")131 (java:java-exception-cause e)))))132 133 (defmethod print-object ((e java:java-exception) stream)134 (if *print-escape*135 (print-unreadable-object (e stream :type t :identity t)136 123 (format stream "~A" 137 124 (java:jcall (java:jmethod "java.lang.Object" "toString")
Note: See TracChangeset
for help on using the changeset viewer.