From 867516e089b95f4495fd345aeda3fd5e40b76839 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 23 Apr 2011 07:00:16 +0000 Subject: * boot/ast.boot (bf0APPEND): Remove. (bf0COLLECT): Likewise. (bfCollect): Tidy. --- src/boot/strap/ast.clisp | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'src/boot/strap/ast.clisp') diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp index c9805a04..cfd5f684 100644 --- a/src/boot/strap/ast.clisp +++ b/src/boot/strap/ast.clisp @@ -494,7 +494,7 @@ (DEFUN |bfDTuple| (|x|) (LIST 'DTUPLE |x|)) (DEFUN |bfCollect| (|y| |itl|) - (PROG (|newBody| |a| |ISTMP#1|) + (PROG (|a| |ISTMP#1|) (RETURN (COND ((AND (CONSP |y|) (EQ (CAR |y|) 'COLON) @@ -502,25 +502,11 @@ (SETQ |ISTMP#1| (CDR |y|)) (AND (CONSP |ISTMP#1|) (NULL (CDR |ISTMP#1|)) (PROGN (SETQ |a| (CAR |ISTMP#1|)) T)))) - (|bf0APPEND| |a| |itl|)) + (|bfListReduce| 'APPEND (LIST '|reverse| |a|) |itl|)) ((AND (CONSP |y|) (EQ (CAR |y|) 'TUPLE)) - (SETQ |newBody| (|bfConstruct| |y|)) - (|bf0APPEND| |newBody| |itl|)) - (T (|bf0COLLECT| |y| |itl|)))))) - -(DEFUN |bf0COLLECT| (|y| |itl|) (|bfListReduce| 'CONS |y| |itl|)) - -(DEFUN |bf0APPEND| (|y| |itl|) - (PROG (|extrait| |body| |g|) - (RETURN - (PROGN - (SETQ |g| (|bfGenSymbol|)) - (SETQ |body| - (LIST 'SETQ |g| (LIST 'APPEND (LIST '|reverse| |y|) |g|))) - (SETQ |extrait| - (LIST (LIST (LIST |g|) (LIST NIL) NIL NIL NIL - (LIST (LIST '|reverse!| |g|))))) - (|bfLp2| |extrait| |itl| |body|))))) + (|bfListReduce| 'APPEND (LIST '|reverse| (|bfConstruct| |y|)) + |itl|)) + (T (|bfListReduce| 'CONS |y| |itl|)))))) (DEFUN |bfListReduce| (|op| |y| |itl|) (PROG (|extrait| |body| |g|) -- cgit v1.2.3