axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] 20080828.01.mxr.patch (add cost to bottomUp output (Ru


From: daly
Subject: [Axiom-developer] 20080828.01.mxr.patch (add cost to bottomUp output (Rubey))
Date: Thu, 28 Aug 2008 08:28:35 -0500

Function selection for overloaded functions is driven by the cost
estimate of the function. This is useful information for someone
skilled at reading the output of )set mes bot on

=======================================================================
diff --git a/changelog b/changelog
index 5dfa61a..41f4ab7 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080828 mxr src/interp/i-funsel.boot add cost to bottomUp output
 20080827 wsp src/algebra/tex.spad change \over to \frac
 20080824 tpd src/input/Makefile add liu.input to regression
 20080824 lxx src/input/liu.input expose difference between ^ and **
diff --git a/src/interp/i-funsel.boot.pamphlet 
b/src/interp/i-funsel.boot.pamphlet
index 8b8b0fd..e06d684 100644
--- a/src/interp/i-funsel.boot.pamphlet
+++ b/src/interp/i-funsel.boot.pamphlet
@@ -88,8 +88,7 @@ sayFunctionSelection(op,args,target,dc,func) ==
     '"      Arguments:",:bright fsig]
   if target then sayMSG concat ['"      Target type:",
     :bright prefix2String target]
-  if dc         then sayMSG concat ['"      From:     ",
-    :bright prefix2String dc]
+  if dc then sayMSG concat ['"      From:     ", :bright prefix2String dc]
   stopTimingProcess 'debug
 
 sayFunctionSelectionResult(op,args,mmS) ==
@@ -638,6 +637,9 @@ mmCost(name, sig,cond,tar,args1,args2) ==
   res = $PositiveInteger => cost - 2
   res = $NonNegativeInteger => cost - 1
   res = $DoubleFloat => cost + 1
+  if $reportBottomUpFlag then
+    sayMSG ['"cost=",prefix2String cost,'" for ", name,'": ",_
+            :formatSignature CDR sig]
   cost
 
 mmCost0(name, sig,cond,tar,args1,args2) ==




reply via email to

[Prev in Thread] Current Thread [Next in Thread]