From 0204a2e9c993ee408d769cc6e2f91506b5699c81 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 4 Oct 2011 00:01:48 +0000 Subject: * boot/utility.boot (symbolAssoc): Rename from assocSymbol. Export. * interp/functor.boot: Remove getAbbreviation, mkAbbrev, addsuffix. * interp/sys-utility.boot (symbolAssoc): Remove as redundant. (scalarTarget): New. * interp/bc-matrix.boot: Use symbolTarget instead of symbolLassoc. * interp/br-con.boot: Use QLASSQ instead of symbolTarget. * interp/br-data.boot: Likewise. * interp/br-op1.boot: Likewise. * interp/br-prof.boot: Likewise. * interp/br-saturn.boot: Likewise. * interp/br-search.boot: Likewise. * interp/buildom.boot: Likewise. * interp/c-doc.boot: Likewise. * interp/c-util.boot: Likewise. * interp/cattable.boot: Likewise. * interp/clam.boot: Likewise. * interp/define.boot: Likewise. * interp/format.boot: Likewise. * interp/g-timer.boot: Likewise. * interp/g-util.boot: Likewise. * interp/ht-util.boot: Likewise. * interp/htsetvar.boot: Likewise. * interp/i-intern.boot: Likewise. * interp/i-map.boot: Likewise. * interp/i-object.boot: Likewise. * interp/i-syscmd.boot: Likewise. * interp/lisplib.boot: Likewise. * interp/profile.boot: Likewise. * interp/trace.boot: Likewise. * interp/vmlisp.lisp (assoc): Tidy. --- src/interp/vmlisp.lisp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'src/interp/vmlisp.lisp') diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp index bbf199f6..e922e1de 100644 --- a/src/interp/vmlisp.lisp +++ b/src/interp/vmlisp.lisp @@ -671,26 +671,13 @@ ; 14.3 Searching -(defun QLASSQ (p a-list) (cdr (|objectAssoc| p a-list))) - (DEFUN |assoc| (X Y) "Return the pair associated with key X in association list Y." ; ignores non-nil list terminators ; ignores non-pair a-list entries - (cond ((symbolp X) - (PROG NIL - A (COND ((ATOM Y) (RETURN NIL)) - ((NOT (consp (CAR Y))) ) - ((EQ (CAAR Y) X) (RETURN (CAR Y))) ) - (SETQ Y (CDR Y)) - (GO A))) + (cond ((symbolp X) (|symbolAssoc| X Y)) ((or (numberp x) (characterp x)) - (PROG NIL - A (COND ((ATOM Y) (RETURN NIL)) - ((NOT (consp (CAR Y))) ) - ((EQL (CAAR Y) X) (RETURN (CAR Y))) ) - (SETQ Y (CDR Y)) - (GO A))) + (|scalarAssoc| X Y)) (t (PROG NIL A (COND ((ATOM Y) (RETURN NIL)) -- cgit v1.2.3