aboutsummaryrefslogtreecommitdiff
path: root/src/boot/strap
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/strap')
-rw-r--r--src/boot/strap/ast.clisp3
-rw-r--r--src/boot/strap/tokens.clisp1
-rw-r--r--src/boot/strap/translator.clisp4
-rw-r--r--src/boot/strap/utility.clisp24
4 files changed, 27 insertions, 5 deletions
diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp
index 36d45495..ad885aaa 100644
--- a/src/boot/strap/ast.clisp
+++ b/src/boot/strap/ast.clisp
@@ -1542,7 +1542,8 @@
(SETQ |$dollarVars| NIL)
(|shoeCompTran1| |body|)
(SETQ |$locVars|
- (SETDIFFERENCE (SETDIFFERENCE |$locVars| |$fluidVars|)
+ (|setDifference|
+ (|setDifference| |$locVars| |$fluidVars|)
(|shoeATOMs| |args|)))
(SETQ |body|
(PROGN
diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp
index d19d76d8..6843b904 100644
--- a/src/boot/strap/tokens.clisp
+++ b/src/boot/strap/tokens.clisp
@@ -237,7 +237,6 @@
(LIST '|rest| 'CDR) (LIST '|sameObject?| 'EQ)
(LIST '|scalarEq?| 'EQL) (LIST '|scalarEqual?| 'EQL)
(LIST '|second| 'CADR)
- (LIST '|setDifference| 'SETDIFFERENCE)
(LIST '|setIntersection| 'INTERSECTION)
(LIST '|setPart| 'SETELT) (LIST '|setUnion| 'UNION)
(LIST '|strconc| 'CONCAT) (LIST '|stringChar| 'SCHAR)
diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp
index 5aff56f2..cff321ef 100644
--- a/src/boot/strap/translator.clisp
+++ b/src/boot/strap/translator.clisp
@@ -13,6 +13,8 @@
(PROVIDE "translator")
+(EXPORT '|evalBootFile|)
+
(DEFPARAMETER |$currentModuleName| NIL)
(DEFPARAMETER |$foreignsDefsForCLisp| NIL)
@@ -228,7 +230,7 @@
(T (|shoePCompileTrees| (|shoeTransformStream| |a|))
(|shoeConsole| (CONCAT |fn| " COMPILED AND LOADED")))))
-(DEFUN EVAL-BOOT-FILE (|fn|)
+(DEFUN |evalBootFile| (|fn|)
(PROG (|outfn| |infn| |b|)
(RETURN
(PROGN
diff --git a/src/boot/strap/utility.clisp b/src/boot/strap/utility.clisp
index 4f9a741f..38951dd9 100644
--- a/src/boot/strap/utility.clisp
+++ b/src/boot/strap/utility.clisp
@@ -7,8 +7,8 @@
(EXPORT '(|objectMember?| |symbolMember?| |stringMember?| |charMember?|
|scalarMember?| |listMember?| |reverse| |reverse!|
- |lastNode| |append!| |copyList| |substitute|
- |substitute!|))
+ |lastNode| |append!| |copyList| |substitute| |substitute!|
+ |setDifference|))
(DEFUN |objectMember?| (|x| |l|)
(LOOP
@@ -142,3 +142,23 @@
(T (CONS |h| |t|))))
(T |s|)))))
+(DEFUN |setDifference| (|x| |y|)
+ (PROG (|a| |l| |p|)
+ (RETURN
+ (COND
+ ((NULL |x|) NIL)
+ ((NULL |y|) |x|)
+ (T (SETQ |l| (SETQ |p| (LIST NIL)))
+ (LET ((|bfVar#1| |x|))
+ (LOOP
+ (COND
+ ((ATOM |bfVar#1|) (RETURN NIL))
+ (T (AND (CONSP |bfVar#1|)
+ (PROGN (SETQ |a| (CAR |bfVar#1|)) T)
+ (NOT (|objectMember?| |a| |y|))
+ (PROGN
+ (RPLACD |p| (LIST |a|))
+ (SETQ |p| (CDR |p|))))))
+ (SETQ |bfVar#1| (CDR |bfVar#1|))))
+ (CDR |l|))))))
+