aboutsummaryrefslogtreecommitdiff
path: root/src/boot/strap/utility.clisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-10-02 03:35:59 +0000
committerdos-reis <gdr@axiomatics.org>2011-10-02 03:35:59 +0000
commit8640c7b9aa33084d77770f435814d1d8558c8e2e (patch)
tree968ff56d45b80dcc8ad3002703025cf27995e155 /src/boot/strap/utility.clisp
parent496ca25659180bb29cc5fea2f3c0337695d742d3 (diff)
downloadopen-axiom-8640c7b9aa33084d77770f435814d1d8558c8e2e.tar.gz
* boot/utility.boot (objectAssoc): New. Export.
* boot/ast.boot: Use it. instead of ASSOC. * boot/translator.boot (packageBody): Tidy. * interp/astr.boot: Use objectAssoc instead of ASSQ. * interp/br-con.boot: Likewise. * interp/br-op1.boot: Likewise. * interp/br-saturn.boot: Likewise. * interp/buildom.boot: Likewise. * interp/c-util.boot: Likewise. * interp/category.boot: Likewise. * interp/clam.boot: Likewise. * interp/compiler.boot: Likewise. * interp/define.boot: Likewise. * interp/functor.boot: Likewise. * interp/g-util.boot: Likewise. * interp/i-coerce.boot: Likewise. * interp/i-coerfn.boot: Likewise. * interp/i-funsel.boot: Likewise. * interp/i-object.boot: Likewise. * interp/i-output.boot: Likewise. * interp/i-resolv.boot: Likewise. * interp/i-special.boot: Likewise. * interp/i-syscmd.boot: Likewise. * interp/i-util.boot: Likewise. * interp/int-top.boot: Likewise. * interp/lisplib.boot: Likewise. * interp/msg.boot: Likewise. * interp/posit.boot: Likewise. * interp/termrw.boot: Likewise. * interp/trace.boot: Likewise. * interp/sys-utility.boot (upwardCut): New. * interp/spad.lisp: Use it. * interp/util.lisp: Likewise. * interp/spaderror.lisp: Likewise. * interp/vmlisp.lisp (ASSEMBLE): Remove. (ASSQ): Likewise. (MEMQ): Likewise. (NAMEDERRSET): Likewise. (ORADDTEMPDEFS): Likewise. * interp/macros.lisp (QLASSQ): Move to vmlisp.lisp. (LASSQ): Remove.
Diffstat (limited to 'src/boot/strap/utility.clisp')
-rw-r--r--src/boot/strap/utility.clisp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/boot/strap/utility.clisp b/src/boot/strap/utility.clisp
index 8a06ff0c..7125bd09 100644
--- a/src/boot/strap/utility.clisp
+++ b/src/boot/strap/utility.clisp
@@ -48,6 +48,12 @@
(FTYPE (FUNCTION ((|%List| |%Thing|) |%Thing|) (|%List| |%Thing|)) |remove|))
(DECLAIM
+ (FTYPE
+ (FUNCTION (|%Thing| (|%List| (|%Pair| |%Thing| |%Thing|)))
+ (|%Maybe| (|%Pair| |%Thing| |%Thing|)))
+ |objectAssoc|))
+
+(DECLAIM
(FTYPE (FUNCTION ((|%List| |%Thing|) (|%List| |%Thing|)) (|%List| |%Thing|))
|setDifference|))
@@ -329,6 +335,17 @@
((OR (CHARACTERP |x|) (INTEGERP |x|)) (|removeScalar| |l| |x|))
(T (|removeValue| |l| |x|))))
+(DEFUN |objectAssoc| (|x| |l|)
+ (PROG (|a| |p|)
+ (RETURN
+ (LOOP
+ (COND
+ ((NOT
+ (AND (CONSP |l|) (PROGN (SETQ |p| (CAR |l|)) (SETQ |l| (CDR |l|)) T)))
+ (RETURN NIL))
+ ((AND (CONSP |p|) (PROGN (SETQ |a| (CAR |p|)) T) (EQ |a| |x|))
+ (RETURN |p|)))))))
+
(DEFUN |charPosition| (|c| |s| |k|)
(PROG (|n|)
(RETURN