aboutsummaryrefslogtreecommitdiff
path: root/src/interp/i-analy.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/i-analy.boot')
-rw-r--r--src/interp/i-analy.boot46
1 files changed, 25 insertions, 21 deletions
diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot
index 4949f043..6a645bbc 100644
--- a/src/interp/i-analy.boot
+++ b/src/interp/i-analy.boot
@@ -260,32 +260,36 @@ bottomUp t ==
pushDownTargetInfo(opName,tar,argl)
argModeSetList:= [bottomUp x for x in argl]
- ms := bottomUpForm(t,op,opName,argl,argModeSetList)
- -- If this is a type producing form, then we don't want
- -- to store the representation object in the environment.
- -- Rather, we want to record the reified canonical form.
- if ms is [m] and (member(m,$LangSupportTypes) or isCategoryForm(m,$e))
- then putValue(t,objNew(devaluate objValUnwrap getValue t, m))
-
- -- given no target or package calling, force integer constants to
- -- belong to tightest possible subdomain
-
- op := first t -- may have changed in bottomUpElt
- $useIntegerSubdomain and null tar and null dol and
- isEqualOrSubDomain(first ms,$Integer) =>
- val := objVal getValue op
- isWrapped val => -- constant if wrapped
- val := unwrap val
- bm := getBasicMode val
- putValue(op,objNewWrap(val,bm))
- putModeSet(op,[bm])
- ms
- ms
+ bottomUpWithArgModesets(t,op,opName,argl,argModeSetList)
m := getBasicMode t => [m]
IDENTP (id := getUnname t) =>
putModeSet(t,bottomUpIdentifier(t,id))
keyedSystemError("S2GE0016",['"bottomUp",'"unknown object form"])
+bottomUpWithArgModesets(t,op,opName,args,argModeSetList) ==
+ ms := bottomUpForm(t,op,opName,args,argModeSetList)
+ -- If this is a type producing form, then we don't want
+ -- to store the representation object in the environment.
+ -- Rather, we want to record the reified canonical form.
+ if ms is [m] and (member(m,$LangSupportTypes) or isCategoryForm(m,$e))
+ then putValue(t,objNew(devaluate objValUnwrap getValue t, m))
+
+ -- given no target or package calling, force integer constants to
+ -- belong to tightest possible subdomain
+ pcall? := getAtree(op,'dollar) and (opName ~= 'construct)
+ op := t.op -- may have changed in bottomUpElt
+ $useIntegerSubdomain and getTarget op = nil and not pcall? and
+ isEqualOrSubDomain(first ms,$Integer) =>
+ val := objVal getValue op
+ isWrapped val => -- constant if wrapped
+ val := unwrap val
+ bm := getBasicMode val
+ putValue(op,objNewWrap(val,bm))
+ putModeSet(op,[bm])
+ ms
+ ms
+
+
computeTypeWithVariablesTarget(p, q) ==
polyVarlist(p) or polyVarlist(q) =>
t := resolveTT(p, q)