diff options
author | dos-reis <gdr@axiomatics.org> | 2011-04-22 00:58:05 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-04-22 00:58:05 +0000 |
commit | b0046ba3929c513a399fd1ebb84dee1712c55a02 (patch) | |
tree | 97e562abe62305f257a27c97a59aeaed5fdd93ba /src/boot/strap | |
parent | f5a47d23d57cb91b89254c7a5904baee0f004e2b (diff) | |
download | open-axiom-b0046ba3929c513a399fd1ebb84dee1712c55a02.tar.gz |
* boot/utility.boot (copyList): Define.
(append!): Likewise.
* boot/tokens.boot: Do not translate nconc.
Diffstat (limited to 'src/boot/strap')
-rw-r--r-- | src/boot/strap/ast.clisp | 2 | ||||
-rw-r--r-- | src/boot/strap/tokens.clisp | 7 | ||||
-rw-r--r-- | src/boot/strap/utility.clisp | 22 |
3 files changed, 25 insertions, 6 deletions
diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp index b903d432..36d45495 100644 --- a/src/boot/strap/ast.clisp +++ b/src/boot/strap/ast.clisp @@ -1975,7 +1975,7 @@ (SETQ |bfVar#124| (CDR |bfVar#124|))))) (SETQ |$wheredefs| (APPEND |a| |$wheredefs|)) (|bfMKPROGN| - (|bfSUBLIS| |opassoc| (NCONC |nondefs| (LIST |expr|)))))))) + (|bfSUBLIS| |opassoc| (|append!| |nondefs| (LIST |expr|)))))))) (DEFUN |bfCompHash| (|op| |argl| |body|) (PROG (|computeFunction| |auxfn|) diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index 0de0c434..d19d76d8 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -183,9 +183,9 @@ (LIST 'CONCAT "") (LIST 'MAX (- 999999)) (LIST 'MIN 999999) (LIST '* 1) (LIST '|times| 1) (LIST 'CONS NIL) (LIST 'APPEND NIL) - (LIST '|append| NIL) (LIST 'UNION NIL) - (LIST 'UNIONQ NIL) (LIST '|union| NIL) - (LIST 'NCONC NIL) (LIST '|and| T) (LIST '|or| NIL) + (LIST '|append| NIL) (LIST '|append!| NIL) + (LIST 'UNION NIL) (LIST 'UNIONQ NIL) + (LIST '|union| NIL) (LIST '|and| T) (LIST '|or| NIL) (LIST 'AND T) (LIST 'OR NIL))) (|i| NIL)) (LOOP @@ -224,7 +224,6 @@ (LIST '|lowerCase?| 'LOWER-CASE-P) (LIST '|makeSymbol| 'INTERN) (LIST '|maxIndex| 'MAXINDEX) (LIST '|mkpf| 'MKPF) - (LIST '|nconc| 'NCONC) (LIST '|newString| 'MAKE-STRING) (LIST '|newVector| 'MAKE-ARRAY) (LIST '|nil| NIL) (LIST '|not| 'NOT) (LIST '|null| 'NULL) diff --git a/src/boot/strap/utility.clisp b/src/boot/strap/utility.clisp index 9b7dbef4..5e6003fc 100644 --- a/src/boot/strap/utility.clisp +++ b/src/boot/strap/utility.clisp @@ -7,7 +7,7 @@ (EXPORT '(|objectMember?| |symbolMember?| |stringMember?| |charMember?| |scalarMember?| |listMember?| |reverse| |reverse!| - |lastNode|)) + |lastNode| |append!| |copyList|)) (DEFUN |objectMember?| (|x| |l|) (LOOP @@ -99,3 +99,23 @@ (T (SETQ |l| |l'|)))) |l|)))) +(DEFUN |copyList| (|l|) + (PROG (|l'| |t|) + (RETURN + (COND + ((NOT (CONSP |l|)) |l|) + (T (SETQ |l'| (SETQ |t| (LIST (CAR |l|)))) + (LOOP + (PROGN + (SETQ |l| (CDR |l|)) + (COND + ((CONSP |l|) (RPLACD |t| (LIST (CAR |l|))) + (SETQ |t| (CDR |t|))) + (T (RPLACD |t| |l|) (RETURN |l'|)))))))))) + +(DEFUN |append!| (|x| |y|) + (COND + ((NULL |x|) |y|) + ((NULL |y|) |x|) + (T (RPLACD (|lastNode| |x|) |y|) |x|))) + |