From f87a31a02a7b0b84ed877880d9ae22253ce89671 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 21 May 2011 10:17:53 +0000 Subject: more cleanup --- src/boot/strap/ast.clisp | 8 ++++---- src/boot/strap/utility.clisp | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/boot/strap') diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp index 266b7e21..61a5f103 100644 --- a/src/boot/strap/ast.clisp +++ b/src/boot/strap/ast.clisp @@ -272,8 +272,7 @@ (COND ((NULL |x|) NIL) ((AND (SYMBOLP |x|) (|bfBeginsDollar| |x|)) (|compFluid| |x|)) - ((ATOM |x|) |x|) - ((AND (CONSP |x|) (EQ (CAR |x|) 'QUOTE)) |x|) + ((|atomic?| |x|) |x|) (T (CONS (|compFluidize| (CAR |x|)) (|compFluidize| (CDR |x|)))))) (DEFUN |bfPlace| (|x|) (CONS '|%Place| |x|)) @@ -740,7 +739,7 @@ (DEFUN |bfSUBLIS| (|p| |e|) (COND ((ATOM |e|) (|bfSUBLIS1| |p| |e|)) - ((AND (CONSP |e|) (EQ (CAR |e|) 'QUOTE)) |e|) + ((EQ (CAR |e|) 'QUOTE) |e|) (T (CONS (|bfSUBLIS| |p| (CAR |e|)) (|bfSUBLIS| |p| (CDR |e|)))))) (DEFUN |bfSUBLIS1| (|p| |e|) @@ -1800,7 +1799,8 @@ (DEFUN |shoeATOMs| (|x|) (COND ((NULL |x|) NIL) - ((ATOM |x|) (LIST |x|)) + ((SYMBOLP |x|) (LIST |x|)) + ((ATOM |x|) NIL) (T (|append| (|shoeATOMs| (CAR |x|)) (|shoeATOMs| (CDR |x|)))))) (DEFUN |isDynamicVariable| (|x|) diff --git a/src/boot/strap/utility.clisp b/src/boot/strap/utility.clisp index 7bfc9387..a832a3ce 100644 --- a/src/boot/strap/utility.clisp +++ b/src/boot/strap/utility.clisp @@ -10,7 +10,8 @@ |charMember?| |scalarMember?| |listMember?| |reverse| |reverse!| |lastNode| |append| |append!| |copyList| |substitute| |substitute!| |setDifference| |applySubst| - |applySubst!| |applySubstNQ| |remove| |removeSymbol|))) + |applySubst!| |applySubstNQ| |remove| |removeSymbol| + |atomic?|))) (DECLAIM (FTYPE (FUNCTION (|%Thing| |%Thing| |%Thing|) |%Thing|) |substitute|)) @@ -41,6 +42,10 @@ (|%List| |%Thing|)) |remove|)) +(DECLAIM (FTYPE (FUNCTION (|%Thing|) |%Boolean|) |atomic?|)) + +(DEFUN |atomic?| (|x|) (OR (NOT (CONSP |x|)) (EQ (CAR |x|) 'QUOTE))) + (DEFUN |objectMember?| (|x| |l|) (LOOP (COND -- cgit v1.2.3