aboutsummaryrefslogtreecommitdiff
path: root/src/interp/slam.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-28 17:17:13 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-28 17:17:13 +0000
commitee3f516ae9eb4f32285d530a6c2d875b6b86164b (patch)
tree21b8d87a6e11842a8410cee012a8db46c3e083e7 /src/interp/slam.boot
parent3d42ed01a18486fb8390503753fe31bbb75c9551 (diff)
downloadopen-axiom-ee3f516ae9eb4f32285d530a6c2d875b6b86164b.tar.gz
* 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.
Diffstat (limited to 'src/interp/slam.boot')
-rw-r--r--src/interp/slam.boot21
1 files changed, 17 insertions, 4 deletions
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