From ee3f516ae9eb4f32285d530a6c2d875b6b86164b Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 28 Jun 2010 17:17:13 +0000 Subject: * interp/slam.boot (clearCache): Use reallyClearLocalModemaps to remove local modemaps.Likewise. (clearLocalModemaps): Likewise. Tidy. (reallyClearLocalModemaps): New. Remove dynamically generated function definition for internal Lisp-level functions. --- src/interp/slam.boot | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'src/interp') diff --git a/src/interp/slam.boot b/src/interp/slam.boot index 0affa71f..2b404a55 100644 --- a/src/interp/slam.boot +++ b/src/interp/slam.boot @@ -382,21 +382,32 @@ mkCacheVec(op,nam,kind,resetCode,countCode) == -- u:= getI(op,"cache") => -- reportCacheStorePrint(op,'variable,nodeCount u) -- nil - + +++ We are about to clear local modemaps associated with `x'. +++ It is insufficient to just remove the internal functions +++ form the 'localModemap property list in the current environment. +++ We also need to clear any Lisp-level function resulting from +++ previous compilations. +reallyClearLocalModemaps x == + for mm in get(x,'localModemap,$e) repeat + FMAKUNBOUND second mm + $e:= putHist(x,'localModemap,nil,$e) + + clearCache x == get(x,'localModemap,$e) or get(x,'mapBody,$e) => for [map,:sub] in $mapSubNameAlist repeat map=x => _/UNTRACE_,2(sub,NIL) - $e:= putHist(x,'localModemap,nil,$e) + $e := reallyClearLocalModemaps x $e:= putHist(x,'mapBody,nil,$e) $e:= putHist(x,'localVars,nil,$e) sayKeyedMsg("S2IX0007",[x]) clearLocalModemaps x == - u:= get(x,"localModemap",$e) => + u := get(x,"localModemap",$e) => for sub in ASSOCRIGHT $mapSubNameAlist repeat _/UNTRACE_,2(sub,NIL) - $e:= putHist(x,"localModemap",nil,$e) + $e:= reallyClearLocalModemaps x for mm in u repeat [.,fn,:.] := mm if def:= get(fn,'definition,$e) then @@ -406,6 +417,8 @@ clearLocalModemaps x == -- now clear the property list of the identifier $e := addIntSymTabBinding(x,nil,$e) sayKeyedMsg("S2IX0007",[x]) + $e + $e compileInteractive fn == if $InteractiveMode then startTimingProcess 'compilation -- cgit v1.2.3