aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/cattable.boot4
-rw-r--r--src/interp/clam.boot13
-rw-r--r--src/interp/define.boot6
-rw-r--r--src/interp/format.boot2
-rw-r--r--src/interp/functor.boot9
-rw-r--r--src/interp/g-opt.boot35
-rw-r--r--src/interp/mark.boot2
-rw-r--r--src/interp/pspad1.boot2
-rw-r--r--src/interp/pspad2.boot2
-rw-r--r--src/interp/slam.boot12
-rw-r--r--src/interp/sys-constants.boot8
-rw-r--r--src/interp/wi1.boot4
-rw-r--r--src/interp/wi2.boot2
13 files changed, 43 insertions, 58 deletions
diff --git a/src/interp/cattable.boot b/src/interp/cattable.boot
index ff4066a4..6104ef51 100644
--- a/src/interp/cattable.boot
+++ b/src/interp/cattable.boot
@@ -105,11 +105,11 @@ simpHasPred(pred,:options) == main where
simpHasAttribute(form,a,b)
op in '(AND OR NOT) =>
null (u := MKPF([simp p for p in r],op)) => nil
- u is '(QUOTE T) => true
+ u = '%true or u is '(QUOTE T) => true
simpBool u
op = 'hasArgs => ($hasArgs => $hasArgs = r; pred)
null r and opOf op = "has" => simp first pred
- pred is '(QUOTE T) => true
+ pred = '%true or pred is '(QUOTE T) => true
op1 := LASSOC(op,'((and . AND)(or . OR)(not . NOT))) => simp [op1,:r]
simp first pred --REMOVE THIS HACK !!!!
pred in '(T etc) => pred
diff --git a/src/interp/clam.boot b/src/interp/clam.boot
index 608aff79..bf66a8a0 100644
--- a/src/interp/clam.boot
+++ b/src/interp/clam.boot
@@ -134,10 +134,9 @@ compClam(op,argl,body,$clamList) ==
countFl => ['CONS,1,g2]
g2
thirdPredPair:=
--- null argl => ['(QUOTE T),['SETQ,cacheName,computeValue]]
- ['(QUOTE T),
- ['SETQ,g2,computeValue],
- ['SETQ,g3,['CAR,cacheName]],
+ ['%true,
+ ['%store,g2,computeValue],
+ ['%store,g3,['CAR,cacheName]],
['RPLACA,g3,g1],
['RPLACD,g3,resetCacheEntry],
g2]
@@ -247,7 +246,7 @@ compHash(op,argl,body,cacheNameOrNil,eqEtc,countFl) ==
if cacheNameOrNil then putCode :=
['UNWIND_-PROTECT,['PROG1,putCode,['SETQ,g2,'T]],
['COND,[['NOT,g2],['HREM,cacheName,MKQ op]]]]
- thirdPredPair:= ['(QUOTE T),putCode]
+ thirdPredPair:= ['%true,putCode]
codeBody:= ['PROG,[g2],
:callCountCode,['RETURN,['COND,secondPredPair,thirdPredPair]]]
lamex:= ['LAM,arg,codeBody]
@@ -299,12 +298,12 @@ compHashGlobal(op,argl,body,cacheName,eqEtc,countFl) ==
countFl => ['CDRwithIncrement,g2]
g2
getCode:= ['HGET,cacheName,cacheArgKey]
- secondPredPair:= [['SETQ,g2,getCode],returnFoundValue]
+ secondPredPair:= [['%store,g2,getCode],returnFoundValue]
putForm:= ['CONS,MKQ op,g1]
putCode:=
countFl => ['HPUT,cacheName,putForm,['CONS,1,computeValue]]
['HPUT,cacheName,putForm,computeValue]
- thirdPredPair:= ['(QUOTE T),putCode]
+ thirdPredPair:= ['%true,putCode]
codeBody:= ['PROG,[g2], ['RETURN,['COND,secondPredPair,thirdPredPair]]]
lamex:= ['LAM,arg,codeBody]
mainFunction:= [op,lamex]
diff --git a/src/interp/define.boot b/src/interp/define.boot
index c2f08f1d..558b28fb 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1188,7 +1188,7 @@ addArgumentConditions($body,$functionName) ==
fn clist ==
clist is [[n,untypedCondition,typedCondition],:.] =>
['COND,[typedCondition,fn rest clist],
- [$true,["argumentDataError",n,
+ ['%true,["argumentDataError",n,
MKQ untypedCondition,MKQ $functionName]]]
null clist => $body
systemErrorHere ["addArgumentConditions",clist]
@@ -1571,7 +1571,7 @@ doItIf(item is [.,p,x,y],$predl,$e) ==
compSingleCapsuleItem(y,[["not",p],:$predl],getInverseEnvironment(p,olde))
y':=localExtras(oldFLP)
item.op := "COND"
- item.rest := [[p',x,:x'],['(QUOTE T),y,:y']]
+ item.rest := [[p',x,:x'],['%true,y,:y']]
where localExtras(oldFLP) ==
EQ(oldFLP,$functorLocalParameters) => NIL
flp1:=$functorLocalParameters
@@ -1692,7 +1692,7 @@ DomainSubstitutionFunction(parameters,body) ==
--should not bother if it will only be called once
name:= INTERN strconc(KAR $definition,";CAT")
SETANDFILE(name,nil)
- body:= ["COND",[name],['(QUOTE T),['SETQ,name,body]]]
+ body:= ["COND",[name],['%true,['%store,name,body]]]
body
diff --git a/src/interp/format.boot b/src/interp/format.boot
index 15ba282d..06652ba3 100644
--- a/src/interp/format.boot
+++ b/src/interp/format.boot
@@ -680,7 +680,7 @@ plural(n,string) ==
formatIf pred ==
not pred => nil
- member(pred,'(T (QUOTE T))) => nil
+ member(pred,'(T %true (QUOTE T))) => nil
concat('%b,'"if",'%d,pred2English pred)
formatPredParts s ==
diff --git a/src/interp/functor.boot b/src/interp/functor.boot
index 3b8d900c..97e3938a 100644
--- a/src/interp/functor.boot
+++ b/src/interp/functor.boot
@@ -253,10 +253,9 @@ optFunctorBody x ==
[CondClause u for u in l | u and first u] where
CondClause [pred,:conseq] ==
[optFunctorBody pred,:optFunctorPROGN conseq]
- l:= EFFACE('((QUOTE T)),l)
- --delete any trailing ("T)
+ l:= EFFACE(['%true],l) --delete any trailing ("T)
null l => nil
- CAAR l='(QUOTE T) =>
+ CAAR l='%true =>
(null CDAR l => nil; null CDDAR l => CADAR l; ["PROGN",:CDAR l])
null rest l and null CDAR l =>
--there is no meat to this COND
@@ -525,7 +524,7 @@ DescendCode(code,flag,viewAssoc,EnvToPass) ==
else viewAssoc,EnvToPass) for v in rest u]
TruthP CAAR c => ['PROGN,:CDAR c]
while (c and (LAST c is [c1] or LAST c is [c1,[]]) and
- (c1 = '(QUOTE T) or c1 is ['HasAttribute,:.])) repeat
+ (c1 = '%true or c1 is ['HasAttribute,:.])) repeat
--strip out some worthless junk at the end
c:=nreverse rest nreverse c
null c => '(LIST)
@@ -745,7 +744,7 @@ InvestigateConditions catvecListMaker ==
($HackSlot4:= [reshape u for u in $HackSlot4]) where
reshape u ==
['COND,[TryGDC ICformat rest u],
- ['(QUOTE T),['RPLACA,'(CAR TrueDomain),
+ ['%true,['RPLACA,'(CAR TrueDomain),
['delete,['QUOTE,first u],'(CAAR TrueDomain)]]]]
$supplementaries:=
[u
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index ccde3eb8..2bc01ca1 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -311,20 +311,20 @@ optCond (x is ['COND,:l]) ==
if l is [a,[aa,b]] and TruthP aa and b is ["COND",:c] then
x.rest.rest := c
if l is [[p1,:c1],[p2,:c2],:.] then
- if (p1 is ["NOT",=p2]) or (p2 is ["NOT",=p1]) then
- l:=[[p1,:c1],['(QUOTE T),:c2]]
+ if (p1 is ['%not,=p2]) or (p2 is ['%not,=p1]) then
+ l:=[[p1,:c1],['%true,:c2]]
x.rest := l
- c1 is ['NIL] and p2 = '(QUOTE T) and first c2 = '(QUOTE T) =>
- p1 is ["NOT",p1']=> return p1'
- return ["NOT",p1]
+ c1 is ['NIL] and p2 = '%true and first c2 = '%true =>
+ p1 is ['%not,p1']=> return p1'
+ return ['%not,p1]
l is [[p1,:c1],[p2,:c2],[p3,:c3]] and TruthP p3 =>
EqualBarGensym(c1,c3) =>
- ["COND",[["OR",p1,["NOT",p2]],:c1],[['QUOTE,true],:c2]]
- EqualBarGensym(c1,c2) => ["COND",[["OR",p1,p2],:c1],[['QUOTE,true],:c3]]
+ ["COND",[['%or,p1,['%not,p2]],:c1],['%true,:c2]]
+ EqualBarGensym(c1,c2) => ["COND",[['%or,p1,p2],:c1],['%true,:c3]]
x
for y in tails l repeat
while y is [[a1,c1],[a2,c2],:y'] and EqualBarGensym(c1,c2) repeat
- a:=['OR,a1,a2]
+ a:=['%or,a1,a2]
first(y).first := a
y.rest := y'
x
@@ -351,30 +351,25 @@ EqualBarGensym(x,y) ==
--Called early, to change IF to COND
optIF2COND ["IF",a,b,c] ==
- b is "%noBranch" => ["COND",[["NOT",a],c]]
+ b is "%noBranch" => ["COND",[['%not,a],c]]
c is "%noBranch" => ["COND",[a,b]]
c is ["IF",:.] => ["COND",[a,b],:rest optIF2COND c]
c is ["COND",:p] => ["COND",[a,b],:p]
- ["COND",[a,b],[$true,c]]
+ ["COND",[a,b],['%true,c]]
optXLAMCond x ==
x is ["COND",u:= [p,c],:l] =>
- (optPredicateIfTrue p => c; ["COND",u,:optCONDtail l])
+ (p = '%true => c; ["COND",u,:optCONDtail l])
atom x => x
x.first := optXLAMCond first x
x.rest := optXLAMCond rest x
x
-optPredicateIfTrue p ==
- p is ['QUOTE,:.] => true
- p is [fn,x] and MEMQ(fn,$BasicPredicates) and FUNCALL(fn,x) => true
- nil
-
optCONDtail l ==
null l => nil
[frst:= [p,c],:l']:= l
- optPredicateIfTrue p => [[$true,c]]
- null rest l => [frst,[$true,["CondError"]]]
+ p = '%true => [['%true,c]]
+ null rest l => [frst,['%true,["CondError"]]]
[frst,:optCONDtail l']
++ Determine whether the symbol `g' is the name of a temporary that
@@ -406,8 +401,8 @@ optSEQ ["SEQ",:l] ==
before:= take(#transform,l)
aft:= after(l,before)
null before => ["SEQ",:aft]
- null aft => ["COND",:transform,'((QUOTE T) (conderr))]
- ["COND",:transform,['(QUOTE T),optSEQ ["SEQ",:aft]]]
+ null aft => ["COND",:transform,'(%true (conderr))]
+ ["COND",:transform,['%true,optSEQ ["SEQ",:aft]]]
tryToRemoveSEQ l ==
l is ["SEQ",[op,a]] and op in '(EXIT RETURN THROW) => a
l
diff --git a/src/interp/mark.boot b/src/interp/mark.boot
index 2f8849fa..cd7997d4 100644
--- a/src/interp/mark.boot
+++ b/src/interp/mark.boot
@@ -1469,7 +1469,7 @@ buildNewDefinition(op,theSig,formPredAlist) ==
theAlist := [[pred, first form, :theArgl] for [pred,:form] in alist]
theNils := [nil for x in theForm]
thePred :=
- member(outerPred, '(T (QUOTE T))) => nil
+ member(outerPred, '(T %true)) => nil
outerPred
def := ['DEF, theForm, theSig, theNils, ifize theAlist]
value :=
diff --git a/src/interp/pspad1.boot b/src/interp/pspad1.boot
index 7534a057..2af4ef75 100644
--- a/src/interp/pspad1.boot
+++ b/src/interp/pspad1.boot
@@ -365,7 +365,7 @@ formatForm (u) ==
[op,:argl] := u
if op in '(Record Union) then
$fieldNames := union(getFieldNames argl,$fieldNames)
- MEMQ(op,'((QUOTE T) true)) => format "true"
+ MEMQ(op,'(true %true)) => format "true"
op in '(false nil) => format op
u='(Zero) => format 0
u='(One) => format 1
diff --git a/src/interp/pspad2.boot b/src/interp/pspad2.boot
index 173fca07..ed99dbd6 100644
--- a/src/interp/pspad2.boot
+++ b/src/interp/pspad2.boot
@@ -549,7 +549,7 @@ nBlanks m == strconc/[char('_ ) for i in 1..m]
isNewspadOperator op == GETL(op,"Led") or GETL(op,"Nud")
-isTrue x == x="true" or x is '(QUOTE T)
+isTrue x == x="true" or x = '%true
nary2Binary(u,op) ==
u is [a,b,:t] => (t => nary2Binary([[op,a,b],:t],op); [op,a,b])
diff --git a/src/interp/slam.boot b/src/interp/slam.boot
index 2b404a55..f91bea41 100644
--- a/src/interp/slam.boot
+++ b/src/interp/slam.boot
@@ -86,7 +86,7 @@ isRecurrenceRelation(op,body,minivectorName) ==
n:= k+minIndex
--Check general predicate
predOk :=
- generalPred is '(QUOTE T) => true
+ generalPred = '%true => true
generalPred is ['SPADCALL,m,=sharpArg,
["ELT",["%dynval",=MKQ minivectorName],slot]]
and EQ(lesspSlot,$minivector.slot)=> m+1
@@ -175,9 +175,9 @@ reportFunctionCompilation(op,nam,argl,body,isRecursive) ==
null argl => [cacheName]
[["%store",g3,['assocCircular,g1,["%dynval",MKQ cacheName]]],['CDR,g3]]
thirdPredPair:=
- null argl => ['(QUOTE T),[["%store",["%dynval",MKQ cacheName],computeValue]]]
- ['(QUOTE T),
- ["SETQ",g2,computeValue],
+ null argl => ['%true,[['%store,['%dynval,MKQ cacheName],computeValue]]]
+ ['%true,
+ ['%store,g2,computeValue],
["SETQ",g3,
["CAR",["%store",["%dynval",MKQ cacheName],['predCircular,["%dynval",cacheName],cacheCount]]]],
["RPLACA",g3,g1],
@@ -218,7 +218,7 @@ reportFunctionCacheAll(op,nam,argl,body) ==
cacheName:= mkCacheName nam
g2:= gensym() --value computed by calling function
secondPredPair:= [["SETQ",g2,["HGET",["%dynval",MKQ cacheName],g1]],g2]
- thirdPredPair:= ['(QUOTE T),["HPUT",["%dynval",MKQ cacheName],g1,computeValue]]
+ thirdPredPair:= ['%true,["HPUT",['%dynval,MKQ cacheName],g1,computeValue]]
codeBody:= ["PROG",[g2],["RETURN",["COND",secondPredPair,thirdPredPair]]]
lamex:= ["LAM",arg,codeBody]
mainFunction:= [nam,lamex]
@@ -335,7 +335,7 @@ compileRecurrenceRelation(op,nam,argl,junk,[body,sharpArg,n,:initCode]) ==
phrase3:= [["%igt",sharpArg,n],[auxfn,:argl,["LIST",n,:initCode]]]
phrase4:= [["%igt",sharpArg,n-k],
["ELT",["LIST",:initCode],["QSDIFFERENCE",n,sharpArg]]]
- phrase5:= ['(QUOTE T),['recurrenceError,MKQ op,sharpArg]]
+ phrase5:= ['%true,['recurrenceError,MKQ op,sharpArg]]
['PROGN,:preset,['COND,phrase1,phrase2,phrase3,phrase4,phrase5]]
if $verbose then
sayKeyedMsg("S2IX0001",[op])
diff --git a/src/interp/sys-constants.boot b/src/interp/sys-constants.boot
index 61abaaeb..eebbc95d 100644
--- a/src/interp/sys-constants.boot
+++ b/src/interp/sys-constants.boot
@@ -646,14 +646,6 @@ $Zero ==
$One ==
'(One)
-
-++
-$true ==
- ''T
-
-$false ==
- false
-
++ Indicate absence of value
$NoValue ==
"$NoValue"
diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot
index 365e319d..e3c82844 100644
--- a/src/interp/wi1.boot
+++ b/src/interp/wi1.boot
@@ -366,8 +366,8 @@ extractCodeAndConstructTriple(u, m, oldE) ==
compSymbol(s,m,e) ==
s="$NoValue" => ["$NoValue",$NoValueMode,e]
isFluid s => [s,getmode(s,e) or return nil,e]
- s="true" => ['(QUOTE T),$Boolean,e]
- s="false" => [false,$Boolean,e]
+ s="true" => ['%true,$Boolean,e]
+ s="false" => ['%false,$Boolean,e]
s=m or isLiteral(s,e) => [["QUOTE",s],s,e]
v:= get(s,"value",e) =>
--+
diff --git a/src/interp/wi2.boot b/src/interp/wi2.boot
index 669abeed..9280c4c0 100644
--- a/src/interp/wi2.boot
+++ b/src/interp/wi2.boot
@@ -1005,7 +1005,7 @@ doItIf(item is [.,p,x,y],$predl,$e) ==
qe(21,compSingleCapsuleItem(y,[['not, p],:$predl],getInverseEnvironment(markKillAll p,olde)))
--> -----------
y':=localExtras(oldFLP)
- wiReplaceNode(item,["COND",[p',x,:x'],['(QUOTE T),y,:y']],12)
+ wiReplaceNode(item,["COND",[p',x,:x'],['%true,y,:y']],12)
doItSeq item ==
['SEQ,:l,['exit,1,x]] := item