aboutsummaryrefslogtreecommitdiff
path: root/src/interp/nruncomp.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-02-23 05:22:37 +0000
committerdos-reis <gdr@axiomatics.org>2010-02-23 05:22:37 +0000
commit3f8bdbabb7bfcf9b021fe1529e603e931b57bf13 (patch)
tree30bf7557f06171df29da384445a8b6f561db0b5b /src/interp/nruncomp.boot
parent3ca41ddb56efd927b46da41d9ce369c31538e3b3 (diff)
downloadopen-axiom-3f8bdbabb7bfcf9b021fe1529e603e931b57bf13.tar.gz
Expand support for domain inlining to non-niladic functors.
* interp/compiler.boot (processInlineRequest): Now accept any functor. * interp/c-util.boot (lookupFunctionInstance): New. (isFormal): Likewise. (expandFormTemplate): Likewise. (equalFormTemplate): Likewise. (getFunctionTemplate): Likewise. (lookupInheritedDefiningFunction): Likewise. (lookupDefiningFunction): Likewise. * interp/nruncomp.boot (optDeltaEntry): Tidy. Use lookupDefiningFunction.
Diffstat (limited to 'src/interp/nruncomp.boot')
-rw-r--r--src/interp/nruncomp.boot22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 1b969ae2..dce086dc 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -161,16 +161,8 @@ optDeltaEntry(op,sig,dc,eltOrConst) ==
dc
sig := MSUBST(ndc,dc,sig)
not MEMQ(KAR ndc,$optimizableConstructorNames) => nil
- dcval := optCallEval ndc
- -- MSUBST guarantees to use EQUAL testing
- sig := MSUBST(devaluate dcval, ndc, sig)
- if rest ndc then
- for new in rest devaluate dcval for old in rest ndc repeat
- sig := MSUBST(new,old,sig)
- -- optCallEval sends (List X) to (LIst (Integer)) etc,
- -- so we should make the same transformation
- fn := compiledLookup(op,sig,dcval)
- if null fn then
+ fun := lookupDefiningFunction(op,sig,ndc)
+ if fun = nil then
-- following code is to handle selectors like first, rest
nsig := [quoteSelector tt for tt in sig] where
quoteSelector(x) ==
@@ -178,10 +170,12 @@ optDeltaEntry(op,sig,dc,eltOrConst) ==
get(x,'value,$e) => x
x='$ => x
MKQ x
- fn := compiledLookup(op,nsig,dcval)
- if null fn then return nil
- eltOrConst="CONST" => ['XLAM,'ignore, SPADCALL fn]
- GETL(compileTimeBindingOf first fn,'SPADreplace)
+ fun := lookupDefiningFunction(op,nsig,ndc)
+ fun = nil => nil
+ if CONSP fun then
+ eltOrConst = "CONST" => return ['XLAM,'ignore, SPADCALL fun]
+ fun := first fun
+ GETL(compileTimeBindingOf fun,'SPADreplace)
genDeltaEntry opMmPair ==
--called from compApplyModemap