aboutsummaryrefslogtreecommitdiff
path: root/src/interp/sys-macros.lisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-07-05 03:50:32 +0000
committerdos-reis <gdr@axiomatics.org>2009-07-05 03:50:32 +0000
commit3b9f124fb12034e4aaaa9c13222caa24940c37dc (patch)
tree4e47a38cecf1614affbcc0943236c71f4b697d52 /src/interp/sys-macros.lisp
parente2587f659cb1f58cb198ce0c841f43015378457f (diff)
downloadopen-axiom-3b9f124fb12034e4aaaa9c13222caa24940c37dc.tar.gz
* interp/c-util.boot ($middleEndMacroList): Remove COLLECTV.
* interp/compiler.boot: Don't register compiler for COLLECTV forms. (compReduce1): Don't test for COLLECTV. (localReferenceIfThere): New. (compRepeatOrCollect): Use it. Tidy. (compCollectV): Remove. (compIteratorV): Likewise. (computeMaxIndex): Likewise. (exprDifference): Likewise. * interp/g-opt.boot (optCollectVector): New. Register as back end tranformer. * interp/sys-macros.lisp (COLLECTV): Remove.
Diffstat (limited to 'src/interp/sys-macros.lisp')
-rw-r--r--src/interp/sys-macros.lisp65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/interp/sys-macros.lisp b/src/interp/sys-macros.lisp
index b610af09..d0f934ad 100644
--- a/src/interp/sys-macros.lisp
+++ b/src/interp/sys-macros.lisp
@@ -1205,71 +1205,6 @@
(let ((U (REPEAT-TRAN L NIL)))
(CONS 'THETA (CONS '\, (NCONC (CAR U) (LIST (CDR U)))))))
-(defmacro COLLECTV (&rest L)
- (PROG (CONDS BODY ANS COUNTER X Y)
- ;;If we can work out how often we will go round
- ;; allocate a vector first
- (SETQ CONDS NIL)
- (SETQ BODY (REVERSE L))
- (SETQ ANS (GENSYM))
- (SETQ COUNTER NIL)
- (SETQ X (CDR BODY))
- (SETQ BODY (CAR BODY))
- LP
- (COND ((NULL X)
- (COND ((NULL COUNTER)
- (SETQ COUNTER (GENSYM))
- (SETQ L (CONS (LIST 'ISTEP COUNTER 0 1) L)) ))
- (RETURN (LIST 'PROGN
- (LIST 'SPADLET
- ANS
- (LIST 'GETREFV
- (COND ((NULL CONDS)
- (fail))
- ((NULL (CDR CONDS))
- (CAR CONDS))
- ((CONS 'MIN CONDS)) ) ))
- (CONS 'REPEAT
- (NCONC (CDR (REVERSE L))
- (LIST (LIST '|setSimpleArrayEntry|
- ANS
- COUNTER
- BODY))))
- ANS)) ))
- (SETQ Y (CAR X))
- (SETQ X (CDR X))
- (COND ((MEMQ (CAR Y) '(SUCHTHAT WHILE UNTIL))
- (RETURN (LIST 'LIST2VEC (CONS 'COLLECT L)) ))
- ((member (CAR Y) '(IN ON) :test #'eq)
- (SETQ CONDS (CONS (LIST 'SIZE (CADDR Y)) CONDS))
- (GO LP))
- ((member (CAR Y) '(STEP ISTEP) :test #'eq)
- (if (AND (EQL (CADDR Y) 0)
- (EQL (CADDDR Y) 1))
- (SETQ COUNTER (CADR Y)) )
- (COND ((CDDDDR Y) ; there may not be a limit
- (SETQ CONDS
- (CONS
- (COND ((EQL 1 (CADDDR Y))
- (COND ((EQL 1 (CADDR Y))
- (CAR (CDDDDR Y)))
- ((EQL 0 (CADDR Y))
- (MKQSADD1 (CAR (CDDDDR Y))))
- ((MKQSADD1 `(- ,(CAR (CDDDDR Y))
- ,(CADDR Y))))))
- ((EQL 1 (CADDR Y))
- `(/ ,(CAR (CDDDDR Y)) ,(CADDR Y)))
- ((EQL 0 (CADDR Y))
- `(/ ,(MKQSADD1 (CAR (CDDDDR Y)))
- ,(CADDR Y)))
- (`(/ (- ,(MKQSADD1 (CAR (CDDDDR Y)))
- ,(CADDR Y))
- ,(CADDR Y))))
- CONDS))))
- (GO LP)))
- (ERROR "Cannot handle macro expansion")))
-
-
;;
;; -*- Non-Local Gotos -*-
;;