diff options
author | dos-reis <gdr@axiomatics.org> | 2011-04-30 16:40:44 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-04-30 16:40:44 +0000 |
commit | 5770442f576aa0c1e389344a636f1e4edca1b136 (patch) | |
tree | c5612b9517bc16bfcbd40611d6c6cc94ad081000 /src/interp | |
parent | bd5f5b0df93361d31592738fb18d77a275f04bc9 (diff) | |
download | open-axiom-5770442f576aa0c1e389344a636f1e4edca1b136.tar.gz |
* interp/vmlisp.lisp (NREMOVE): Remove.
(EFFACE): Likewise.
* interp/sys-utility.boot (remove!): New.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/c-util.boot | 2 | ||||
-rw-r--r-- | src/interp/functor.boot | 2 | ||||
-rw-r--r-- | src/interp/ht-util.boot | 2 | ||||
-rw-r--r-- | src/interp/i-syscmd.boot | 2 | ||||
-rw-r--r-- | src/interp/sys-utility.boot | 15 | ||||
-rw-r--r-- | src/interp/vmlisp.lisp | 8 |
6 files changed, 18 insertions, 13 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index c1a7b4f3..f3bb0bf1 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -830,7 +830,7 @@ stackWarning(msg,args == nil) == unStackWarning(msg,args) == msg := buildMessage(msg,args) if $insideCapsuleFunctionIfTrue then msg:= [$op,": ",:msg] - $warningStack:= EFFACE(msg,$warningStack) + $warningStack := remove!($warningStack,msg) nil stackMessage(msg,args == nil) == diff --git a/src/interp/functor.boot b/src/interp/functor.boot index e5821bd1..4891546e 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -692,7 +692,7 @@ InvestigateConditions catvecListMaker == code is ['CATEGORY,:l] => "union"/[Conds(u,previous) for u in l] code is ['Join,:l] => "union"/[Conds(u,previous) for u in l] [previous] - $Conditions:= EFFACE(nil,[EFFACE(nil,u) for u in $Conditions]) + $Conditions := remove!([remove!(u,nil) for u in $Conditions],nil) partList:= [getViewsConditions partPessimise($principal,cond) for cond in $Conditions] masterSecondaries:= secondaries diff --git a/src/interp/ht-util.boot b/src/interp/ht-util.boot index 9c35fab5..76e6bab7 100644 --- a/src/interp/ht-util.boot +++ b/src/interp/ht-util.boot @@ -53,7 +53,7 @@ $activePageList := nil htpDestroyPage(pageName) == pageName in $activePageList => setDynamicBinding(pageName, nil) - $activePageList := NREMOVE($activePageList, pageName) + $activePageList := remove!($activePageList,pageName) htpName htPage == -- a symbol whose value is the page diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index 1ab82514..97c06443 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -1454,7 +1454,7 @@ changeToNamedInterpreterFrame(name) == updateCurrentInterpreterFrame() frame := findFrameInRing(name) null frame => NIL - $interpreterFrameRing := [frame,:NREMOVE($interpreterFrameRing, frame)] + $interpreterFrameRing := [frame,:remove!($interpreterFrameRing,frame)] updateFromCurrentInterpreterFrame() findFrameInRing(name) == diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index c9667864..b12c4734 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -39,7 +39,8 @@ import hash namespace BOOT module sys_-utility where - probleReadableFile : %String -> %Maybe %String + probeReadableFile : %String -> %Maybe %String + remove!: (%List %Thing,%Thing) -> %List %Thing --% $COMBLOCKLIST := nil @@ -379,3 +380,15 @@ symbolLassoc(s,l) == p := symbolAssoc(s,l) => rest p nil +--% +remove!(l,x) == + l = nil => nil + valueEq?(first l,x) => rest l + p := l + repeat + p isnt [.,.,:.] => return l + valueEq?(second p,x) => + p.rest := p.rest.rest + return l + p := rest p + diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp index c8f83c3d..9c0de8f7 100644 --- a/src/interp/vmlisp.lisp +++ b/src/interp/vmlisp.lisp @@ -770,14 +770,6 @@ ((EQUAL (CAAR Y) X) (RETURN (CAR Y))) ) (SETQ Y (CDR Y)) (GO A))))) -; 14.5 Updating - -(defun NREMOVE (list item &optional (count 1)) - (if (integerp count) - (delete item list :count count :test #'equal) - (delete item list :test #'equal))) - -(defun EFFACE (item list) (delete item list :count 1 :test #'equal)) ; 14.6 Miscellaneous |