aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog5
-rw-r--r--src/interp/compiler.boot21
2 files changed, 7 insertions, 19 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3f5ff6ab..f2422129 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-23 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/compiler.boot (compForm2): Simplify. Don't bother with
+ subsumption. Exit early on empty modemap candidate list.
+
2011-10-22 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/compiler.boot (compAtomWithModemap): Handle code-gen here.
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 38d40768..180edf0b 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -499,30 +499,13 @@ compForm1(form is [op,:argl],m,e) ==
(T:= comp([op',:argl],domain,e) or return nil; coerce(T,m))
nil
- (mmList:= getFormModemaps(form,e)) and (T:= compForm2(form,m,e,mmList)) => T
+ T:= compForm2(form,m,e,getFormModemaps(form,e)) => T
compToApply(op,argl,m,e)
compForm2(form is [op,:argl],m,e,modemapList) ==
+ modemapList = nil => nil
aList := pairList($TriangleVariableList,argl)
modemapList := applySubst(aList,modemapList)
- deleteList := []
- newList := []
- -- now delete any modemaps that are subsumed by something else,
- -- provided the conditions are right (i.e. subsumer true
- -- whenever subsumee true)
- for u in modemapList repeat
- if u is [[dc,:.],[cond,["Subsumed",.,nsig]]] and
- (v:=assoc([dc,:nsig],modemapList)) and v is [.,[ncond,:.]] then
- deleteList := [u,:deleteList]
- if not PredImplies(ncond,cond) then
- newList := [[first u,[cond,['ELT,dc,nil]]],:newList]
- if deleteList ~= nil then
- modemapList := [u for u in modemapList | not objectMember?(u,deleteList)]
- -- We can use objectMember? since deleteList was built out of members of modemapList
- -- its important that subsumed ops (newList) be considered last
- if newList then
- modemapList := append(modemapList,newList)
-
-- The calling convention vector is used to determine when it is
-- appropriate to infer type by compiling the argument vs. just
-- looking up the parameter type for flag arguments.