Changeset 14945


Ignore:
Timestamp:
01/12/17 11:16:29 (5 years ago)
Author:
Mark Evenson
Message:

abcl-introspect: mark version as failing to load.

But otherwise the SLIME integration branch as of
<https://gitlab.common-lisp.net/slime/slime/commit/ac18767ac4426058a8d54a42b6857f30c4fab208>
works with abcl-1.5.0-dev as of 2016-Jan-12.

Location:
trunk/abcl/contrib/abcl-introspect
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/contrib/abcl-introspect/abcl-introspect.asd

    r14939 r14945  
    44(asdf:defsystem :abcl-introspect
    55  :author "Alan Ruttenberg"
    6   :version "1.0.0"
    7   :description "Introspection on compiled function to aid source location other debugging functions."
     6  :version "1.0.1"
     7  :description "Introspection on compiled function to aid source location and other debugging functions."
    88  :depends-on (jss)
    99  :components ((:file "abcl-introspect")))
  • trunk/abcl/contrib/abcl-introspect/abcl-introspect.lisp

    r14937 r14945  
    6767    collect
    6868    (java::jcall "get" (load-time-value (java::jclass-field "org.armedbear.lisp.ClosureBinding" "value")) binding))))
    69    
     69
     70;;; FIXME:  failing to load with abcl-1.5.0-dev-20170112
    7071(defun foreach-internal-field (fn-fn not-fn-fn &optional (fns :all) (definer nil))
    7172  "fn-n gets called with top, internal function, not-fn-fn gets called with top anything-but"
    72   (declare (optimize (speed 3) (safety 0)))
     73  (declare (optimize (debug 3)
     74                     #+nil
     75                     (speed 3)
     76                     (safety 3)))
    7377  (macrolet ((fields (c) `(java::jcall ,(java::jmethod "java.lang.Class" "getDeclaredFields") ,c))
    7478       (get (f i) `(java::jcall ,(java::jmethod "java.lang.reflect.Field" "get" "java.lang.Object") ,f ,i))
     
    311315;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    312316     
    313 (defun get-pid ()
    314   "Get the process identifier of this lisp process. Used to be in
    315   slime but generally useful, so now back in abcl proper."
    316   (handler-case
    317       (let* ((runtime
    318               (java::jstatic "getRuntime" "java.lang.Runtime"))
    319              (command
    320               (java::jnew-array-from-array
    321                "java.lang.String" #("sh" "-c" "echo $PPID")))
    322              (runtime-exec-jmethod
    323               ;; Complicated because java.lang.Runtime.exec() is
    324               ;; overloaded on a non-primitive type (array of
    325               ;; java.lang.String), so we have to use the actual
    326               ;; parameter instance to get java.lang.Class
    327               (java::jmethod "java.lang.Runtime" "exec"
    328                             (java::jcall
    329                              (java::jmethod "java.lang.Object" "getClass")
    330                              command)))
    331              (process
    332               (java::jcall runtime-exec-jmethod runtime command))
    333              (output
    334               (java::jcall (java::jmethod "java.lang.Process" "getInputStream")
    335                           process)))
    336          (java::jcall (java::jmethod "java.lang.Process" "waitFor")
    337                      process)
    338    (loop :with b :do
    339       (setq b
    340       (java::jcall (java::jmethod "java.io.InputStream" "read")
    341             output))
    342       :until (member b '(-1 #x0a))  ; Either EOF or LF
    343       :collecting (code-char b) :into result
    344       :finally (return
    345            (parse-integer (coerce result 'string)))))
    346     (t () 0)))
    347 
    348317(provide :abcl-introspect)
Note: See TracChangeset for help on using the changeset viewer.