aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog10
-rw-r--r--src/interp/c-util.boot4
-rw-r--r--src/interp/define.boot4
-rw-r--r--src/interp/i-map.boot8
-rw-r--r--src/interp/pspad2.boot1
-rw-r--r--src/interp/wi1.boot2
6 files changed, 21 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 37880817..f8d78fc8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
2010-05-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/c-util.boot ($ClearBodyToken): New constant.
+ * interp/define.boot (compDefineCapsuleFunction): Use it in place
+ of special character.
+ (spadCompileOrSetq): Likewise.
+ * interp/i-map.boot (addMap): Likewise.
+ (getUserIdentifiersIn): Likewise.
+ * interp/wi1.boot (spadCompileOrSetq): Likewise.
+
+2010-05-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/g-util.boot: Add expanders for %lt, %le, %gt, %ge, %not,
%and, %or, and %bind forms.
* interp/c-util.boot (mutateToBackendCode): Handle LET and LET* forms.
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 552b007c..3e264d35 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -50,6 +50,10 @@ module c_-util where
--%
+++ Token to indicate that a function body should be ignored.
+$ClearBodyToken ==
+ KEYWORD::OpenAxiomClearBodyToken
+
++
$ConstructorCache := hashTable 'EQ
diff --git a/src/interp/define.boot b/src/interp/define.boot
index b9dfc7af..cc247270 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1020,7 +1020,7 @@ compDefineCapsuleFunction(df is ['DEF,form,signature,specialCases,body],
noteCapsuleFunctionDefinition($op,signature', makePredicate $predl)
T := CATCH('compCapsuleBody, compOrCroak(body,rettype,e))
- or [" ",rettype,e]
+ or [$ClearBodyToken,rettype,e]
NRTassignCapsuleFunctionSlot($op,signature')
if $newCompCompare=true then
SAY '"The old compiler generates:"
@@ -1233,7 +1233,7 @@ compile u ==
spadCompileOrSetq (form is [nam,[lam,vl,body]]) ==
--bizarre hack to take account of the existence of "known" functions
--good for performance (LISPLLIB size, BPI size, NILSEC)
- CONTAINED(" ",body) => sayBrightly ['" ",:bright nam,'" not compiled"]
+ CONTAINED($ClearBodyToken,body) => sayBrightly ['" ",:bright nam,'" not compiled"]
-- flag parameters needs to be made atomic, otherwise Lisp is confused.
-- We try our best to preserve
diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot
index bfc99b6d..10b64ceb 100644
--- a/src/interp/i-map.boot
+++ b/src/interp/i-map.boot
@@ -192,7 +192,7 @@ addMap(lhs,rhs,pred) ==
null newMap =>
sayRemoveFunctionOrValue op
putHist(op,'alias,nil,$e)
- " " -- clears value--- see return from addDefMap in tree2Atree1
+ $ClearBodyToken --- see return from addDefMap in tree2Atree1
if get(op,'isInterpreterRule,$e) then type := ['RuleCalled,op]
else type := ['FunctionCalled,op]
recursive :=
@@ -204,10 +204,10 @@ addMap(lhs,rhs,pred) ==
augmentMap(op,args,pred,body,oldMap) ==
pattern:= makePattern(args,pred)
newMap:=deleteMap(op,pattern,oldMap)
- body=" " =>
+ body = $ClearBodyToken =>
if newMap=oldMap then
sayMSG ['" Cannot find part of",:bright op,'"to delete."]
- newMap --just delete rule if body is
+ newMap --just delete rule if body is $ClearBodyToken
entry:= [pattern,:body]
resultMap:=
newMap is ["%Map",:tail] => ["%Map",:tail,entry]
@@ -227,7 +227,7 @@ getUserIdentifiersIn body ==
null body => nil
IDENTP body =>
isSharpVarWithNum body => nil
- body=" " => nil
+ body = $ClearBodyToken => nil
[body]
body is ["WRAPPED",:.] => nil
body is [op,:itl,body1] and op in '(COLLECT REPEAT %collect) =>
diff --git a/src/interp/pspad2.boot b/src/interp/pspad2.boot
index 4e11875a..23beaf0d 100644
--- a/src/interp/pspad2.boot
+++ b/src/interp/pspad2.boot
@@ -327,7 +327,6 @@ formatTail1 x ==
format ":" and formatConstructItem a and formatTail b
format ":" and formatConstructItem x and format "]"
--- x = "." => format " "
formatConstructItem x == format x
formatLET ["%LET",a,b] ==
diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot
index b2941ba7..7c47213c 100644
--- a/src/interp/wi1.boot
+++ b/src/interp/wi1.boot
@@ -853,7 +853,7 @@ spadCompileOrSetq form ==
--bizarre hack to take account of the existence of "known" functions
--good for performance (LISPLLIB size, BPI size, NILSEC)
[nam,[lam,vl,body]] := form
- CONTAINED(" ",body) => sayBrightly ['" ",:bright nam,'" not compiled"]
+ CONTAINED($ClearBodyToken,body) => sayBrightly ['" ",:bright nam,'" not compiled"]
if vl is [:vl',E] and body is [nam',: =vl'] then
LAM_,EVALANDFILEACTQ ['PUT,MKQ nam,MKQ 'SPADreplace,MKQ nam']
sayBrightly ['" ",:bright nam,'"is replaced by",:bright nam']