aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/interp/i-analy.boot46
2 files changed, 31 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index bee2cb4b..90824abc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
2011-02-27 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/i-analy.boot (bottomUpWithArgModesets): Split out of
+ bottomUp.
+ (bottomUp): Call it.
+
+2011-02-27 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/Makefile.in (OBJS): Remove i-spec1.$(FASLEXT) and
i-spec2.$(FASLEXT). Add i-special.$(FASLEXT).
* interp/i-spec1.boot, interp/i-spec2.boot: Move content to
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)