diff options
author | dos-reis <gdr@axiomatics.org> | 2008-09-26 18:27:01 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-09-26 18:27:01 +0000 |
commit | 5151c89ded8e401d2aec83e9a3f56c50a76f209b (patch) | |
tree | f0b5d92498d895a965102530f50eba6b96c5a349 /src/interp/i-analy.boot | |
parent | e0c8f3d8155dabb7d7d54e426f56febfab77ee92 (diff) | |
download | open-axiom-5151c89ded8e401d2aec83e9a3f56c50a76f209b.tar.gz |
* algebra/matrix.spad.pamphlet (new$Matrix): New.
Remove uses of pretend. Define Rep.
Diffstat (limited to 'src/interp/i-analy.boot')
-rw-r--r-- | src/interp/i-analy.boot | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot index 26a1309d..45623e50 100644 --- a/src/interp/i-analy.boot +++ b/src/interp/i-analy.boot @@ -342,8 +342,34 @@ bottomUpIdentifier(t,id) == (isMapExpr expr and [objMode(u)]) or keyedSystemError("S2GE0016", ['"bottomUpIdentifier",'"cannot evaluate identifier"]) + m := namedConstant(id,t) => [m] bottomUpDefault(t,id,defaultType,getTarget t) +getConstantObject(id,dc,sig) == + mode := substitute(dc,"$",first sig) + $genValue => + objNewWrap(SPADCALL compiledLookupCheck(id,sig,evalDomain dc),mode) + objNew(["SPADCALL",["compiledLookupCheck",id,sig,["evalDomain",dc]]],mode) + +namedConstant(id,t) == + -- for the time being, ignore the case where the target type is imposed. + getTarget(t) ^= nil => nil + sysmms := getModemapsFromDatabase(id,0) or return nil + -- ignore polymorphic constants are not supported yet. + doms := [getDCFromSystemModemap sysmm for sysmm in sysmms] + candidates := nil + for dc in doms | niladicConstructorFromDB first dc repeat + LASSOC(id,getOperationAlistFromLisplib first dc) is [[sig,.,.,"CONST"]] => + candidates := [[dc,sig],:candidates] + null candidates => nil + #candidates = 1 => + [[dc,sig]] := candidates + val := getConstantObject(id,dc,sig) + putValue(t,val) + putMode(t,objMode val) + + -- error for ambiguity. + bottomUpDefault(t,id,defaultMode,target) == if $genValue then bottomUpDefaultEval(t,id,defaultMode,target,nil) |