source: trunk/abcl/examples/misc/dotabclrc @ 13953

Last change on this file since 13953 was 13953, checked in by Mark Evenson, 9 years ago

Customize the disassembler used locally to analyze JVM bytecode.

File size: 3.0 KB
Line 
1;;; -*- Mode: Lisp -*-
2
3;;; See also:
4;;;   .clinit.cl         (Allegro)
5;;;   .cmucl-init.lisp   (CMUCL)
6;;;   .sbclrc            (SBCL)
7;;;   .clisprc.lisp      (CLISP)
8;;;   .lispworks         (LispWorks)
9
10;;; Customize the procedure used by CL:DISASSEMBLE
11(progn
12  (setf *disassembler*       
13        (let ((strategies (list
14                                   (lambda (p)
15                                     (let ((class (make-pathname :name (pathname-name p)))
16                                           (path (directory-namestring p)))
17                                       (format nil "javap -c -l -verbose -classpath ~A ~A" path class))
18                                     "/Users/evenson/bin/jad -a -p"
19                                     (lambda (p)
20                                       (format nil "java -jar ~
21/Users/evenson/work/classfileanalyzer/classfileanalyzer.jar ~A"
22                                               p))))))
23          (first strategies))))
24
25
26(defparameter *ansi-tests-directory*
27  #-(or windows mswindows win32)
28  #p"/home/peter/xcl/x/ansi-tests/"
29  #+(or windows mswindows win32)
30  #p"c:\\msys\\1.0\\home\\peter\\xcl\\x\ansi-tests\\")
31
32(defun run-ansi-tests (&optional (compile-tests t))
33  (format t "COMPILE-TESTS is ~A~%" compile-tests)
34  (let ((*default-pathname-defaults* *ansi-tests-directory*))
35    #+(and abcl unix)
36    (run-shell-command "make clean" :directory *default-pathname-defaults*)
37    (time (load (if compile-tests "compileit.lsp" "doit.lsp")))))
38
39(defun run-random-tests (size nvars count)
40  (let ((*default-pathname-defaults* *ansi-tests-directory*))
41    (load "gclload1.lsp")
42    (load "random-int-form.lsp")
43    (let ((f (find-symbol "TEST-RANDOM-INTEGER-FORMS" "CL-TEST")))
44      (when f
45        (let (#+abcl (*suppress-compiler-warnings* t)
46              (*random-state* (make-random-state t)))
47          (time (funcall f size nvars count)))))))
48
49#+(or abcl sbcl clisp)
50(defun test-cl-ppcre ()
51  #+abcl (require "JVM")
52  (let ((*default-pathname-defaults* #-(or windows mswindows win32)
53                                     #p"/home/peter/cl-ppcre-1.2.19/"
54                                     #+(or windows mswindows win32)
55                                     #p"c:\\cygwin\\home\\peter\\cl-ppcre-1.2.19\\"))
56    #+abcl
57    (map nil #'delete-file (directory "*.abcl"))
58    #+sbcl
59    (map nil #'delete-file (directory "*.fasl"))
60    (load "load.lisp")
61    (let ((f (find-symbol "TEST" "CL-PPCRE-TEST")))
62      (when f
63        #+abcl (gc)
64        (time (funcall f))
65        #+abcl (gc)
66        (time (funcall f))))))
67
68#+abcl
69(defun run-other-tests ()
70  (test-cl-ppcre)
71  (let ((*default-pathname-defaults* "/home/peter/salza-0.7.2/"))
72    (map nil #'delete-file (directory "*.abcl"))
73    (load "/home/peter/test-salza.lisp")
74    (gc)
75    (test-salza)
76    (gc)
77    (test-salza)))
78
79#+abcl
80(autoload 'do-tests "rt.lisp")
81
82#+allegro
83(top-level:alias "ap" (arg) (apropos arg nil nil t))
84#+allegro
85(top-level:alias "de" (arg) (describe (eval arg)))
86
87#+cmu
88(setf *gc-verbose* nil)
89
90;; #+sbcl
91;; (require '#:asdf)
92;; #+sbcl
93;; (require '#:sb-aclrepl)
Note: See TracBrowser for help on using the repository browser.