Skip to content

Commit 8e07e25

Browse files
authored
import an LOOP macro (#1579)
* import an LOOP macro * add to loadup * change CML-LOOP to XCL-LOOP finish * Change package to LOOP, no nickname; 'loop' and 'loop-finish' are in LISP package Install copyright/acknowledgement
1 parent c66583e commit 8e07e25

File tree

8 files changed

+1577
-113
lines changed

8 files changed

+1577
-113
lines changed

internal/loadups/LOADUP-LISP

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "XCL" BASE 10)
22

3-
(FILECREATED "31-Jul-2023 18:22:53" |{DSK}<home>frank>il>medley>gmedley>sources>LOADUP-LISP.;2| 5235
3+
(FILECREATED "14-Mar-2024 12:16:33" |{DSK}<home>larry>il>medley>internal>loadups>LOADUP-LISP.;2| 5426
4+
5+
:EDIT-BY "lmm"
46

57
:CHANGES-TO (FNS LOADUP-LISP)
68

7-
:PREVIOUS-DATE "27-Feb-2023 17:15:53"
8-
|{DSK}<home>frank>il>medley>gmedley>sources>LOADUP-LISP.;1|)
9+
:PREVIOUS-DATE "31-Jul-2023 18:22:53"
10+
|{DSK}<home>larry>il>medley>internal>loadups>LOADUP-LISP.;1|)
911

1012

1113
(PRETTYCOMPRINT LOADUP-LISPCOMS)
@@ -18,7 +20,8 @@
1820
(DEFINEQ
1921

2022
(LOADUP-LISP
21-
(LAMBDA (DRIBBLEFILE) (* \; "Edited 26-Feb-2023 12:17 by lmm")
23+
(LAMBDA (DRIBBLEFILE) (* \; "Edited 14-Mar-2024 12:16 by lmm")
24+
(* \; "Edited 26-Feb-2023 12:17 by lmm")
2225
(* \; "Edited 13-Jul-2022 14:09 by rmk")
2326
(* \; "Edited 4-Mar-2022 19:13 by larry")
2427
(* \; "Edited 29-Apr-2021 22:30 by rmk:")
@@ -107,6 +110,10 @@
107110

108111
(PACKAGE-ENABLE)
109112

113+
(* |;;| " Added late")
114+
115+
(LOADUP '(XCL-LOOP))
116+
110117
(* |;;| " networking code -- should make it optional but too many cross dependencies")
111118

112119
(LOADUP '(PUP 10MBDRIVER LEAF LLETHER DPUPFTP LOCALFILE DSKDISPLAY COURIER LLNS TRSERVER SPP
@@ -123,5 +130,5 @@
123130
(GLOBALVARS MAKESYSFILENAME MEDLEY-INIT-VARS MEDLEYDIR SYSTEMINITVARS USERRECLST)
124131
)
125132
(DECLARE\: DONTCOPY
126-
(FILEMAP (NIL (649 5029 (LOADUP-LISP 659 . 5027)))))
133+
(FILEMAP (NIL (673 5220 (LOADUP-LISP 683 . 5218)))))
127134
STOP

internal/loadups/LOADUP-LISP.LCOM

54 Bytes
Binary file not shown.

sources/CMLSPECIALFORMS

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
(DEFINE-FILE-INFO READTABLE "XCL" PACKAGE "LISP")
2-
(IL:FILECREATED "16-May-90 14:43:08" IL:|{DSK}<usr>local>lde>lispcore>sources>CMLSPECIALFORMS.;2| 20313
1+
(DEFINE-FILE-INFO PACKAGE "LISP" READTABLE "XCL" BASE 10)
32

4-
IL:|changes| IL:|to:| (IL:VARS IL:CMLSPECIALFORMSCOMS)
3+
(IL:FILECREATED "15-Mar-2024 20:39:04" IL:|{DSK}<home>larry>il>medley>sources>CMLSPECIALFORMS.;4| 19873
54

6-
IL:|previous| IL:|date:| "13-Jun-88 18:25:25"
7-
IL:|{DSK}<usr>local>lde>lispcore>sources>CMLSPECIALFORMS.;1|)
5+
:EDIT-BY "lmm"
86

7+
:CHANGES-TO (IL:VARS IL:CMLSPECIALFORMSCOMS)
8+
9+
:PREVIOUS-DATE "15-Mar-2024 10:39:44" IL:|{DSK}<home>larry>il>medley>sources>CMLSPECIALFORMS.;2|
10+
)
911

10-
; Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1990 by Venue & Xerox Corporation. All rights reserved.
1112

1213
(IL:PRETTYCOMPRINT IL:CMLSPECIALFORMSCOMS)
1314

1415
(IL:RPAQQ IL:CMLSPECIALFORMSCOMS
15-
((IL:COMS (IL:FUNCTIONS LOOP)
16-
(IL:COMS (IL:FUNCTIONS IDENTITY)
17-
(XCL:OPTIMIZERS IDENTITY))
16+
((IL:COMS (IL:COMS (IL:FUNCTIONS IDENTITY)
17+
(XCL:OPTIMIZERS IDENTITY))
1818
(IL:FUNCTIONS UNLESS WHEN))
1919
(IL:FUNCTIONS FLET LABELS IL:SELECTQ)
2020
(IL:COMS
@@ -31,8 +31,7 @@ IL:|{DSK}<usr>local>lde>lispcore>sources>CMLSPECIALFORMS.;1|)
3131

3232
(IL:COMS
3333

34-
(IL:* IL:|;;|
35-
 "Hacks for Interlisp NLAMBDAs that should look like functions")
34+
(IL:* IL:|;;| "Hacks for Interlisp NLAMBDAs that should look like functions")
3635

3736
(IL:PROP IL:MACRO IL:FRPTQ IL:SETN IL:SUB1VAR IL:*))
3837
(IL:COMS (IL:FNS IL:BQUOTIFY)
@@ -53,21 +52,14 @@ IL:|{DSK}<usr>local>lde>lispcore>sources>CMLSPECIALFORMS.;1|)
5352
(IL:NLAML)
5453
(IL:LAMA)))))
5554

56-
(DEFMACRO LOOP (&REST FORMS)
57-
(LET ((TAG (GENSYM)))
58-
`(PROG NIL
59-
,TAG
60-
,@FORMS
61-
(GO ,TAG))))
62-
6355
(DEFUN IDENTITY (THING)
6456

6557
(IL:* IL:|;;| "Returns what was passed to it. Default for :key options.")
6658

6759
THING)
6860

6961
(XCL:DEFOPTIMIZER IDENTITY (X)
70-
X)
62+
X)
7163

7264
(DEFMACRO UNLESS (TEST &BODY BODY)
7365
`(COND
@@ -223,10 +215,10 @@ IL:|{DSK}<usr>local>lde>lispcore>sources>CMLSPECIALFORMS.;1|)
223215

224216

225217
(DEFMACRO DO (VARS END-TEST &BODY BODY &ENVIRONMENT ENV)
226-
(%DO-TRANSLATE VARS END-TEST BODY NIL ENV))
218+
(%DO-TRANSLATE VARS END-TEST BODY NIL ENV))
227219

228220
(DEFMACRO DO* (BINDS END-TEST &REST BODY &ENVIRONMENT ENV)
229-
(%DO-TRANSLATE BINDS END-TEST BODY T ENV))
221+
(%DO-TRANSLATE BINDS END-TEST BODY T ENV))
230222

231223
(DEFUN %DO-TRANSLATE (VARS END-TEST BODY SEQUENTIALP ENV)
232224
(LET ((VARS-AND-INITIAL-VALUES (MAPCAR #'(LAMBDA (X)
@@ -263,7 +255,7 @@ IL:|{DSK}<usr>local>lde>lispcore>sources>CMLSPECIALFORMS.;1|)
263255
(GO ,TAG)))))
264256

265257
(DEFMACRO DOLIST ((VAR LISTFORM &OPTIONAL RESULTFORM)
266-
&BODY BODY &ENVIRONMENT ENV)
258+
&BODY BODY &ENVIRONMENT ENV)
267259
(LET ((TAIL (GENSYM)))
268260
(MULTIPLE-VALUE-BIND
269261
(BODY DECL)
@@ -278,7 +270,7 @@ IL:|{DSK}<usr>local>lde>lispcore>sources>CMLSPECIALFORMS.;1|)
278270
(SETQ ,TAIL (CDR ,TAIL)))))))
279271

280272
(DEFMACRO DOTIMES ((VAR COUNTFORM &OPTIONAL RESULTFORM)
281-
&BODY BODY &ENVIRONMENT ENV)
273+
&BODY BODY &ENVIRONMENT ENV)
282274
(LET ((MAX (GENSYM)))
283275
(MULTIPLE-VALUE-BIND (BODY DECLS)
284276
(XCL:PARSE-BODY BODY ENV)
@@ -298,7 +290,7 @@ IL:|{DSK}<usr>local>lde>lispcore>sources>CMLSPECIALFORMS.;1|)
298290
(CLAUSES
299291
(MAPCAR
300292
#'(LAMBDA
301-
(CASE)
293+
(CASE)
302294
(LET ((KEY-LIST (CAR CASE))
303295
(CONSEQUENTS (OR (CDR CASE)
304296
(LIST NIL))))
@@ -341,10 +333,10 @@ IL:|{DSK}<usr>local>lde>lispcore>sources>CMLSPECIALFORMS.;1|)
341333
(IL:PUTPROPS IL:SETN IL:MACRO (= . IL:SETQ))
342334

343335
(IL:PUTPROPS IL:SUB1VAR IL:MACRO ((IL:X)
344-
(IL:SETQ IL:X (IL:SUB1 IL:X))))
336+
(IL:SETQ IL:X (IL:SUB1 IL:X))))
345337

346338
(IL:PUTPROPS IL:* IL:MACRO ((IL:X . IL:Y)
347-
'IL:X))
339+
'IL:X))
348340
(IL:DEFINEQ
349341

350342
(il:bquotify
@@ -479,9 +471,11 @@ IL:|{DSK}<usr>local>lde>lispcore>sources>CMLSPECIALFORMS.;1|)
479471

480472
(IL:ADDTOVAR IL:LAMA )
481473
)
482-
(IL:PUTPROPS IL:CMLSPECIALFORMS IL:COPYRIGHT ("Venue & Xerox Corporation" 1983 1984 1985 1986 1987
483-
1988 1990))
484474
(IL:DECLARE\: IL:DONTCOPY
485-
(IL:FILEMAP (NIL (13354 18024 (IL:BQUOTIFY 13367 . 18022)) (19227 19633 (IL:CLEAR-CLISPARRAY 19240 .
486-
19631)))))
475+
(IL:FILEMAP (NIL (2492 2613 (IDENTITY 2492 . 2613)) (2681 2773 (UNLESS 2681 . 2773)) (2775 2845 (WHEN
476+
2775 . 2845)) (2847 4614 (FLET 2847 . 4614)) (4616 6669 (LABELS 4616 . 6669)) (6671 8466 (IL:SELECTQ
477+
6671 . 8466)) (8513 8624 (DO 8513 . 8624)) (8626 8738 (DO* 8626 . 8738)) (8740 10291 (%DO-TRANSLATE
478+
8740 . 10291)) (10293 10883 (DOLIST 10293 . 10883)) (10885 11388 (DOTIMES 10885 . 11388)) (11390 12562
479+
(CASE 11390 . 12562)) (13026 17696 (IL:BQUOTIFY 13039 . 17694)) (18899 19305 (IL:CLEAR-CLISPARRAY
480+
18912 . 19303)))))
487481
IL:STOP

sources/CMLSPECIALFORMS.LCOM

-326 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)