aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-04-24 14:53:43 +0000
committerdos-reis <gdr@axiomatics.org>2011-04-24 14:53:43 +0000
commite9dacdbd3f3cd32d38fc1dbc4545dc66ece156ea (patch)
tree5628bc802c54f5bf20b8f1eb247a4c38d8d749b7 /src
parent867516e089b95f4495fd345aeda3fd5e40b76839 (diff)
downloadopen-axiom-e9dacdbd3f3cd32d38fc1dbc4545dc66ece156ea.tar.gz
* boot/ast.boot (bfDoCollect): New. Implement one-pass
list comprehension. (bfListReduce): Use it.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/boot/ast.boot11
-rw-r--r--src/boot/strap/ast.clisp1055
-rw-r--r--src/boot/strap/translator.clisp260
4 files changed, 820 insertions, 512 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d309a18d..5b326825 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-24 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * boot/ast.boot (bfDoCollect): New. Implement one-pass
+ list comprehension.
+ (bfListReduce): Use it.
+
2011-04-23 Gabriel Dos Reis <gdr@cs.tamu.edu>
* boot/ast.boot (bf0APPEND): Remove.
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index e7a6f85e..0e485759 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.boot
@@ -371,7 +371,7 @@ bfCollect(y,itl) ==
y is ["COLON",a] => bfListReduce('APPEND,['reverse,a],itl)
y is ["TUPLE",:.] =>
bfListReduce('APPEND,['reverse,bfConstruct y],itl)
- bfListReduce('CONS,y,itl)
+ bfDoCollect(['CONS,y,'NIL],itl,'CDR)
bfListReduce(op,y,itl)==
g := bfGenSymbol()
@@ -379,6 +379,15 @@ bfListReduce(op,y,itl)==
extrait := [[[g],[nil],[],[],[],[['reverse!,g]]]]
bfLp2(extrait,itl,body)
+bfDoCollect(expr,itl,adv) ==
+ head := bfGenSymbol() -- pointer to the result
+ prev := bfGenSymbol() -- pointer to the previous cell
+ body :=
+ ['COND,[['NULL,head],['SETQ,head,['SETQ,prev,expr]]],
+ ["T",bfMKPROGN [['RPLACD,prev,expr],['SETQ,prev,[adv,prev]]]]]
+ extrait := [[[head,prev],['NIL,'NIL],nil,nil,nil,[head]]]
+ bfLp2(extrait,itl,body)
+
bfLp1(iters,body)==
[vars,inits,sucs,filters,exits,value] := bfSep bfAppend iters
nbody :=
diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp
index cfd5f684..1084a8ca 100644
--- a/src/boot/strap/ast.clisp
+++ b/src/boot/strap/ast.clisp
@@ -426,17 +426,23 @@
(COND
((NULL |iters|) (LIST NIL NIL NIL NIL NIL NIL))
(T (SETQ |f| (CAR |iters|)) (SETQ |r| (|bfSep| (CDR |iters|)))
- (LET ((|bfVar#90| NIL) (|bfVar#88| |f|) (|i| NIL)
- (|bfVar#89| |r|) (|j| NIL))
+ (LET ((|bfVar#90| NIL) (|bfVar#91| NIL) (|bfVar#88| |f|)
+ (|i| NIL) (|bfVar#89| |r|) (|j| NIL))
(LOOP
(COND
((OR (ATOM |bfVar#88|)
(PROGN (SETQ |i| (CAR |bfVar#88|)) NIL)
(ATOM |bfVar#89|)
(PROGN (SETQ |j| (CAR |bfVar#89|)) NIL))
- (RETURN (|reverse!| |bfVar#90|)))
- (T (SETQ |bfVar#90|
- (CONS (APPEND |i| |j|) |bfVar#90|))))
+ (RETURN |bfVar#90|))
+ (T (COND
+ ((NULL |bfVar#90|)
+ (SETQ |bfVar#90|
+ (SETQ |bfVar#91|
+ #0=(LIST (APPEND |i| |j|)))))
+ (T (PROGN
+ (RPLACD |bfVar#91| #0#)
+ (SETQ |bfVar#91| (CDR |bfVar#91|)))))))
(SETQ |bfVar#88| (CDR |bfVar#88|))
(SETQ |bfVar#89| (CDR |bfVar#89|)))))))))
@@ -506,7 +512,7 @@
((AND (CONSP |y|) (EQ (CAR |y|) 'TUPLE))
(|bfListReduce| 'APPEND (LIST '|reverse| (|bfConstruct| |y|))
|itl|))
- (T (|bfListReduce| 'CONS |y| |itl|))))))
+ (T (|bfDoCollect| (LIST 'LIST |y|) |itl| 'CDR))))))
(DEFUN |bfListReduce| (|op| |y| |itl|)
(PROG (|extrait| |body| |g|)
@@ -519,6 +525,27 @@
(LIST (LIST '|reverse!| |g|)))))
(|bfLp2| |extrait| |itl| |body|)))))
+(DEFUN |bfDoCollect| (|expr| |itl| |adv|)
+ (PROG (|extrait| |body| |prev| |head|)
+ (RETURN
+ (PROGN
+ (SETQ |head| (|bfGenSymbol|))
+ (SETQ |prev| (|bfGenSymbol|))
+ (SETQ |body|
+ (LIST 'COND
+ (LIST (LIST 'NULL |head|)
+ (LIST 'SETQ |head|
+ (LIST 'SETQ |prev| |expr|)))
+ (LIST 'T
+ (|bfMKPROGN|
+ (LIST (LIST 'RPLACD |prev| |expr|)
+ (LIST 'SETQ |prev|
+ (LIST |adv| |prev|)))))))
+ (SETQ |extrait|
+ (LIST (LIST (LIST |head| |prev|) (LIST 'NIL 'NIL) NIL NIL
+ NIL (LIST |head|))))
+ (|bfLp2| |extrait| |itl| |body|)))))
+
(DEFUN |bfLp1| (|iters| |body|)
(PROG (|loop| |nbody| |value| |exits| |filters| |sucs| |inits| |vars|
|LETTMP#1|)
@@ -546,25 +573,33 @@
(COND
(|vars| (SETQ |loop|
(LIST 'LET
- (LET ((|bfVar#93| NIL)
- (|bfVar#91| |vars|) (|v| NIL)
- (|bfVar#92| |inits|) (|i| NIL))
+ (LET ((|bfVar#94| NIL) (|bfVar#95| NIL)
+ (|bfVar#92| |vars|) (|v| NIL)
+ (|bfVar#93| |inits|) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#91|)
+ ((OR (ATOM |bfVar#92|)
(PROGN
- (SETQ |v| (CAR |bfVar#91|))
+ (SETQ |v| (CAR |bfVar#92|))
NIL)
- (ATOM |bfVar#92|)
+ (ATOM |bfVar#93|)
(PROGN
- (SETQ |i| (CAR |bfVar#92|))
+ (SETQ |i| (CAR |bfVar#93|))
NIL))
- (RETURN (|reverse!| |bfVar#93|)))
+ (RETURN |bfVar#94|))
(T
- (SETQ |bfVar#93|
- (CONS (LIST |v| |i|) |bfVar#93|))))
- (SETQ |bfVar#91| (CDR |bfVar#91|))
- (SETQ |bfVar#92| (CDR |bfVar#92|))))
+ (COND
+ ((NULL |bfVar#94|)
+ (SETQ |bfVar#94|
+ (SETQ |bfVar#95|
+ #2=(LIST (LIST |v| |i|)))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#95| #2#)
+ (SETQ |bfVar#95|
+ (CDR |bfVar#95|)))))))
+ (SETQ |bfVar#92| (CDR |bfVar#92|))
+ (SETQ |bfVar#93| (CDR |bfVar#93|))))
|loop|))))
|loop|))))
@@ -1095,16 +1130,16 @@
(AND (CONSP |ISTMP#1|) (NULL (CDR |ISTMP#1|))
(PROGN (SETQ |seq| (CAR |ISTMP#1|)) T)))
(CONSP |seq|)
- (LET ((|bfVar#95| T) (|bfVar#94| |seq|) (|y| NIL))
+ (LET ((|bfVar#97| T) (|bfVar#96| |seq|) (|y| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#94|)
- (PROGN (SETQ |y| (CAR |bfVar#94|)) NIL))
- (RETURN |bfVar#95|))
+ ((OR (ATOM |bfVar#96|)
+ (PROGN (SETQ |y| (CAR |bfVar#96|)) NIL))
+ (RETURN |bfVar#97|))
(T (PROGN
- (SETQ |bfVar#95| (APPLY |pred| |y| NIL))
- (COND ((NOT |bfVar#95|) (RETURN NIL))))))
- (SETQ |bfVar#94| (CDR |bfVar#94|))))))))
+ (SETQ |bfVar#97| (APPLY |pred| |y| NIL))
+ (COND ((NOT |bfVar#97|) (RETURN NIL))))))
+ (SETQ |bfVar#96| (CDR |bfVar#96|))))))))
(DEFUN |bfMember| (|var| |seq|)
(PROG (|x| |ISTMP#2| |ISTMP#1|)
@@ -1201,32 +1236,32 @@
((NULL |l|) NIL)
((NULL (CDR |l|)) (CAR |l|))
(T (CONS 'OR
- (LET ((|bfVar#97| NIL) (|bfVar#96| |l|) (|c| NIL))
+ (LET ((|bfVar#99| NIL) (|bfVar#98| |l|) (|c| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#96|)
- (PROGN (SETQ |c| (CAR |bfVar#96|)) NIL))
- (RETURN (|reverse!| |bfVar#97|)))
- (T (SETQ |bfVar#97|
+ ((OR (ATOM |bfVar#98|)
+ (PROGN (SETQ |c| (CAR |bfVar#98|)) NIL))
+ (RETURN (|reverse!| |bfVar#99|)))
+ (T (SETQ |bfVar#99|
(APPEND (|reverse| (|bfFlatten| 'OR |c|))
- |bfVar#97|))))
- (SETQ |bfVar#96| (CDR |bfVar#96|))))))))
+ |bfVar#99|))))
+ (SETQ |bfVar#98| (CDR |bfVar#98|))))))))
(DEFUN |bfAND| (|l|)
(COND
((NULL |l|) T)
((NULL (CDR |l|)) (CAR |l|))
(T (CONS 'AND
- (LET ((|bfVar#99| NIL) (|bfVar#98| |l|) (|c| NIL))
+ (LET ((|bfVar#101| NIL) (|bfVar#100| |l|) (|c| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#98|)
- (PROGN (SETQ |c| (CAR |bfVar#98|)) NIL))
- (RETURN (|reverse!| |bfVar#99|)))
- (T (SETQ |bfVar#99|
+ ((OR (ATOM |bfVar#100|)
+ (PROGN (SETQ |c| (CAR |bfVar#100|)) NIL))
+ (RETURN (|reverse!| |bfVar#101|)))
+ (T (SETQ |bfVar#101|
(APPEND (|reverse| (|bfFlatten| 'AND |c|))
- |bfVar#99|))))
- (SETQ |bfVar#98| (CDR |bfVar#98|))))))))
+ |bfVar#101|))))
+ (SETQ |bfVar#100| (CDR |bfVar#100|))))))))
(DEFUN |defQuoteId| (|x|)
(AND (CONSP |x|) (EQ (CAR |x|) 'QUOTE) (SYMBOLP (CADR |x|))))
@@ -1289,52 +1324,67 @@
(SETQ |nargl| (CADDR . #0#))
(SETQ |largl| (CADDDR . #0#))
(SETQ |sb|
- (LET ((|bfVar#102| NIL) (|bfVar#100| |nargl|) (|i| NIL)
- (|bfVar#101| |sgargl|) (|j| NIL))
+ (LET ((|bfVar#104| NIL) (|bfVar#105| NIL)
+ (|bfVar#102| |nargl|) (|i| NIL)
+ (|bfVar#103| |sgargl|) (|j| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#100|)
- (PROGN (SETQ |i| (CAR |bfVar#100|)) NIL)
- (ATOM |bfVar#101|)
- (PROGN (SETQ |j| (CAR |bfVar#101|)) NIL))
- (RETURN (|reverse!| |bfVar#102|)))
- (T (SETQ |bfVar#102|
- (CONS (CONS |i| |j|) |bfVar#102|))))
- (SETQ |bfVar#100| (CDR |bfVar#100|))
- (SETQ |bfVar#101| (CDR |bfVar#101|)))))
+ ((OR (ATOM |bfVar#102|)
+ (PROGN (SETQ |i| (CAR |bfVar#102|)) NIL)
+ (ATOM |bfVar#103|)
+ (PROGN (SETQ |j| (CAR |bfVar#103|)) NIL))
+ (RETURN |bfVar#104|))
+ (T (COND
+ ((NULL |bfVar#104|)
+ (SETQ |bfVar#104|
+ (SETQ |bfVar#105|
+ #1=(LIST (CONS |i| |j|)))))
+ (T (PROGN
+ (RPLACD |bfVar#105| #1#)
+ (SETQ |bfVar#105| (CDR |bfVar#105|)))))))
+ (SETQ |bfVar#102| (CDR |bfVar#102|))
+ (SETQ |bfVar#103| (CDR |bfVar#103|)))))
(SETQ |body| (SUBLIS |sb| |body|))
(SETQ |sb2|
- (LET ((|bfVar#105| NIL) (|bfVar#103| |sgargl|) (|i| NIL)
- (|bfVar#104| |largl|) (|j| NIL))
+ (LET ((|bfVar#108| NIL) (|bfVar#109| NIL)
+ (|bfVar#106| |sgargl|) (|i| NIL)
+ (|bfVar#107| |largl|) (|j| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#103|)
- (PROGN (SETQ |i| (CAR |bfVar#103|)) NIL)
- (ATOM |bfVar#104|)
- (PROGN (SETQ |j| (CAR |bfVar#104|)) NIL))
- (RETURN (|reverse!| |bfVar#105|)))
- (T (SETQ |bfVar#105|
- (CONS (LIST 'CONS (LIST 'QUOTE |i|) |j|)
- |bfVar#105|))))
- (SETQ |bfVar#103| (CDR |bfVar#103|))
- (SETQ |bfVar#104| (CDR |bfVar#104|)))))
+ ((OR (ATOM |bfVar#106|)
+ (PROGN (SETQ |i| (CAR |bfVar#106|)) NIL)
+ (ATOM |bfVar#107|)
+ (PROGN (SETQ |j| (CAR |bfVar#107|)) NIL))
+ (RETURN |bfVar#108|))
+ (T (COND
+ ((NULL |bfVar#108|)
+ (SETQ |bfVar#108|
+ (SETQ |bfVar#109|
+ #2=(LIST
+ (LIST 'CONS (LIST 'QUOTE |i|)
+ |j|)))))
+ (T (PROGN
+ (RPLACD |bfVar#109| #2#)
+ (SETQ |bfVar#109| (CDR |bfVar#109|)))))))
+ (SETQ |bfVar#106| (CDR |bfVar#106|))
+ (SETQ |bfVar#107| (CDR |bfVar#107|)))))
(SETQ |body|
(LIST 'SUBLIS (CONS 'LIST |sb2|) (LIST 'QUOTE |body|)))
(SETQ |lamex| (LIST 'MLAMBDA |gargl| |body|))
(SETQ |def| (LIST |op| |lamex|))
(CONS (|shoeComp| |def|)
- (LET ((|bfVar#107| NIL) (|bfVar#106| |$wheredefs|)
+ (LET ((|bfVar#111| NIL) (|bfVar#110| |$wheredefs|)
(|d| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#106|)
- (PROGN (SETQ |d| (CAR |bfVar#106|)) NIL))
- (RETURN (|reverse!| |bfVar#107|)))
- (T (SETQ |bfVar#107|
+ ((OR (ATOM |bfVar#110|)
+ (PROGN (SETQ |d| (CAR |bfVar#110|)) NIL))
+ (RETURN (|reverse!| |bfVar#111|)))
+ (T (SETQ |bfVar#111|
(APPEND (|reverse|
(|shoeComps| (|bfDef1| |d|)))
- |bfVar#107|))))
- (SETQ |bfVar#106| (CDR |bfVar#106|)))))))))
+ |bfVar#111|))))
+ (SETQ |bfVar#110| (CDR |bfVar#110|)))))))))
(DEFUN |bfGargl| (|argl|)
(PROG (|f| |d| |c| |b| |a| |LETTMP#1|)
@@ -1354,13 +1404,13 @@
(LIST (CONS |f| |a|) (CONS |f| |b|)
(CONS (CAR |argl|) |c|) (CONS |f| |d|)))))))))
-(DEFUN |bfDef1| (|bfVar#108|)
+(DEFUN |bfDef1| (|bfVar#112|)
(PROG (|arglp| |control| |quotes| |LETTMP#1| |argl| |body| |args|
|op|)
(RETURN
(PROGN
- (SETQ |op| (CAR |bfVar#108|))
- (SETQ |args| (CADR . #0=(|bfVar#108|)))
+ (SETQ |op| (CAR |bfVar#112|))
+ (SETQ |args| (CADR . #0=(|bfVar#112|)))
(SETQ |body| (CADDR . #0#))
(SETQ |argl|
(COND
@@ -1401,30 +1451,37 @@
(SETQ |arg1| (CADDR . #0#)) (SETQ |body1| (CDDDR . #0#))
(|bfCompHash| |op1| |arg1| |body1|))
(T (|bfTuple|
- (LET ((|bfVar#110| NIL)
- (|bfVar#109|
+ (LET ((|bfVar#114| NIL)
+ (|bfVar#113|
(CONS (LIST |op| |args| |body|) |$wheredefs|))
(|d| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#109|)
- (PROGN (SETQ |d| (CAR |bfVar#109|)) NIL))
- (RETURN (|reverse!| |bfVar#110|)))
- (T (SETQ |bfVar#110|
+ ((OR (ATOM |bfVar#113|)
+ (PROGN (SETQ |d| (CAR |bfVar#113|)) NIL))
+ (RETURN (|reverse!| |bfVar#114|)))
+ (T (SETQ |bfVar#114|
(APPEND (|reverse|
(|shoeComps| (|bfDef1| |d|)))
- |bfVar#110|))))
- (SETQ |bfVar#109| (CDR |bfVar#109|))))))))))
+ |bfVar#114|))))
+ (SETQ |bfVar#113| (CDR |bfVar#113|))))))))))
(DEFUN |shoeComps| (|x|)
- (LET ((|bfVar#112| NIL) (|bfVar#111| |x|) (|def| NIL))
+ (LET ((|bfVar#116| NIL) (|bfVar#117| NIL) (|bfVar#115| |x|)
+ (|def| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#111|)
- (PROGN (SETQ |def| (CAR |bfVar#111|)) NIL))
- (RETURN (|reverse!| |bfVar#112|)))
- (T (SETQ |bfVar#112| (CONS (|shoeComp| |def|) |bfVar#112|))))
- (SETQ |bfVar#111| (CDR |bfVar#111|)))))
+ ((OR (ATOM |bfVar#115|)
+ (PROGN (SETQ |def| (CAR |bfVar#115|)) NIL))
+ (RETURN |bfVar#116|))
+ (T (COND
+ ((NULL |bfVar#116|)
+ (SETQ |bfVar#116|
+ (SETQ |bfVar#117| #0=(LIST (|shoeComp| |def|)))))
+ (T (PROGN
+ (RPLACD |bfVar#117| #0#)
+ (SETQ |bfVar#117| (CDR |bfVar#117|)))))))
+ (SETQ |bfVar#115| (CDR |bfVar#115|)))))
(DEFUN |shoeComp| (|x|)
(PROG (|a|)
@@ -1569,16 +1626,16 @@
((|symbolMember?| |op|
'(LET PROG LOOP BLOCK DECLARE LAMBDA))
NIL)
- ((LET ((|bfVar#114| NIL) (|bfVar#113| |body|) (|t| NIL))
+ ((LET ((|bfVar#119| NIL) (|bfVar#118| |body|) (|t| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#113|)
- (PROGN (SETQ |t| (CAR |bfVar#113|)) NIL))
- (RETURN |bfVar#114|))
+ ((OR (ATOM |bfVar#118|)
+ (PROGN (SETQ |t| (CAR |bfVar#118|)) NIL))
+ (RETURN |bfVar#119|))
(T (PROGN
- (SETQ |bfVar#114| (|needsPROG| |t|))
- (COND (|bfVar#114| (RETURN |bfVar#114|))))))
- (SETQ |bfVar#113| (CDR |bfVar#113|))))
+ (SETQ |bfVar#119| (|needsPROG| |t|))
+ (COND (|bfVar#119| (RETURN |bfVar#119|))))))
+ (SETQ |bfVar#118| (CDR |bfVar#118|))))
T)
(T NIL)))))))
@@ -1673,11 +1730,11 @@
((EQ U '|%Leave|) (RPLACA |x| 'RETURN))
((|symbolMember?| U '(PROG LAMBDA))
(SETQ |newbindings| NIL)
- (LET ((|bfVar#115| (CADR |x|)) (|y| NIL))
+ (LET ((|bfVar#120| (CADR |x|)) (|y| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#115|)
- (PROGN (SETQ |y| (CAR |bfVar#115|)) NIL))
+ ((OR (ATOM |bfVar#120|)
+ (PROGN (SETQ |y| (CAR |bfVar#120|)) NIL))
(RETURN NIL))
(T (COND
((NOT (MEMQ |y| |$locVars|))
@@ -1686,22 +1743,29 @@
(SETQ |$locVars| (CONS |y| |$locVars|))
(SETQ |newbindings|
(CONS |y| |newbindings|))))))))
- (SETQ |bfVar#115| (CDR |bfVar#115|))))
+ (SETQ |bfVar#120| (CDR |bfVar#120|))))
(SETQ |res| (|shoeCompTran1| (CDDR |x|)))
(SETQ |$locVars|
- (LET ((|bfVar#117| NIL) (|bfVar#116| |$locVars|)
- (|y| NIL))
+ (LET ((|bfVar#122| NIL) (|bfVar#123| NIL)
+ (|bfVar#121| |$locVars|) (|y| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#116|)
+ ((OR (ATOM |bfVar#121|)
(PROGN
- (SETQ |y| (CAR |bfVar#116|))
+ (SETQ |y| (CAR |bfVar#121|))
NIL))
- (RETURN (|reverse!| |bfVar#117|)))
+ (RETURN |bfVar#122|))
(T (AND (NOT (MEMQ |y| |newbindings|))
- (SETQ |bfVar#117|
- (CONS |y| |bfVar#117|)))))
- (SETQ |bfVar#116| (CDR |bfVar#116|))))))
+ (COND
+ ((NULL |bfVar#122|)
+ (SETQ |bfVar#122|
+ (SETQ |bfVar#123| #0=(LIST |y|))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#123| #0#)
+ (SETQ |bfVar#123|
+ (CDR |bfVar#123|))))))))
+ (SETQ |bfVar#121| (CDR |bfVar#121|))))))
(T (|shoeCompTran1| (CAR |x|))
(|shoeCompTran1| (CDR |x|)))))))))
@@ -1792,13 +1856,13 @@
(RETURN
(PROGN
(SETQ |a|
- (LET ((|bfVar#118| NIL) (|c| |l|))
+ (LET ((|bfVar#124| NIL) (|c| |l|))
(LOOP
(COND
- ((ATOM |c|) (RETURN (|reverse!| |bfVar#118|)))
- (T (SETQ |bfVar#118|
+ ((ATOM |c|) (RETURN (|reverse!| |bfVar#124|)))
+ (T (SETQ |bfVar#124|
(APPEND (|reverse| (|bfFlattenSeq| |c|))
- |bfVar#118|))))
+ |bfVar#124|))))
(SETQ |c| (CDR |c|)))))
(COND
((NULL |a|) NIL)
@@ -1816,17 +1880,24 @@
((AND (CONSP |f|) (EQ (CAR |f|) 'PROGN))
(COND
((CDR |x|)
- (LET ((|bfVar#120| NIL) (|bfVar#119| (CDR |f|))
- (|i| NIL))
+ (LET ((|bfVar#126| NIL) (|bfVar#127| NIL)
+ (|bfVar#125| (CDR |f|)) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#119|)
- (PROGN (SETQ |i| (CAR |bfVar#119|)) NIL))
- (RETURN (|reverse!| |bfVar#120|)))
+ ((OR (ATOM |bfVar#125|)
+ (PROGN (SETQ |i| (CAR |bfVar#125|)) NIL))
+ (RETURN |bfVar#126|))
(T (AND (NOT (ATOM |i|))
- (SETQ |bfVar#120|
- (CONS |i| |bfVar#120|)))))
- (SETQ |bfVar#119| (CDR |bfVar#119|)))))
+ (COND
+ ((NULL |bfVar#126|)
+ (SETQ |bfVar#126|
+ (SETQ |bfVar#127|
+ #0=(LIST |i|))))
+ (T (PROGN
+ (RPLACD |bfVar#127| #0#)
+ (SETQ |bfVar#127|
+ (CDR |bfVar#127|))))))))
+ (SETQ |bfVar#125| (CDR |bfVar#125|)))))
(T (CDR |f|))))
(T (LIST |f|))))))))
@@ -1875,11 +1946,12 @@
(COND
((NULL |l|) NIL)
(T (SETQ |transform|
- (LET ((|bfVar#122| NIL) (|bfVar#121| |l|) (|x| NIL))
+ (LET ((|bfVar#129| NIL) (|bfVar#130| NIL)
+ (|bfVar#128| |l|) (|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#121|)
- (PROGN (SETQ |x| (CAR |bfVar#121|)) NIL)
+ ((OR (ATOM |bfVar#128|)
+ (PROGN (SETQ |x| (CAR |bfVar#128|)) NIL)
(NOT (AND (CONSP |x|) (EQ (CAR |x|) 'COND)
(PROGN
(SETQ |ISTMP#1| (CDR |x|))
@@ -1913,11 +1985,16 @@
(SETQ |b|
(CAR |ISTMP#5|))
T))))))))))))))
- (RETURN (|reverse!| |bfVar#122|)))
- (T (SETQ |bfVar#122|
- (CONS (|bfAlternative| |a| |b|)
- |bfVar#122|))))
- (SETQ |bfVar#121| (CDR |bfVar#121|)))))
+ (RETURN |bfVar#129|))
+ (T (COND
+ ((NULL |bfVar#129|)
+ (SETQ |bfVar#129|
+ (SETQ |bfVar#130|
+ #0=(LIST (|bfAlternative| |a| |b|)))))
+ (T (PROGN
+ (RPLACD |bfVar#130| #0#)
+ (SETQ |bfVar#130| (CDR |bfVar#130|)))))))
+ (SETQ |bfVar#128| (CDR |bfVar#128|)))))
(SETQ |no| (LENGTH |transform|))
(SETQ |before| (|bfTake| |no| |l|))
(SETQ |aft| (|bfDrop| |no| |l|))
@@ -1949,17 +2026,25 @@
(SETQ |defs| (CADR . #0=(|LETTMP#1|)))
(SETQ |nondefs| (CADDR . #0#))
(SETQ |a|
- (LET ((|bfVar#124| NIL) (|bfVar#123| |defs|) (|d| NIL))
+ (LET ((|bfVar#132| NIL) (|bfVar#133| NIL)
+ (|bfVar#131| |defs|) (|d| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#123|)
- (PROGN (SETQ |d| (CAR |bfVar#123|)) NIL))
- (RETURN (|reverse!| |bfVar#124|)))
- (T (SETQ |bfVar#124|
- (CONS (LIST (CAR |d|) (CADR |d|)
- (|bfSUBLIS| |opassoc| (CADDR |d|)))
- |bfVar#124|))))
- (SETQ |bfVar#123| (CDR |bfVar#123|)))))
+ ((OR (ATOM |bfVar#131|)
+ (PROGN (SETQ |d| (CAR |bfVar#131|)) NIL))
+ (RETURN |bfVar#132|))
+ (T (COND
+ ((NULL |bfVar#132|)
+ (SETQ |bfVar#132|
+ (SETQ |bfVar#133|
+ #1=(LIST
+ (LIST (CAR |d|) (CADR |d|)
+ (|bfSUBLIS| |opassoc|
+ (CADDR |d|)))))))
+ (T (PROGN
+ (RPLACD |bfVar#133| #1#)
+ (SETQ |bfVar#133| (CDR |bfVar#133|)))))))
+ (SETQ |bfVar#131| (CDR |bfVar#131|)))))
(SETQ |$wheredefs| (APPEND |a| |$wheredefs|))
(|bfMKPROGN|
(|bfSUBLIS| |opassoc| (|append!| |nondefs| (LIST |expr|))))))))
@@ -2044,16 +2129,22 @@
((AND (CONSP |x|) (NULL (CDR |x|))) (SETQ |f| (CAR |x|))
(LIST 'DEFCONSTANT |f| (LIST 'LIST (LIST 'QUOTE |f|))))
(T (SETQ |a|
- (LET ((|bfVar#126| NIL) (|bfVar#125| (CDR |x|))
- (|i| NIL))
+ (LET ((|bfVar#135| NIL) (|bfVar#136| NIL)
+ (|bfVar#134| (CDR |x|)) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#125|)
- (PROGN (SETQ |i| (CAR |bfVar#125|)) NIL))
- (RETURN (|reverse!| |bfVar#126|)))
- (T (SETQ |bfVar#126|
- (CONS (|bfGenSymbol|) |bfVar#126|))))
- (SETQ |bfVar#125| (CDR |bfVar#125|)))))
+ ((OR (ATOM |bfVar#134|)
+ (PROGN (SETQ |i| (CAR |bfVar#134|)) NIL))
+ (RETURN |bfVar#135|))
+ (T (COND
+ ((NULL |bfVar#135|)
+ (SETQ |bfVar#135|
+ (SETQ |bfVar#136|
+ #0=(LIST (|bfGenSymbol|)))))
+ (T (PROGN
+ (RPLACD |bfVar#136| #0#)
+ (SETQ |bfVar#136| (CDR |bfVar#136|)))))))
+ (SETQ |bfVar#134| (CDR |bfVar#134|)))))
(LIST 'DEFUN (CAR |x|) |a|
(LIST 'CONS (LIST 'QUOTE (CAR |x|)) (CONS 'LIST |a|))))))))
@@ -2082,21 +2173,28 @@
(DEFUN |bfCaseItems| (|g| |x|)
(PROG (|j| |ISTMP#1| |i|)
(RETURN
- (LET ((|bfVar#129| NIL) (|bfVar#128| |x|) (|bfVar#127| NIL))
+ (LET ((|bfVar#139| NIL) (|bfVar#140| NIL) (|bfVar#138| |x|)
+ (|bfVar#137| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#128|)
- (PROGN (SETQ |bfVar#127| (CAR |bfVar#128|)) NIL))
- (RETURN (|reverse!| |bfVar#129|)))
- (T (AND (CONSP |bfVar#127|)
+ ((OR (ATOM |bfVar#138|)
+ (PROGN (SETQ |bfVar#137| (CAR |bfVar#138|)) NIL))
+ (RETURN |bfVar#139|))
+ (T (AND (CONSP |bfVar#137|)
(PROGN
- (SETQ |i| (CAR |bfVar#127|))
- (SETQ |ISTMP#1| (CDR |bfVar#127|))
+ (SETQ |i| (CAR |bfVar#137|))
+ (SETQ |ISTMP#1| (CDR |bfVar#137|))
(AND (CONSP |ISTMP#1|) (NULL (CDR |ISTMP#1|))
(PROGN (SETQ |j| (CAR |ISTMP#1|)) T)))
- (SETQ |bfVar#129|
- (CONS (|bfCI| |g| |i| |j|) |bfVar#129|)))))
- (SETQ |bfVar#128| (CDR |bfVar#128|)))))))
+ (COND
+ ((NULL |bfVar#139|)
+ (SETQ |bfVar#139|
+ (SETQ |bfVar#140|
+ #0=(LIST (|bfCI| |g| |i| |j|)))))
+ (T (PROGN
+ (RPLACD |bfVar#140| #0#)
+ (SETQ |bfVar#140| (CDR |bfVar#140|))))))))
+ (SETQ |bfVar#138| (CDR |bfVar#138|)))))))
(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Thing| |%Thing|) |%Form|) |bfCI|))
@@ -2108,19 +2206,27 @@
(COND
((NULL |a|) (LIST (CAR |x|) |y|))
(T (SETQ |b|
- (LET ((|bfVar#131| NIL) (|bfVar#130| |a|) (|i| NIL)
- (|j| 1))
+ (LET ((|bfVar#142| NIL) (|bfVar#143| NIL)
+ (|bfVar#141| |a|) (|i| NIL) (|j| 1))
(LOOP
(COND
- ((OR (ATOM |bfVar#130|)
- (PROGN (SETQ |i| (CAR |bfVar#130|)) NIL))
- (RETURN (|reverse!| |bfVar#131|)))
+ ((OR (ATOM |bfVar#141|)
+ (PROGN (SETQ |i| (CAR |bfVar#141|)) NIL))
+ (RETURN |bfVar#142|))
(T (AND (NOT (EQ |i| 'DOT))
- (SETQ |bfVar#131|
- (CONS
- (LIST |i| (|bfCARCDR| |j| |g|))
- |bfVar#131|)))))
- (SETQ |bfVar#130| (CDR |bfVar#130|))
+ (COND
+ ((NULL |bfVar#142|)
+ (SETQ |bfVar#142|
+ (SETQ |bfVar#143|
+ #0=(LIST
+ (LIST |i|
+ (|bfCARCDR| |j| |g|))))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#143| #0#)
+ (SETQ |bfVar#143|
+ (CDR |bfVar#143|))))))))
+ (SETQ |bfVar#141| (CDR |bfVar#141|))
(SETQ |j| (+ |j| 1)))))
(COND
((NULL |b|) (LIST (CAR |x|) |y|))
@@ -2258,16 +2364,23 @@
((ATOM |form|)
(COND ((MEMBER |form| |params|) |form|) (T (|quote| |form|))))
(T (CONS 'LIST
- (LET ((|bfVar#133| NIL) (|bfVar#132| |form|) (|t| NIL))
+ (LET ((|bfVar#145| NIL) (|bfVar#146| NIL)
+ (|bfVar#144| |form|) (|t| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#132|)
- (PROGN (SETQ |t| (CAR |bfVar#132|)) NIL))
- (RETURN (|reverse!| |bfVar#133|)))
- (T (SETQ |bfVar#133|
- (CONS (|backquote| |t| |params|)
- |bfVar#133|))))
- (SETQ |bfVar#132| (CDR |bfVar#132|))))))))
+ ((OR (ATOM |bfVar#144|)
+ (PROGN (SETQ |t| (CAR |bfVar#144|)) NIL))
+ (RETURN |bfVar#145|))
+ (T (COND
+ ((NULL |bfVar#145|)
+ (SETQ |bfVar#145|
+ (SETQ |bfVar#146|
+ #0=(LIST
+ (|backquote| |t| |params|)))))
+ (T (PROGN
+ (RPLACD |bfVar#146| #0#)
+ (SETQ |bfVar#146| (CDR |bfVar#146|)))))))
+ (SETQ |bfVar#144| (CDR |bfVar#144|))))))))
(DEFUN |genTypeAlias| (|head| |body|)
(PROG (|args| |op|)
@@ -2468,47 +2581,62 @@
(RETURN
(PROGN
(SETQ |argtypes|
- (LET ((|bfVar#135| NIL) (|bfVar#134| |s|) (|x| NIL))
+ (LET ((|bfVar#148| NIL) (|bfVar#149| NIL)
+ (|bfVar#147| |s|) (|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#134|)
- (PROGN (SETQ |x| (CAR |bfVar#134|)) NIL))
- (RETURN (|reverse!| |bfVar#135|)))
- (T (SETQ |bfVar#135|
- (CONS (|nativeArgumentType| |x|)
- |bfVar#135|))))
- (SETQ |bfVar#134| (CDR |bfVar#134|)))))
+ ((OR (ATOM |bfVar#147|)
+ (PROGN (SETQ |x| (CAR |bfVar#147|)) NIL))
+ (RETURN |bfVar#148|))
+ (T (COND
+ ((NULL |bfVar#148|)
+ (SETQ |bfVar#148|
+ (SETQ |bfVar#149|
+ #0=(LIST
+ (|nativeArgumentType| |x|)))))
+ (T (PROGN
+ (RPLACD |bfVar#149| #0#)
+ (SETQ |bfVar#149| (CDR |bfVar#149|)))))))
+ (SETQ |bfVar#147| (CDR |bfVar#147|)))))
(SETQ |rettype| (|nativeReturnType| |t|))
(COND
- ((LET ((|bfVar#137| T) (|bfVar#136| (CONS |t| |s|))
+ ((LET ((|bfVar#151| T) (|bfVar#150| (CONS |t| |s|))
(|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#136|)
- (PROGN (SETQ |x| (CAR |bfVar#136|)) NIL))
- (RETURN |bfVar#137|))
+ ((OR (ATOM |bfVar#150|)
+ (PROGN (SETQ |x| (CAR |bfVar#150|)) NIL))
+ (RETURN |bfVar#151|))
(T (PROGN
- (SETQ |bfVar#137| (|isSimpleNativeType| |x|))
- (COND ((NOT |bfVar#137|) (RETURN NIL))))))
- (SETQ |bfVar#136| (CDR |bfVar#136|))))
+ (SETQ |bfVar#151| (|isSimpleNativeType| |x|))
+ (COND ((NOT |bfVar#151|) (RETURN NIL))))))
+ (SETQ |bfVar#150| (CDR |bfVar#150|))))
(LIST (LIST 'DEFENTRY |op| |argtypes|
(LIST |rettype| (PNAME |op'|)))))
(T (SETQ |cop| (CONCAT (PNAME |op'|) "_stub"))
(SETQ |cargs|
- (LET ((|bfVar#144| NIL)
- (|bfVar#143| (- (LENGTH |s|) 1)) (|i| 0))
+ (LET ((|bfVar#160| NIL) (|bfVar#161| NIL)
+ (|bfVar#159| (- (LENGTH |s|) 1)) (|i| 0))
(LOOP
(COND
- ((> |i| |bfVar#143|)
- (RETURN (|reverse!| |bfVar#144|)))
- (T (SETQ |bfVar#144|
- (CONS (|genGCLnativeTranslation,mkCArgName|
- |i|)
- |bfVar#144|))))
+ ((> |i| |bfVar#159|) (RETURN |bfVar#160|))
+ (T (COND
+ ((NULL |bfVar#160|)
+ (SETQ |bfVar#160|
+ (SETQ |bfVar#161|
+ (LIST
+ (|genGCLnativeTranslation,mkCArgName|
+ |i|)))))
+ (T (PROGN
+ (RPLACD |bfVar#161|
+ (LIST
+ (|genGCLnativeTranslation,mkCArgName|
+ |i|)))
+ (SETQ |bfVar#161| (CDR |bfVar#161|)))))))
(SETQ |i| (+ |i| 1)))))
(SETQ |ccode|
- (LET ((|bfVar#140| "")
- (|bfVar#142|
+ (LET ((|bfVar#156| "")
+ (|bfVar#158|
(CONS (|genGCLnativeTranslation,gclTypeInC|
|t|)
(CONS " "
@@ -2516,21 +2644,30 @@
(CONS "("
(APPEND
(LET
- ((|bfVar#138| NIL) (|x| |s|)
+ ((|bfVar#152| NIL)
+ (|bfVar#153| NIL) (|x| |s|)
(|a| |cargs|))
(LOOP
(COND
((OR (ATOM |x|)
(ATOM |a|))
- (RETURN
- (|reverse!|
- |bfVar#138|)))
+ (RETURN |bfVar#152|))
(T
- (SETQ |bfVar#138|
- (CONS
- (|genGCLnativeTranslation,cparm|
- |x| |a|)
- |bfVar#138|))))
+ (COND
+ ((NULL |bfVar#152|)
+ (SETQ |bfVar#152|
+ (SETQ |bfVar#153|
+ (LIST
+ (|genGCLnativeTranslation,cparm|
+ |x| |a|)))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#153|
+ (LIST
+ (|genGCLnativeTranslation,cparm|
+ |x| |a|)))
+ (SETQ |bfVar#153|
+ (CDR |bfVar#153|)))))))
(SETQ |x| (CDR |x|))
(SETQ |a| (CDR |a|))))
(CONS ") { "
@@ -2543,35 +2680,50 @@
(CONS "("
(APPEND
(LET
- ((|bfVar#139| NIL)
+ ((|bfVar#154| NIL)
+ (|bfVar#155| NIL)
(|x| |s|) (|a| |cargs|))
(LOOP
(COND
((OR (ATOM |x|)
(ATOM |a|))
(RETURN
- (|reverse!|
- |bfVar#139|)))
+ |bfVar#154|))
(T
- (SETQ |bfVar#139|
- (CONS
- (|genGCLnativeTranslation,gclArgsInC|
- |x| |a|)
- |bfVar#139|))))
+ (COND
+ ((NULL
+ |bfVar#154|)
+ (SETQ |bfVar#154|
+ (SETQ
+ |bfVar#155|
+ (LIST
+ (|genGCLnativeTranslation,gclArgsInC|
+ |x| |a|)))))
+ (T
+ (PROGN
+ (RPLACD
+ |bfVar#155|
+ (LIST
+ (|genGCLnativeTranslation,gclArgsInC|
+ |x| |a|)))
+ (SETQ
+ |bfVar#155|
+ (CDR
+ |bfVar#155|)))))))
(SETQ |x| (CDR |x|))
(SETQ |a| (CDR |a|))))
(CONS "); }" NIL))))))))))))
- (|bfVar#141| NIL))
+ (|bfVar#157| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#142|)
+ ((OR (ATOM |bfVar#158|)
(PROGN
- (SETQ |bfVar#141| (CAR |bfVar#142|))
+ (SETQ |bfVar#157| (CAR |bfVar#158|))
NIL))
- (RETURN |bfVar#140|))
- (T (SETQ |bfVar#140|
- (CONCAT |bfVar#140| |bfVar#141|))))
- (SETQ |bfVar#142| (CDR |bfVar#142|)))))
+ (RETURN |bfVar#156|))
+ (T (SETQ |bfVar#156|
+ (CONCAT |bfVar#156| |bfVar#157|))))
+ (SETQ |bfVar#158| (CDR |bfVar#158|)))))
(LIST (LIST 'CLINES |ccode|)
(LIST 'DEFENTRY |op| |argtypes|
(LIST |rettype| |cop|)))))))))
@@ -2631,17 +2783,17 @@
(PROGN
(SETQ |args| NIL)
(SETQ |argtypes| NIL)
- (LET ((|bfVar#145| |s|) (|x| NIL))
+ (LET ((|bfVar#162| |s|) (|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#145|)
- (PROGN (SETQ |x| (CAR |bfVar#145|)) NIL))
+ ((OR (ATOM |bfVar#162|)
+ (PROGN (SETQ |x| (CAR |bfVar#162|)) NIL))
(RETURN NIL))
(T (PROGN
(SETQ |argtypes|
(CONS (|nativeArgumentType| |x|) |argtypes|))
(SETQ |args| (CONS (GENSYM) |args|)))))
- (SETQ |bfVar#145| (CDR |bfVar#145|))))
+ (SETQ |bfVar#162| (CDR |bfVar#162|))))
(SETQ |args| (|reverse| |args|))
(SETQ |rettype| (|nativeReturnType| |t|))
(LIST (LIST 'DEFUN |op| |args|
@@ -2652,40 +2804,50 @@
:ONE-LINER T)))))))
(DEFUN |genECLnativeTranslation,callTemplate| (|op| |n| |s|)
- (LET ((|bfVar#149| "")
- (|bfVar#151|
+ (LET ((|bfVar#167| "")
+ (|bfVar#169|
(CONS (PNAME |op|)
(CONS "("
- (APPEND (LET ((|bfVar#148| NIL)
- (|bfVar#146| (- |n| 1)) (|i| 0)
- (|bfVar#147| |s|) (|x| NIL))
+ (APPEND (LET ((|bfVar#165| NIL)
+ (|bfVar#166| NIL)
+ (|bfVar#163| (- |n| 1)) (|i| 0)
+ (|bfVar#164| |s|) (|x| NIL))
(LOOP
(COND
- ((OR (> |i| |bfVar#146|)
- (ATOM |bfVar#147|)
+ ((OR (> |i| |bfVar#163|)
+ (ATOM |bfVar#164|)
(PROGN
- (SETQ |x| (CAR |bfVar#147|))
+ (SETQ |x| (CAR |bfVar#164|))
NIL))
- (RETURN
- (|reverse!| |bfVar#148|)))
+ (RETURN |bfVar#165|))
(T
- (SETQ |bfVar#148|
- (CONS
- (|genECLnativeTranslation,sharpArg|
- |i| |x|)
- |bfVar#148|))))
+ (COND
+ ((NULL |bfVar#165|)
+ (SETQ |bfVar#165|
+ (SETQ |bfVar#166|
+ (LIST
+ (|genECLnativeTranslation,sharpArg|
+ |i| |x|)))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#166|
+ (LIST
+ (|genECLnativeTranslation,sharpArg|
+ |i| |x|)))
+ (SETQ |bfVar#166|
+ (CDR |bfVar#166|)))))))
(SETQ |i| (+ |i| 1))
- (SETQ |bfVar#147|
- (CDR |bfVar#147|))))
+ (SETQ |bfVar#164|
+ (CDR |bfVar#164|))))
(CONS ")" NIL)))))
- (|bfVar#150| NIL))
+ (|bfVar#168| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#151|)
- (PROGN (SETQ |bfVar#150| (CAR |bfVar#151|)) NIL))
- (RETURN |bfVar#149|))
- (T (SETQ |bfVar#149| (CONCAT |bfVar#149| |bfVar#150|))))
- (SETQ |bfVar#151| (CDR |bfVar#151|)))))
+ ((OR (ATOM |bfVar#169|)
+ (PROGN (SETQ |bfVar#168| (CAR |bfVar#169|)) NIL))
+ (RETURN |bfVar#167|))
+ (T (SETQ |bfVar#167| (CONCAT |bfVar#167| |bfVar#168|))))
+ (SETQ |bfVar#169| (CDR |bfVar#169|)))))
(DEFUN |genECLnativeTranslation,sharpArg| (|i| |x|)
(COND
@@ -2725,38 +2887,52 @@
(PROGN
(SETQ |rettype| (|nativeReturnType| |t|))
(SETQ |argtypes|
- (LET ((|bfVar#153| NIL) (|bfVar#152| |s|) (|x| NIL))
+ (LET ((|bfVar#171| NIL) (|bfVar#172| NIL)
+ (|bfVar#170| |s|) (|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#152|)
- (PROGN (SETQ |x| (CAR |bfVar#152|)) NIL))
- (RETURN (|reverse!| |bfVar#153|)))
- (T (SETQ |bfVar#153|
- (CONS (|nativeArgumentType| |x|)
- |bfVar#153|))))
- (SETQ |bfVar#152| (CDR |bfVar#152|)))))
+ ((OR (ATOM |bfVar#170|)
+ (PROGN (SETQ |x| (CAR |bfVar#170|)) NIL))
+ (RETURN |bfVar#171|))
+ (T (COND
+ ((NULL |bfVar#171|)
+ (SETQ |bfVar#171|
+ (SETQ |bfVar#172|
+ #0=(LIST
+ (|nativeArgumentType| |x|)))))
+ (T (PROGN
+ (RPLACD |bfVar#172| #0#)
+ (SETQ |bfVar#172| (CDR |bfVar#172|)))))))
+ (SETQ |bfVar#170| (CDR |bfVar#170|)))))
(SETQ |n| (INTERN (CONCAT (PNAME |op|) "%clisp-hack")))
(SETQ |parms|
- (LET ((|bfVar#155| NIL) (|bfVar#154| |s|) (|x| NIL))
+ (LET ((|bfVar#174| NIL) (|bfVar#175| NIL)
+ (|bfVar#173| |s|) (|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#154|)
- (PROGN (SETQ |x| (CAR |bfVar#154|)) NIL))
- (RETURN (|reverse!| |bfVar#155|)))
- (T (SETQ |bfVar#155|
- (CONS (GENSYM "parm") |bfVar#155|))))
- (SETQ |bfVar#154| (CDR |bfVar#154|)))))
+ ((OR (ATOM |bfVar#173|)
+ (PROGN (SETQ |x| (CAR |bfVar#173|)) NIL))
+ (RETURN |bfVar#174|))
+ (T (COND
+ ((NULL |bfVar#174|)
+ (SETQ |bfVar#174|
+ (SETQ |bfVar#175|
+ #1=(LIST (GENSYM "parm")))))
+ (T (PROGN
+ (RPLACD |bfVar#175| #1#)
+ (SETQ |bfVar#175| (CDR |bfVar#175|)))))))
+ (SETQ |bfVar#173| (CDR |bfVar#173|)))))
(SETQ |unstableArgs| NIL)
- (LET ((|bfVar#156| |parms|) (|p| NIL) (|bfVar#157| |s|)
- (|x| NIL) (|bfVar#158| |argtypes|) (|y| NIL))
+ (LET ((|bfVar#176| |parms|) (|p| NIL) (|bfVar#177| |s|)
+ (|x| NIL) (|bfVar#178| |argtypes|) (|y| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#156|)
- (PROGN (SETQ |p| (CAR |bfVar#156|)) NIL)
- (ATOM |bfVar#157|)
- (PROGN (SETQ |x| (CAR |bfVar#157|)) NIL)
- (ATOM |bfVar#158|)
- (PROGN (SETQ |y| (CAR |bfVar#158|)) NIL))
+ ((OR (ATOM |bfVar#176|)
+ (PROGN (SETQ |p| (CAR |bfVar#176|)) NIL)
+ (ATOM |bfVar#177|)
+ (PROGN (SETQ |x| (CAR |bfVar#177|)) NIL)
+ (ATOM |bfVar#178|)
+ (PROGN (SETQ |y| (CAR |bfVar#178|)) NIL))
(RETURN NIL))
(T (COND
((|needsStableReference?| |x|)
@@ -2764,31 +2940,39 @@
(SETQ |unstableArgs|
(CONS (CONS |p| (CONS |x| |y|))
|unstableArgs|)))))))
- (SETQ |bfVar#156| (CDR |bfVar#156|))
- (SETQ |bfVar#157| (CDR |bfVar#157|))
- (SETQ |bfVar#158| (CDR |bfVar#158|))))
+ (SETQ |bfVar#176| (CDR |bfVar#176|))
+ (SETQ |bfVar#177| (CDR |bfVar#177|))
+ (SETQ |bfVar#178| (CDR |bfVar#178|))))
(SETQ |foreignDecl|
(LIST (|bfColonColon| 'FFI 'DEF-CALL-OUT) |n|
(LIST :NAME (PNAME |op'|))
(CONS :ARGUMENTS
- (LET ((|bfVar#161| NIL)
- (|bfVar#159| |argtypes|) (|x| NIL)
- (|bfVar#160| |parms|) (|a| NIL))
+ (LET ((|bfVar#181| NIL) (|bfVar#182| NIL)
+ (|bfVar#179| |argtypes|) (|x| NIL)
+ (|bfVar#180| |parms|) (|a| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#159|)
+ ((OR (ATOM |bfVar#179|)
(PROGN
- (SETQ |x| (CAR |bfVar#159|))
+ (SETQ |x| (CAR |bfVar#179|))
NIL)
- (ATOM |bfVar#160|)
+ (ATOM |bfVar#180|)
(PROGN
- (SETQ |a| (CAR |bfVar#160|))
+ (SETQ |a| (CAR |bfVar#180|))
NIL))
- (RETURN (|reverse!| |bfVar#161|)))
- (T (SETQ |bfVar#161|
- (CONS (LIST |a| |x|) |bfVar#161|))))
- (SETQ |bfVar#159| (CDR |bfVar#159|))
- (SETQ |bfVar#160| (CDR |bfVar#160|)))))
+ (RETURN |bfVar#181|))
+ (T (COND
+ ((NULL |bfVar#181|)
+ (SETQ |bfVar#181|
+ (SETQ |bfVar#182|
+ #2=(LIST (LIST |a| |x|)))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#182| #2#)
+ (SETQ |bfVar#182|
+ (CDR |bfVar#182|)))))))
+ (SETQ |bfVar#179| (CDR |bfVar#179|))
+ (SETQ |bfVar#180| (CDR |bfVar#180|)))))
(LIST :RETURN-TYPE |rettype|)
(LIST :LANGUAGE :STDC)))
(SETQ |forwardingFun|
@@ -2796,67 +2980,85 @@
((NULL |unstableArgs|)
(LIST 'DEFUN |op| |parms| (CONS |n| |parms|)))
(T (SETQ |localPairs|
- (LET ((|bfVar#164| NIL)
- (|bfVar#163| |unstableArgs|)
- (|bfVar#162| NIL))
+ (LET ((|bfVar#185| NIL) (|bfVar#186| NIL)
+ (|bfVar#184| |unstableArgs|)
+ (|bfVar#183| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#163|)
+ ((OR (ATOM |bfVar#184|)
(PROGN
- (SETQ |bfVar#162|
- (CAR |bfVar#163|))
+ (SETQ |bfVar#183|
+ (CAR |bfVar#184|))
NIL))
- (RETURN (|reverse!| |bfVar#164|)))
- (T (AND (CONSP |bfVar#162|)
+ (RETURN |bfVar#185|))
+ (T (AND (CONSP |bfVar#183|)
(PROGN
- (SETQ |a| (CAR |bfVar#162|))
+ (SETQ |a| (CAR |bfVar#183|))
(SETQ |ISTMP#1|
- (CDR |bfVar#162|))
+ (CDR |bfVar#183|))
(AND (CONSP |ISTMP#1|)
(PROGN
(SETQ |x| (CAR |ISTMP#1|))
(SETQ |y| (CDR |ISTMP#1|))
T)))
- (SETQ |bfVar#164|
- (CONS
- (CONS |a|
- (CONS |x|
- (CONS |y| (GENSYM "loc"))))
- |bfVar#164|)))))
- (SETQ |bfVar#163| (CDR |bfVar#163|)))))
+ (COND
+ ((NULL |bfVar#185|)
+ (SETQ |bfVar#185|
+ (SETQ |bfVar#186|
+ #3=(LIST
+ (CONS |a|
+ (CONS |x|
+ (CONS |y|
+ (GENSYM "loc"))))))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#186| #3#)
+ (SETQ |bfVar#186|
+ (CDR |bfVar#186|))))))))
+ (SETQ |bfVar#184| (CDR |bfVar#184|)))))
(SETQ |call|
(CONS |n|
- (LET ((|bfVar#166| NIL)
- (|bfVar#165| |parms|) (|p| NIL))
+ (LET ((|bfVar#188| NIL)
+ (|bfVar#189| NIL)
+ (|bfVar#187| |parms|) (|p| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#165|)
+ ((OR (ATOM |bfVar#187|)
(PROGN
- (SETQ |p| (CAR |bfVar#165|))
+ (SETQ |p| (CAR |bfVar#187|))
NIL))
- (RETURN
- (|reverse!| |bfVar#166|)))
+ (RETURN |bfVar#188|))
(T
- (SETQ |bfVar#166|
- (CONS
- (|genCLISPnativeTranslation,actualArg|
- |p| |localPairs|)
- |bfVar#166|))))
- (SETQ |bfVar#165| (CDR |bfVar#165|))))))
+ (COND
+ ((NULL |bfVar#188|)
+ (SETQ |bfVar#188|
+ (SETQ |bfVar#189|
+ (LIST
+ (|genCLISPnativeTranslation,actualArg|
+ |p| |localPairs|)))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#189|
+ (LIST
+ (|genCLISPnativeTranslation,actualArg|
+ |p| |localPairs|)))
+ (SETQ |bfVar#189|
+ (CDR |bfVar#189|)))))))
+ (SETQ |bfVar#187| (CDR |bfVar#187|))))))
(SETQ |call|
(PROGN
(SETQ |fixups|
- (LET ((|bfVar#168| NIL)
- (|bfVar#167| |localPairs|)
+ (LET ((|bfVar#191| NIL)
+ (|bfVar#192| NIL)
+ (|bfVar#190| |localPairs|)
(|p| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#167|)
+ ((OR (ATOM |bfVar#190|)
(PROGN
- (SETQ |p| (CAR |bfVar#167|))
+ (SETQ |p| (CAR |bfVar#190|))
NIL))
- (RETURN
- (|reverse!| |bfVar#168|)))
+ (RETURN |bfVar#191|))
(T
(AND
(NOT
@@ -2864,26 +3066,35 @@
(SETQ |q|
(|genCLISPnativeTranslation,copyBack|
|p|))))
- (SETQ |bfVar#168|
- (CONS |q| |bfVar#168|)))))
- (SETQ |bfVar#167|
- (CDR |bfVar#167|)))))
+ (COND
+ ((NULL |bfVar#191|)
+ (SETQ |bfVar#191|
+ (SETQ |bfVar#192|
+ (LIST |q|))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#192|
+ (LIST |q|))
+ (SETQ |bfVar#192|
+ (CDR |bfVar#192|))))))))
+ (SETQ |bfVar#190|
+ (CDR |bfVar#190|)))))
(COND
((NULL |fixups|) (LIST |call|))
(T (LIST (CONS 'PROG1
(CONS |call| |fixups|)))))))
- (LET ((|bfVar#170| |localPairs|) (|bfVar#169| NIL))
+ (LET ((|bfVar#194| |localPairs|) (|bfVar#193| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#170|)
+ ((OR (ATOM |bfVar#194|)
(PROGN
- (SETQ |bfVar#169| (CAR |bfVar#170|))
+ (SETQ |bfVar#193| (CAR |bfVar#194|))
NIL))
(RETURN NIL))
- (T (AND (CONSP |bfVar#169|)
+ (T (AND (CONSP |bfVar#193|)
(PROGN
- (SETQ |p| (CAR |bfVar#169|))
- (SETQ |ISTMP#1| (CDR |bfVar#169|))
+ (SETQ |p| (CAR |bfVar#193|))
+ (SETQ |ISTMP#1| (CDR |bfVar#193|))
(AND (CONSP |ISTMP#1|)
(PROGN
(SETQ |x| (CAR |ISTMP#1|))
@@ -2906,18 +3117,18 @@
|p|)
|p|)
|call|)))))))
- (SETQ |bfVar#170| (CDR |bfVar#170|))))
+ (SETQ |bfVar#194| (CDR |bfVar#194|))))
(CONS 'DEFUN (CONS |op| (CONS |parms| |call|))))))
(SETQ |$foreignsDefsForCLisp|
(CONS |foreignDecl| |$foreignsDefsForCLisp|))
(LIST |forwardingFun|)))))
-(DEFUN |genCLISPnativeTranslation,copyBack| (|bfVar#171|)
+(DEFUN |genCLISPnativeTranslation,copyBack| (|bfVar#195|)
(PROG (|a| |y| |x| |p|)
(RETURN
(PROGN
- (SETQ |p| (CAR |bfVar#171|))
- (SETQ |x| (CADR . #0=(|bfVar#171|)))
+ (SETQ |p| (CAR |bfVar#195|))
+ (SETQ |x| (CADR . #0=(|bfVar#195|)))
(SETQ |y| (CADDR . #0#))
(SETQ |a| (CDDDR . #0#))
(COND
@@ -2941,35 +3152,49 @@
(PROGN
(SETQ |rettype| (|nativeReturnType| |t|))
(SETQ |argtypes|
- (LET ((|bfVar#173| NIL) (|bfVar#172| |s|) (|x| NIL))
+ (LET ((|bfVar#197| NIL) (|bfVar#198| NIL)
+ (|bfVar#196| |s|) (|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#172|)
- (PROGN (SETQ |x| (CAR |bfVar#172|)) NIL))
- (RETURN (|reverse!| |bfVar#173|)))
- (T (SETQ |bfVar#173|
- (CONS (|nativeArgumentType| |x|)
- |bfVar#173|))))
- (SETQ |bfVar#172| (CDR |bfVar#172|)))))
+ ((OR (ATOM |bfVar#196|)
+ (PROGN (SETQ |x| (CAR |bfVar#196|)) NIL))
+ (RETURN |bfVar#197|))
+ (T (COND
+ ((NULL |bfVar#197|)
+ (SETQ |bfVar#197|
+ (SETQ |bfVar#198|
+ #0=(LIST
+ (|nativeArgumentType| |x|)))))
+ (T (PROGN
+ (RPLACD |bfVar#198| #0#)
+ (SETQ |bfVar#198| (CDR |bfVar#198|)))))))
+ (SETQ |bfVar#196| (CDR |bfVar#196|)))))
(SETQ |args|
- (LET ((|bfVar#175| NIL) (|bfVar#174| |s|) (|x| NIL))
+ (LET ((|bfVar#200| NIL) (|bfVar#201| NIL)
+ (|bfVar#199| |s|) (|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#174|)
- (PROGN (SETQ |x| (CAR |bfVar#174|)) NIL))
- (RETURN (|reverse!| |bfVar#175|)))
- (T (SETQ |bfVar#175| (CONS (GENSYM) |bfVar#175|))))
- (SETQ |bfVar#174| (CDR |bfVar#174|)))))
+ ((OR (ATOM |bfVar#199|)
+ (PROGN (SETQ |x| (CAR |bfVar#199|)) NIL))
+ (RETURN |bfVar#200|))
+ (T (COND
+ ((NULL |bfVar#200|)
+ (SETQ |bfVar#200|
+ (SETQ |bfVar#201| #1=(LIST (GENSYM)))))
+ (T (PROGN
+ (RPLACD |bfVar#201| #1#)
+ (SETQ |bfVar#201| (CDR |bfVar#201|)))))))
+ (SETQ |bfVar#199| (CDR |bfVar#199|)))))
(SETQ |unstableArgs| NIL)
(SETQ |newArgs| NIL)
- (LET ((|bfVar#176| |args|) (|a| NIL) (|bfVar#177| |s|)
+ (LET ((|bfVar#202| |args|) (|a| NIL) (|bfVar#203| |s|)
(|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#176|)
- (PROGN (SETQ |a| (CAR |bfVar#176|)) NIL)
- (ATOM |bfVar#177|)
- (PROGN (SETQ |x| (CAR |bfVar#177|)) NIL))
+ ((OR (ATOM |bfVar#202|)
+ (PROGN (SETQ |a| (CAR |bfVar#202|)) NIL)
+ (ATOM |bfVar#203|)
+ (PROGN (SETQ |x| (CAR |bfVar#203|)) NIL))
(RETURN NIL))
(T (PROGN
(SETQ |newArgs|
@@ -2978,8 +3203,8 @@
(COND
((|needsStableReference?| |x|)
(SETQ |unstableArgs| (CONS |a| |unstableArgs|)))))))
- (SETQ |bfVar#176| (CDR |bfVar#176|))
- (SETQ |bfVar#177| (CDR |bfVar#177|))))
+ (SETQ |bfVar#202| (CDR |bfVar#202|))
+ (SETQ |bfVar#203| (CDR |bfVar#203|))))
(SETQ |op'|
(COND
((|%hasFeature| :WIN32) (CONCAT "_" (PNAME |op'|)))
@@ -3016,36 +3241,50 @@
(PROGN
(SETQ |rettype| (|nativeReturnType| |t|))
(SETQ |argtypes|
- (LET ((|bfVar#179| NIL) (|bfVar#178| |s|) (|x| NIL))
+ (LET ((|bfVar#205| NIL) (|bfVar#206| NIL)
+ (|bfVar#204| |s|) (|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#178|)
- (PROGN (SETQ |x| (CAR |bfVar#178|)) NIL))
- (RETURN (|reverse!| |bfVar#179|)))
- (T (SETQ |bfVar#179|
- (CONS (|nativeArgumentType| |x|)
- |bfVar#179|))))
- (SETQ |bfVar#178| (CDR |bfVar#178|)))))
+ ((OR (ATOM |bfVar#204|)
+ (PROGN (SETQ |x| (CAR |bfVar#204|)) NIL))
+ (RETURN |bfVar#205|))
+ (T (COND
+ ((NULL |bfVar#205|)
+ (SETQ |bfVar#205|
+ (SETQ |bfVar#206|
+ #0=(LIST
+ (|nativeArgumentType| |x|)))))
+ (T (PROGN
+ (RPLACD |bfVar#206| #0#)
+ (SETQ |bfVar#206| (CDR |bfVar#206|)))))))
+ (SETQ |bfVar#204| (CDR |bfVar#204|)))))
(SETQ |parms|
- (LET ((|bfVar#181| NIL) (|bfVar#180| |s|) (|x| NIL))
+ (LET ((|bfVar#208| NIL) (|bfVar#209| NIL)
+ (|bfVar#207| |s|) (|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#180|)
- (PROGN (SETQ |x| (CAR |bfVar#180|)) NIL))
- (RETURN (|reverse!| |bfVar#181|)))
- (T (SETQ |bfVar#181|
- (CONS (GENSYM "parm") |bfVar#181|))))
- (SETQ |bfVar#180| (CDR |bfVar#180|)))))
+ ((OR (ATOM |bfVar#207|)
+ (PROGN (SETQ |x| (CAR |bfVar#207|)) NIL))
+ (RETURN |bfVar#208|))
+ (T (COND
+ ((NULL |bfVar#208|)
+ (SETQ |bfVar#208|
+ (SETQ |bfVar#209|
+ #1=(LIST (GENSYM "parm")))))
+ (T (PROGN
+ (RPLACD |bfVar#209| #1#)
+ (SETQ |bfVar#209| (CDR |bfVar#209|)))))))
+ (SETQ |bfVar#207| (CDR |bfVar#207|)))))
(SETQ |strPairs| NIL)
(SETQ |aryPairs| NIL)
- (LET ((|bfVar#182| |parms|) (|p| NIL) (|bfVar#183| |s|)
+ (LET ((|bfVar#210| |parms|) (|p| NIL) (|bfVar#211| |s|)
(|x| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#182|)
- (PROGN (SETQ |p| (CAR |bfVar#182|)) NIL)
- (ATOM |bfVar#183|)
- (PROGN (SETQ |x| (CAR |bfVar#183|)) NIL))
+ ((OR (ATOM |bfVar#210|)
+ (PROGN (SETQ |p| (CAR |bfVar#210|)) NIL)
+ (ATOM |bfVar#211|)
+ (PROGN (SETQ |x| (CAR |bfVar#211|)) NIL))
(RETURN NIL))
(T (COND
((EQ |x| '|string|)
@@ -3067,33 +3306,33 @@
(NULL (CDR |ISTMP#3|)))))))))
(SETQ |aryPairs|
(CONS (CONS |p| (GENSYM "loc")) |aryPairs|))))))
- (SETQ |bfVar#182| (CDR |bfVar#182|))
- (SETQ |bfVar#183| (CDR |bfVar#183|))))
+ (SETQ |bfVar#210| (CDR |bfVar#210|))
+ (SETQ |bfVar#211| (CDR |bfVar#211|))))
(COND
((|%hasFeature| :DARWIN) (SETQ |op'| (CONCAT '_ |op'|))))
(SETQ |call|
(CONS (|bfColonColon| 'CCL 'EXTERNAL-CALL)
(CONS (STRING |op'|)
- (APPEND (LET ((|bfVar#186| NIL)
- (|bfVar#184| |argtypes|)
- (|x| NIL) (|bfVar#185| |parms|)
+ (APPEND (LET ((|bfVar#214| NIL)
+ (|bfVar#212| |argtypes|)
+ (|x| NIL) (|bfVar#213| |parms|)
(|p| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#184|)
+ ((OR (ATOM |bfVar#212|)
(PROGN
(SETQ |x|
- (CAR |bfVar#184|))
+ (CAR |bfVar#212|))
NIL)
- (ATOM |bfVar#185|)
+ (ATOM |bfVar#213|)
(PROGN
(SETQ |p|
- (CAR |bfVar#185|))
+ (CAR |bfVar#213|))
NIL))
(RETURN
- (|reverse!| |bfVar#186|)))
+ (|reverse!| |bfVar#214|)))
(T
- (SETQ |bfVar#186|
+ (SETQ |bfVar#214|
(APPEND
(|reverse|
(LIST |x|
@@ -3105,45 +3344,53 @@
(ASSOC |p| |aryPairs|))
(CDR |p'|))
(T |p|))))
- |bfVar#186|))))
- (SETQ |bfVar#184|
- (CDR |bfVar#184|))
- (SETQ |bfVar#185|
- (CDR |bfVar#185|))))
+ |bfVar#214|))))
+ (SETQ |bfVar#212|
+ (CDR |bfVar#212|))
+ (SETQ |bfVar#213|
+ (CDR |bfVar#213|))))
(CONS |rettype| NIL)))))
(COND
((EQ |t| '|string|)
(SETQ |call|
(LIST (|bfColonColon| 'CCL 'GET-CSTRING) |call|))))
- (LET ((|bfVar#187| |aryPairs|) (|arg| NIL))
+ (LET ((|bfVar#215| |aryPairs|) (|arg| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#187|)
- (PROGN (SETQ |arg| (CAR |bfVar#187|)) NIL))
+ ((OR (ATOM |bfVar#215|)
+ (PROGN (SETQ |arg| (CAR |bfVar#215|)) NIL))
(RETURN NIL))
(T (SETQ |call|
(LIST (|bfColonColon| 'CCL
'WITH-POINTER-TO-IVECTOR)
(LIST (CDR |arg|) (CAR |arg|)) |call|))))
- (SETQ |bfVar#187| (CDR |bfVar#187|))))
+ (SETQ |bfVar#215| (CDR |bfVar#215|))))
(COND
(|strPairs|
(SETQ |call|
(LIST (|bfColonColon| 'CCL 'WITH-CSTRS)
- (LET ((|bfVar#189| NIL)
- (|bfVar#188| |strPairs|) (|arg| NIL))
+ (LET ((|bfVar#217| NIL) (|bfVar#218| NIL)
+ (|bfVar#216| |strPairs|) (|arg| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#188|)
+ ((OR (ATOM |bfVar#216|)
(PROGN
- (SETQ |arg| (CAR |bfVar#188|))
+ (SETQ |arg| (CAR |bfVar#216|))
NIL))
- (RETURN (|reverse!| |bfVar#189|)))
- (T (SETQ |bfVar#189|
- (CONS
- (LIST (CDR |arg|) (CAR |arg|))
- |bfVar#189|))))
- (SETQ |bfVar#188| (CDR |bfVar#188|))))
+ (RETURN |bfVar#217|))
+ (T (COND
+ ((NULL |bfVar#217|)
+ (SETQ |bfVar#217|
+ (SETQ |bfVar#218|
+ #2=(LIST
+ (LIST (CDR |arg|)
+ (CAR |arg|))))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#218| #2#)
+ (SETQ |bfVar#218|
+ (CDR |bfVar#218|)))))))
+ (SETQ |bfVar#216| (CDR |bfVar#216|))))
|call|))))
(LIST (LIST 'DEFUN |op| |parms| |call|))))))
diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp
index cff321ef..3b791460 100644
--- a/src/boot/strap/translator.clisp
+++ b/src/boot/strap/translator.clisp
@@ -40,6 +40,7 @@
(LIST 'QUOTE
(LET
((|bfVar#2| NIL)
+ (|bfVar#3| NIL)
(|bfVar#1|
|$foreignsDefsForCLisp|)
(|d| NIL))
@@ -50,37 +51,53 @@
(SETQ |d|
(CAR |bfVar#1|))
NIL))
- (RETURN
- (|reverse!|
- |bfVar#2|)))
+ (RETURN |bfVar#2|))
(T
- (SETQ |bfVar#2|
- (CONS (CADR |d|)
- |bfVar#2|))))
+ (COND
+ ((NULL |bfVar#2|)
+ (SETQ |bfVar#2|
+ (SETQ |bfVar#3|
+ #0=(LIST
+ (CADR |d|)))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#3|
+ #0#)
+ (SETQ |bfVar#3|
+ (CDR |bfVar#3|)))))))
(SETQ |bfVar#1|
(CDR |bfVar#1|))))))
(LET
- ((|bfVar#4| NIL)
- (|bfVar#3|
+ ((|bfVar#5| NIL)
+ (|bfVar#6| NIL)
+ (|bfVar#4|
|$foreignsDefsForCLisp|)
(|d| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#3|)
+ ((OR (ATOM |bfVar#4|)
(PROGN
(SETQ |d|
- (CAR |bfVar#3|))
+ (CAR |bfVar#4|))
NIL))
- (RETURN
- (|reverse!| |bfVar#4|)))
+ (RETURN |bfVar#5|))
(T
- (SETQ |bfVar#4|
- (CONS
- (LIST 'EVAL
- (LIST 'QUOTE |d|))
- |bfVar#4|))))
- (SETQ |bfVar#3|
- (CDR |bfVar#3|)))))))))
+ (COND
+ ((NULL |bfVar#5|)
+ (SETQ |bfVar#5|
+ (SETQ |bfVar#6|
+ #1=(LIST
+ (LIST 'EVAL
+ (LIST 'QUOTE
+ |d|))))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#6|
+ #1#)
+ (SETQ |bfVar#6|
+ (CDR |bfVar#6|)))))))
+ (SETQ |bfVar#4|
+ (CDR |bfVar#4|)))))))))
(REALLYPRETTYPRINT |init| |stream|))))
(T NIL)))))
@@ -151,14 +168,14 @@
(|shoeOpenOutputFile| |stream| |outfn|
(PROGN
(|genOptimizeOptions| |stream|)
- (LET ((|bfVar#5| |lines|) (|line| NIL))
+ (LET ((|bfVar#7| |lines|) (|line| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#5|)
- (PROGN (SETQ |line| (CAR |bfVar#5|)) NIL))
+ ((OR (ATOM |bfVar#7|)
+ (PROGN (SETQ |line| (CAR |bfVar#7|)) NIL))
(RETURN NIL))
(T (|shoeFileLine| |line| |stream|)))
- (SETQ |bfVar#5| (CDR |bfVar#5|))))
+ (SETQ |bfVar#7| (CDR |bfVar#7|))))
(|shoeFileTrees| (|shoeTransformStream| |a|) |stream|)
(|genModuleFinalization| |stream|)))
|outfn|)))
@@ -192,14 +209,14 @@
(|shoeOpenOutputFile| |stream| |outfn|
(PROGN
(|genOptimizeOptions| |stream|)
- (LET ((|bfVar#6| |lines|) (|line| NIL))
+ (LET ((|bfVar#8| |lines|) (|line| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#6|)
- (PROGN (SETQ |line| (CAR |bfVar#6|)) NIL))
+ ((OR (ATOM |bfVar#8|)
+ (PROGN (SETQ |line| (CAR |bfVar#8|)) NIL))
(RETURN NIL))
(T (|shoeFileLine| |line| |stream|)))
- (SETQ |bfVar#6| (CDR |bfVar#6|))))
+ (SETQ |bfVar#8| (CDR |bfVar#8|))))
(|shoeFileTrees|
(|shoeTransformToFile| |stream|
(|shoeInclude|
@@ -433,27 +450,27 @@
(DEFUN |shoeFileLines| (|lines| |fn|)
(PROGN
(|shoeFileLine| " " |fn|)
- (LET ((|bfVar#7| |lines|) (|line| NIL))
+ (LET ((|bfVar#9| |lines|) (|line| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#7|)
- (PROGN (SETQ |line| (CAR |bfVar#7|)) NIL))
+ ((OR (ATOM |bfVar#9|)
+ (PROGN (SETQ |line| (CAR |bfVar#9|)) NIL))
(RETURN NIL))
(T (|shoeFileLine| (|shoeAddComment| |line|) |fn|)))
- (SETQ |bfVar#7| (CDR |bfVar#7|))))
+ (SETQ |bfVar#9| (CDR |bfVar#9|))))
(|shoeFileLine| " " |fn|)))
(DEFUN |shoeConsoleLines| (|lines|)
(PROGN
(|shoeConsole| " ")
- (LET ((|bfVar#8| |lines|) (|line| NIL))
+ (LET ((|bfVar#10| |lines|) (|line| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#8|)
- (PROGN (SETQ |line| (CAR |bfVar#8|)) NIL))
+ ((OR (ATOM |bfVar#10|)
+ (PROGN (SETQ |line| (CAR |bfVar#10|)) NIL))
(RETURN NIL))
(T (|shoeConsole| (|shoeAddComment| |line|))))
- (SETQ |bfVar#8| (CDR |bfVar#8|))))
+ (SETQ |bfVar#10| (CDR |bfVar#10|))))
(|shoeConsole| " ")))
(DEFUN |shoeFileLine| (|x| |stream|)
@@ -566,16 +583,16 @@
(PROGN
(SETQ |expr'|
(CDR (CDR (|shoeCompTran| (LIST 'LAMBDA NIL |expr|)))))
- (LET ((|bfVar#9| |expr'|) (|t| NIL))
+ (LET ((|bfVar#11| |expr'|) (|t| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#9|)
- (PROGN (SETQ |t| (CAR |bfVar#9|)) NIL))
+ ((OR (ATOM |bfVar#11|)
+ (PROGN (SETQ |t| (CAR |bfVar#11|)) NIL))
(RETURN NIL))
(T (COND
((AND (CONSP |t|) (EQ (CAR |t|) 'DECLARE))
(IDENTITY (RPLACA |t| 'DECLAIM))))))
- (SETQ |bfVar#9| (CDR |bfVar#9|))))
+ (SETQ |bfVar#11| (CDR |bfVar#11|))))
(SETQ |expr'|
(COND
((< 1 (LENGTH |expr'|)) (CONS 'PROGN |expr'|))
@@ -616,26 +633,32 @@
(CONS (LIST 'PROVIDE (SYMBOL-NAME |m|))
(APPEND (|exportNames| |ns|)
(LET
- ((|bfVar#11| NIL) (|bfVar#10| |ds|)
- (|d| NIL))
+ ((|bfVar#13| NIL) (|bfVar#14| NIL)
+ (|bfVar#12| |ds|) (|d| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#10|)
+ ((OR (ATOM |bfVar#12|)
(PROGN
(SETQ |d|
- (CAR |bfVar#10|))
+ (CAR |bfVar#12|))
NIL))
- (RETURN
- (|reverse!| |bfVar#11|)))
+ (RETURN |bfVar#13|))
(T
- (SETQ |bfVar#11|
- (CONS
- (CAR
- (|translateToplevel| |d|
- T))
- |bfVar#11|))))
- (SETQ |bfVar#10|
- (CDR |bfVar#10|)))))))))
+ (COND
+ ((NULL |bfVar#13|)
+ (SETQ |bfVar#13|
+ (SETQ |bfVar#14|
+ #0=(LIST
+ (CAR
+ (|translateToplevel|
+ |d| T))))))
+ (T
+ (PROGN
+ (RPLACD |bfVar#14| #0#)
+ (SETQ |bfVar#14|
+ (CDR |bfVar#14|)))))))
+ (SETQ |bfVar#12|
+ (CDR |bfVar#12|)))))))))
(|%Import|
(LET ((|m| (CADR |b|)))
(PROGN
@@ -703,19 +726,24 @@
(|bfMDef| |op| |args| |body|)))
(|%Structure|
(LET ((|t| (CADR |b|)) (|alts| (CADDR |b|)))
- (LET ((|bfVar#13| NIL) (|bfVar#12| |alts|)
- (|alt| NIL))
+ (LET ((|bfVar#16| NIL) (|bfVar#17| NIL)
+ (|bfVar#15| |alts|) (|alt| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#12|)
+ ((OR (ATOM |bfVar#15|)
(PROGN
- (SETQ |alt| (CAR |bfVar#12|))
+ (SETQ |alt| (CAR |bfVar#15|))
NIL))
- (RETURN (|reverse!| |bfVar#13|)))
- (T (SETQ |bfVar#13|
- (CONS (|bfCreateDef| |alt|)
- |bfVar#13|))))
- (SETQ |bfVar#12| (CDR |bfVar#12|))))))
+ (RETURN |bfVar#16|))
+ (T (COND
+ ((NULL |bfVar#16|)
+ (SETQ |bfVar#16|
+ (SETQ |bfVar#17|
+ #1=(LIST (|bfCreateDef| |alt|)))))
+ (T (PROGN
+ (RPLACD |bfVar#17| #1#)
+ (SETQ |bfVar#17| (CDR |bfVar#17|)))))))
+ (SETQ |bfVar#15| (CDR |bfVar#15|))))))
(|%Namespace|
(LET ((|n| (CADR |b|)))
(PROGN
@@ -787,16 +815,22 @@
(PROGN
(|shoeFileLine| "DEFINED and not USED" |stream|)
(SETQ |a|
- (LET ((|bfVar#15| NIL)
- (|bfVar#14| (HKEYS |$bootDefined|)) (|i| NIL))
+ (LET ((|bfVar#19| NIL) (|bfVar#20| NIL)
+ (|bfVar#18| (HKEYS |$bootDefined|)) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#14|)
- (PROGN (SETQ |i| (CAR |bfVar#14|)) NIL))
- (RETURN (|reverse!| |bfVar#15|)))
+ ((OR (ATOM |bfVar#18|)
+ (PROGN (SETQ |i| (CAR |bfVar#18|)) NIL))
+ (RETURN |bfVar#19|))
(T (AND (NOT (GETHASH |i| |$bootUsed|))
- (SETQ |bfVar#15| (CONS |i| |bfVar#15|)))))
- (SETQ |bfVar#14| (CDR |bfVar#14|)))))
+ (COND
+ ((NULL |bfVar#19|)
+ (SETQ |bfVar#19|
+ (SETQ |bfVar#20| #0=(LIST |i|))))
+ (T (PROGN
+ (RPLACD |bfVar#20| #0#)
+ (SETQ |bfVar#20| (CDR |bfVar#20|))))))))
+ (SETQ |bfVar#18| (CDR |bfVar#18|)))))
(|bootOut| (SSORT |a|) |stream|)
(|shoeFileLine| " " |stream|)
(|shoeFileLine| "DEFINED TWICE" |stream|)
@@ -804,27 +838,33 @@
(|shoeFileLine| " " |stream|)
(|shoeFileLine| "USED and not DEFINED" |stream|)
(SETQ |a|
- (LET ((|bfVar#17| NIL) (|bfVar#16| (HKEYS |$bootUsed|))
- (|i| NIL))
+ (LET ((|bfVar#22| NIL) (|bfVar#23| NIL)
+ (|bfVar#21| (HKEYS |$bootUsed|)) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#16|)
- (PROGN (SETQ |i| (CAR |bfVar#16|)) NIL))
- (RETURN (|reverse!| |bfVar#17|)))
+ ((OR (ATOM |bfVar#21|)
+ (PROGN (SETQ |i| (CAR |bfVar#21|)) NIL))
+ (RETURN |bfVar#22|))
(T (AND (NOT (GETHASH |i| |$bootDefined|))
- (SETQ |bfVar#17| (CONS |i| |bfVar#17|)))))
- (SETQ |bfVar#16| (CDR |bfVar#16|)))))
- (LET ((|bfVar#18| (SSORT |a|)) (|i| NIL))
+ (COND
+ ((NULL |bfVar#22|)
+ (SETQ |bfVar#22|
+ (SETQ |bfVar#23| #1=(LIST |i|))))
+ (T (PROGN
+ (RPLACD |bfVar#23| #1#)
+ (SETQ |bfVar#23| (CDR |bfVar#23|))))))))
+ (SETQ |bfVar#21| (CDR |bfVar#21|)))))
+ (LET ((|bfVar#24| (SSORT |a|)) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#18|)
- (PROGN (SETQ |i| (CAR |bfVar#18|)) NIL))
+ ((OR (ATOM |bfVar#24|)
+ (PROGN (SETQ |i| (CAR |bfVar#24|)) NIL))
(RETURN NIL))
(T (PROGN
(SETQ |b| (CONCAT (PNAME |i|) " is used in "))
(|bootOutLines| (SSORT (GETHASH |i| |$bootUsed|))
|stream| |b|))))
- (SETQ |bfVar#18| (CDR |bfVar#18|))))))))
+ (SETQ |bfVar#24| (CDR |bfVar#24|))))))))
(DEFUN |shoeDefUse| (|s|)
(LOOP
@@ -920,15 +960,15 @@
(T (CONS |nee| |$bootDefinedTwice|)))))
(T (HPUT |$bootDefined| |nee| T)))
(|defuse1| |e| |niens|)
- (LET ((|bfVar#19| |$used|) (|i| NIL))
+ (LET ((|bfVar#25| |$used|) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#19|)
- (PROGN (SETQ |i| (CAR |bfVar#19|)) NIL))
+ ((OR (ATOM |bfVar#25|)
+ (PROGN (SETQ |i| (CAR |bfVar#25|)) NIL))
(RETURN NIL))
(T (HPUT |$bootUsed| |i|
(CONS |nee| (GETHASH |i| |$bootUsed|)))))
- (SETQ |bfVar#19| (CDR |bfVar#19|))))))))
+ (SETQ |bfVar#25| (CDR |bfVar#25|))))))))
(DEFUN |defuse1| (|e| |y|)
(PROG (|ndol| |dol| |LETTMP#1| |b| |a| |ISTMP#1|)
@@ -964,27 +1004,27 @@
T))))
(SETQ |LETTMP#1| (|defSeparate| |a|))
(SETQ |dol| (CAR |LETTMP#1|)) (SETQ |ndol| (CADR |LETTMP#1|))
- (LET ((|bfVar#20| |dol|) (|i| NIL))
+ (LET ((|bfVar#26| |dol|) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#20|)
- (PROGN (SETQ |i| (CAR |bfVar#20|)) NIL))
+ ((OR (ATOM |bfVar#26|)
+ (PROGN (SETQ |i| (CAR |bfVar#26|)) NIL))
(RETURN NIL))
(T (HPUT |$bootDefined| |i| T)))
- (SETQ |bfVar#20| (CDR |bfVar#20|))))
+ (SETQ |bfVar#26| (CDR |bfVar#26|))))
(|defuse1| (APPEND |ndol| |e|) |b|))
((AND (CONSP |y|) (EQ (CAR |y|) 'QUOTE)) (SETQ |a| (CDR |y|))
NIL)
((AND (CONSP |y|) (EQ (CAR |y|) '+LINE)) (SETQ |a| (CDR |y|))
NIL)
- (T (LET ((|bfVar#21| |y|) (|i| NIL))
+ (T (LET ((|bfVar#27| |y|) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#21|)
- (PROGN (SETQ |i| (CAR |bfVar#21|)) NIL))
+ ((OR (ATOM |bfVar#27|)
+ (PROGN (SETQ |i| (CAR |bfVar#27|)) NIL))
(RETURN NIL))
(T (|defuse1| |e| |i|)))
- (SETQ |bfVar#21| (CDR |bfVar#21|)))))))))
+ (SETQ |bfVar#27| (CDR |bfVar#27|)))))))))
(DEFUN |defSeparate| (|x|)
(PROG (|x2| |x1| |LETTMP#1| |f|)
@@ -1017,13 +1057,13 @@
(GETHASH |x| |$lispWordTable|))
(DEFUN |bootOut| (|l| |outfn|)
- (LET ((|bfVar#22| |l|) (|i| NIL))
+ (LET ((|bfVar#28| |l|) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#22|) (PROGN (SETQ |i| (CAR |bfVar#22|)) NIL))
+ ((OR (ATOM |bfVar#28|) (PROGN (SETQ |i| (CAR |bfVar#28|)) NIL))
(RETURN NIL))
(T (|shoeFileLine| (CONCAT " " (PNAME |i|)) |outfn|)))
- (SETQ |bfVar#22| (CDR |bfVar#22|)))))
+ (SETQ |bfVar#28| (CDR |bfVar#28|)))))
(DEFUN CLESSP (|s1| |s2|) (NOT (SHOEGREATERP |s1| |s2|)))
@@ -1074,36 +1114,42 @@
(PROGN
(|shoeFileLine| "USED and where DEFINED" |stream|)
(SETQ |c| (SSORT (HKEYS |$bootUsed|)))
- (LET ((|bfVar#23| |c|) (|i| NIL))
+ (LET ((|bfVar#29| |c|) (|i| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#23|)
- (PROGN (SETQ |i| (CAR |bfVar#23|)) NIL))
+ ((OR (ATOM |bfVar#29|)
+ (PROGN (SETQ |i| (CAR |bfVar#29|)) NIL))
(RETURN NIL))
(T (PROGN
(SETQ |a| (CONCAT (PNAME |i|) " is used in "))
(|bootOutLines| (SSORT (GETHASH |i| |$bootUsed|))
|stream| |a|))))
- (SETQ |bfVar#23| (CDR |bfVar#23|))))))))
+ (SETQ |bfVar#29| (CDR |bfVar#29|))))))))
(DEFUN |shoeItem| (|str|)
(PROG (|dq|)
(RETURN
(PROGN
(SETQ |dq| (CAR |str|))
- (CONS (LIST (LET ((|bfVar#25| NIL)
- (|bfVar#24| (|shoeDQlines| |dq|))
+ (CONS (LIST (LET ((|bfVar#31| NIL) (|bfVar#32| NIL)
+ (|bfVar#30| (|shoeDQlines| |dq|))
(|line| NIL))
(LOOP
(COND
- ((OR (ATOM |bfVar#24|)
+ ((OR (ATOM |bfVar#30|)
(PROGN
- (SETQ |line| (CAR |bfVar#24|))
+ (SETQ |line| (CAR |bfVar#30|))
NIL))
- (RETURN (|reverse!| |bfVar#25|)))
- (T (SETQ |bfVar#25|
- (CONS (CAR |line|) |bfVar#25|))))
- (SETQ |bfVar#24| (CDR |bfVar#24|)))))
+ (RETURN |bfVar#31|))
+ (T (COND
+ ((NULL |bfVar#31|)
+ (SETQ |bfVar#31|
+ (SETQ |bfVar#32|
+ #0=(LIST (CAR |line|)))))
+ (T (PROGN
+ (RPLACD |bfVar#32| #0#)
+ (SETQ |bfVar#32| (CDR |bfVar#32|)))))))
+ (SETQ |bfVar#30| (CDR |bfVar#30|)))))
(CDR |str|))))))
(DEFUN |stripm| (|x| |pk| |bt|)