aboutsummaryrefslogtreecommitdiff
path: root/src/interp/buildom.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-04 20:41:19 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-04 20:41:19 +0000
commit61fb7fee9ac84e254ca4e07428242fdc37fd4c06 (patch)
treec59b03184b04f4892cf140e4c33535c30c5a6090 /src/interp/buildom.boot
parentbd67b8d8c796161376a6268c54f4d10fb0412e07 (diff)
downloadopen-axiom-61fb7fee9ac84e254ca4e07428242fdc37fd4c06.tar.gz
* interp/buildom.boot (UnionEqual): Don't COERCE to FUNCTION. Use
eval. Use middle end opcodes instead of EQCAR. (coerceUn2E): Likewise.
Diffstat (limited to 'src/interp/buildom.boot')
-rw-r--r--src/interp/buildom.boot13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot
index c242faf2..20078c36 100644
--- a/src/interp/buildom.boot
+++ b/src/interp/buildom.boot
@@ -186,7 +186,7 @@ UnionEqual(x, y, dom) ==
typeFun := eval ['%lam,'(_#1),p]
FUNCALL(typeFun,x) and FUNCALL(typeFun,y) =>
string? b => same := (x = y)
- if p is ["EQCAR", :.] then (x := rest x; y := rest y)
+ if p is ['%ieq,['%head,.],:.] then (x := rest x; y := rest y)
same := SPADCALL(x, y, findEqualFun(evalDomain b))
same
@@ -199,7 +199,7 @@ coerceUn2E(x,source) ==
for b in stripUnionTags branches for p in predlist repeat
typeFun := eval ['%lam,'(_#1),p]
if FUNCALL(typeFun,x) then return
- if p is ["EQCAR", :.] then x := rest x
+ if p is ['%ieq,['%head,.],:.] then x := rest x
-- string? b => return x -- to catch "failed" etc.
string? b => byGeorge := x -- to catch "failed" etc.
byGeorge := coerceVal2E(x,b)
@@ -390,11 +390,12 @@ mkUnionFunList(op,form is ["Union",:listOfEntries],e) ==
["case",[$Boolean,g,t],typeFun]]
for p in predList for t in listOfEntries])] where
upFun() ==
- p is ["EQCAR",x,n] => ["XLAM",["#1"],["%makepair",n,"#1"]]
+ p is ['%ieq,['%head,x],n] =>
+ ["XLAM",["#1"],["%makepair",n,"#1"]]
["XLAM",["#1"],"#1"]
cdownFun() ==
gg:=gensym()
- if p is ["EQCAR",x,n] then
+ if p is ['%ieq,['%head,x],n] then
ref:=["%tail",gg]
q:= ['%ieq,['%head,gg],n]
else
@@ -403,11 +404,11 @@ mkUnionFunList(op,form is ["Union",:listOfEntries],e) ==
["XLAM",["#1"],["PROG2",["%LET",gg,"#1"],ref,
["check-union",q,t,gg]]]
downFun() ==
- p is ["EQCAR",x,.] =>
+ p is ['%ieq,['%head,x],.] =>
["XLAM",["#1"],["%tail","#1"]]
["XLAM",["#1"],"#1"]
typeFun() ==
- p is ["EQCAR",x,n] =>
+ p is ['%ieq,['%head,x],n] =>
["XLAM",["#1"],['%ieq,['%head,x],n]]
["XLAM",["#1"],p]
cList:= substitute(dollarIfRepHack op,g,cList)