[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] externals/sly 47afe17 41/47: Fix #386: Unbreak Clasp common lis
From: |
ELPA Syncer |
Subject: |
[nongnu] externals/sly 47afe17 41/47: Fix #386: Unbreak Clasp common lisp for SLYfun |
Date: |
Thu, 17 Dec 2020 18:57:21 -0500 (EST) |
branch: externals/sly
commit 47afe17c21adb20159f0644d85d2a4c029976a9c
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Fix #386: Unbreak Clasp common lisp for SLYfun
Loading slynk/backend/clasp.lisp is an adventure. It's loaded before
the SLYNK package exists, so just work around it. Also fix stale
SLIME references in slynk/backend/clasp.lisp
* slynk/backend/clasp.lisp (sly-dbg): Don't break clasp.lisp load
(sly-dbg): Rename from slime-dbg. Replace a stale bunch of SLIME
references to SLY. (send): Use sly-dbg.
---
slynk/backend/clasp.lisp | 51 ++++++++++++++++++++++++------------------------
1 file changed, 26 insertions(+), 25 deletions(-)
diff --git a/slynk/backend/clasp.lisp b/slynk/backend/clasp.lisp
index c5d2c9d..d979223 100644
--- a/slynk/backend/clasp.lisp
+++ b/slynk/backend/clasp.lisp
@@ -1,6 +1,6 @@
;;;; -*- indent-tabs-mode: nil -*-
;;;
-;;; slynk-clasp.lisp --- SLIME backend for CLASP.
+;;; slynk-clasp.lisp --- SLY backend for CLASP.
;;;
;;; This code has been placed in the Public Domain. All warranties
;;; are disclaimed.
@@ -13,13 +13,14 @@
(in-package slynk-clasp)
-#+(or)
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (setq slynk::*log-output* (open "/tmp/slime.log" :direction :output))
- (setq slynk:*log-events* t))
+;; #+(or)
+;; (eval-when (:compile-toplevel :load-toplevel :execute)
+;; (set slynk::*log-output* (open "/tmp/sly.log" :direction :output))
+;; (set slynk:*log-events* t))
-(defmacro slime-dbg (fmt &rest args)
- `(slynk::log-event "slime-dbg ~a ~a~%" mp:*current-process* (apply #'format
nil ,fmt ,args)))
+(defmacro sly-dbg (fmt &rest args)
+ `(funcall (read-from-string "slynk::log-event")
+ "sly-dbg ~a ~a~%" mp:*current-process* (apply #'format nil ,fmt
,args)))
;; Hard dependencies.
(eval-when (:compile-toplevel :load-toplevel :execute)
@@ -130,7 +131,7 @@
;;; executing the SIGINT handler. We do not want to BREAK into that
;;; helper but into the main thread, though. This is coupled with the
;;; current choice of NIL as communication-style in so far as CLASP's
-;;; main-thread is also the Slime's REPL thread.
+;;; main-thread is also the Sly's REPL thread.
#+clasp-working
(defimplementation call-with-user-break-handler (real-handler function)
@@ -191,7 +192,7 @@
(defimplementation wait-for-input (streams &optional timeout)
(assert (member timeout '(nil t)))
(loop
- (cond ((check-slime-interrupts) (return :interrupt))
+ (cond ((check-sly-interrupts) (return :interrupt))
(timeout (return (poll-streams streams 0)))
(t
(when-let (ready (poll-streams streams 0.2))
@@ -203,7 +204,7 @@
(defimplementation wait-for-input (streams &optional timeout)
(assert (member timeout '(nil t)))
(loop
- (cond ((check-slime-interrupts) (return :interrupt))
+ (cond ((check-sly-interrupts) (return :interrupt))
(timeout (return (remove-if-not #'listen streams)))
(t
(let ((ready (remove-if-not #'listen streams)))
@@ -642,7 +643,7 @@
(defstruct (mailbox (:conc-name mailbox.))
thread
- (mutex (mp:make-lock :name "SLIMELCK"))
+ (mutex (mp:make-lock :name "SLYLCK"))
(cvar (mp:make-condition-variable))
(queue '() :type list))
@@ -665,39 +666,39 @@
(defimplementation send (thread message)
(let* ((mbox (mailbox thread))
(mutex (mailbox.mutex mbox)))
- (slynk::log-event "clasp.lisp: send message ~a mutex: ~a~%" message
mutex)
- (slynk::log-event "clasp.lisp: (lock-owner mutex) -> ~a~%"
(mp:lock-owner mutex))
- (slynk::log-event "clasp.lisp: (lock-count mutex) -> ~a~%"
(mp:lock-count mutex))
+ ;; (sly-dbg "clasp.lisp: send message ~a mutex: ~a~%" message mutex)
+ ;; (sly-dbg "clasp.lisp: (lock-owner mutex) -> ~a~%" (mp:lock-owner
mutex))
+ ;; (sly-dbg "clasp.lisp: (lock-count mutex) -> ~a~%" (mp:lock-count
mutex))
(mp:with-lock (mutex)
- (slynk::log-event "clasp.lisp: in with-lock (lock-owner mutex) ->
~a~%" (mp:lock-owner mutex))
- (slynk::log-event "clasp.lisp: in with-lock (lock-count mutex) ->
~a~%" (mp:lock-count mutex))
+ ;; (sly-dbg "clasp.lisp: in with-lock (lock-owner mutex) -> ~a~%"
(mp:lock-owner mutex))
+ ;; (sly-dbg "clasp.lisp: in with-lock (lock-count mutex) -> ~a~%"
(mp:lock-count mutex))
(setf (mailbox.queue mbox)
(nconc (mailbox.queue mbox) (list message)))
- (slynk::log-event "clasp.lisp: send about to broadcast~%")
+ (sly-dbg "clasp.lisp: send about to broadcast~%")
(mp:condition-variable-broadcast (mailbox.cvar mbox)))))
(defimplementation receive-if (test &optional timeout)
- (slime-dbg "Entered receive-if")
+ (sly-dbg "Entered receive-if")
(let* ((mbox (mailbox (current-thread)))
(mutex (mailbox.mutex mbox)))
- (slime-dbg "receive-if assert")
+ (sly-dbg "receive-if assert")
(assert (or (not timeout) (eq timeout t)))
(loop
- (slime-dbg "receive-if check-slime-interrupts")
- (check-slime-interrupts)
- (slime-dbg "receive-if with-lock")
+ (sly-dbg "receive-if check-sly-interrupts")
+ (check-sly-interrupts)
+ (sly-dbg "receive-if with-lock")
(mp:with-lock (mutex)
(let* ((q (mailbox.queue mbox))
(tail (member-if test q)))
(when tail
(setf (mailbox.queue mbox) (nconc (ldiff q tail) (cdr tail)))
(return (car tail))))
- (slime-dbg "receive-if when (eq")
+ (sly-dbg "receive-if when (eq")
(when (eq timeout t) (return (values nil t)))
- (slime-dbg "receive-if condition-variable-timedwait")
+ (sly-dbg "receive-if condition-variable-timedwait")
(mp:condition-variable-wait (mailbox.cvar mbox) mutex) ; timedwait
0.2
- (slime-dbg "came out of condition-variable-timedwait")
+ (sly-dbg "came out of condition-variable-timedwait")
(core:check-pending-interrupts)))))
) ; #+threads (progn ...
- [nongnu] externals/sly 1188cfc 34/47: Ignore utf-8 encoding errors, (continued)
- [nongnu] externals/sly 1188cfc 34/47: Ignore utf-8 encoding errors, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 4717cb9 44/47: Tolerate leading whitespace in slime-search-buffer-package, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 00cbab0 01/47: Slynk: avoid race conditions when killing threads, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 47e8d27 05/47: add architecture :aarch64 (for ECL), ELPA Syncer, 2020/12/17
- [nongnu] externals/sly f7c6048 08/47: arglist-dispatch: better handling of closer-mop wrappers., ELPA Syncer, 2020/12/17
- [nongnu] externals/sly bf157ae 10/47: Changed the name of a function in Clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 57b6d3f 18/47: abcl: consolidate fixes and features, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly e79f9f2 23/47: sbcl: consult sb-impl:+internal-features+ when reading source files., ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 3bd8696 24/47: Move *features* binding up, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 276b18c 39/47: abcl: guard against repeated invocation to SLYNK-BACKEND:WRAP, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 47afe17 41/47: Fix #386: Unbreak Clasp common lisp for SLYfun,
ELPA Syncer <=
- [nongnu] externals/sly 5bd0081 12/47: *architecture-features*: add ppc64, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 791f7b7 17/47: Calculate condition-location properly for clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly e7f0333 40/47: abcl: fix inspector for a STRUCTURE-OBJECT with no inspectable parts, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 5f15cf1 43/47: Use defgeneric lambda list in defmethod arglists, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly ae4bbca 45/47: Don't force mREPL to use channel thread for everything, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly e927cda 47/47: Release SLY 1.0.42, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly a1fc34c 03/47: Add a name to the mailbox lock for clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly b2732f4 15/47: Add line, column kw args to slynk-compile-string, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 5ec798d 19/47: decode-arglist: don't fall on arglist-dummy., ELPA Syncer, 2020/12/17
- [nongnu] externals/sly a0308b7 21/47: fix spurious detection of allegro modern-mode (#540), ELPA Syncer, 2020/12/17