aboutsummaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/interp/slam.boot21
2 files changed, 25 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3ff117da..a496c95a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,13 @@
2010-06-28 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * 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.
+
+2010-06-28 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/i-map.boot (findExternalVarsInBindExpr): New.
(findLocalVars1): Use it for %bind-expressions.
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