aboutsummaryrefslogtreecommitdiff
path: root/src/boot/strap
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/strap')
-rw-r--r--src/boot/strap/ast.clisp27
-rw-r--r--src/boot/strap/utility.clisp15
2 files changed, 38 insertions, 4 deletions
diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp
index 67d31787..081dab12 100644
--- a/src/boot/strap/ast.clisp
+++ b/src/boot/strap/ast.clisp
@@ -194,9 +194,32 @@
(DEFUN |bfPile| (|part|) |part|)
-(DECLAIM (FTYPE (FUNCTION ((|%List| |%Form|)) |%Form|) |bfAppend|))
+(DECLAIM (FTYPE (FUNCTION ((|%List| (|%List| (|%List| |%Form|))))
+ (|%List| |%Form|))
+ |bfAppend|))
-(DEFUN |bfAppend| (|x|) (APPLY #'APPEND |x|))
+(DEFUN |bfAppend| (|ls|)
+ (PROG (|p| |r| |l|)
+ (RETURN
+ (COND
+ ((NOT (AND (CONSP |ls|)
+ (PROGN
+ (SETQ |l| (CAR |ls|))
+ (SETQ |ls| (CDR |ls|))
+ T)))
+ NIL)
+ (T (SETQ |r| (|copyList| |l|)) (SETQ |p| |r|)
+ (LOOP
+ (COND
+ ((NOT (AND (CONSP |ls|)
+ (PROGN
+ (SETQ |l| (CAR |ls|))
+ (SETQ |ls| (CDR |ls|))
+ T)))
+ (RETURN |r|))
+ ((NULL |l|) NIL)
+ (T (RPLACD (|lastNode| |p|) (|copyList| |l|))
+ (SETQ |p| (CDR |p|))))))))))
(DECLAIM (FTYPE (FUNCTION ((|%List| |%Form|) |%Form|) |%Form|)
|bfColonAppend|))
diff --git a/src/boot/strap/utility.clisp b/src/boot/strap/utility.clisp
index 48ac0037..2d531fd2 100644
--- a/src/boot/strap/utility.clisp
+++ b/src/boot/strap/utility.clisp
@@ -11,8 +11,19 @@
|setDifference| |applySubst| |applySubst!| |remove|
|removeSymbol|))
-(DECLAIM (FTYPE (FUNCTION ((|%List| |%Symbol|) |%Symbol|)
- (|%List| |%Symbol|))
+(DECLAIM (FTYPE (FUNCTION ((|%List| (|%List| |%Thing|)))
+ (|%List| |%Thing|))
+ |append!|))
+
+(DECLAIM (FTYPE (FUNCTION ((|%List| |%Thing|)) (|%List| |%Thing|))
+ |copyList|))
+
+(DECLAIM (FTYPE (FUNCTION ((|%List| |%Thing|))
+ (|%Maybe| (|%Node| |%Thing|)))
+ |lastNode|))
+
+(DECLAIM (FTYPE (FUNCTION ((|%List| |%Thing|) |%Symbol|)
+ (|%List| |%Thing|))
|removeSymbol|))
(DECLAIM (FTYPE (FUNCTION ((|%List| |%Thing|) |%Thing|)