From: Robert D. <rob...@us...> - 2007-11-17 17:45:53
|
Update of /cvsroot/maxima/maxima/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19069/src Modified Files: mtrace.lisp Log Message: More fallout from the Maxima string reimplementation: call GETOP or GETOPR as necessary to associate properties with the internal operator symbol instead of its name. These changes make it possible to call trace and timer with arguments which are operator names. Index: mtrace.lisp =================================================================== RCS file: /cvsroot/maxima/maxima/src/mtrace.lisp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- mtrace.lisp 15 Oct 2007 02:45:58 -0000 1.24 +++ mtrace.lisp 17 Nov 2007 17:45:42 -0000 1.25 @@ -427,7 +427,7 @@ (defun trace-option-p (function keyword) (do ((options - (let ((options (trace-options (getop function)))) + (let ((options (trace-options function))) (cond ((null options) nil) (($listp options) (cdr options)) (t @@ -664,9 +664,11 @@ ((mlist simp) $function $time//call $calls $runtime $gctime) ,.(nreverse v) ,(timer-mlist '$total total-calls total-runtime total-gctime))) - (let ((runtime ($get (car l) '$runtime)) - (gctime ($get (car l) '$gctime)) - (calls ($get (car l) '$calls))) + (let* + ((fun-opr (getopr (car l))) + (runtime ($get fun-opr '$runtime)) + (gctime ($get fun-opr '$gctime)) + (calls ($get fun-opr '$calls))) (when runtime (incf total-calls calls) (incf total-runtime runtime) @@ -676,9 +678,10 @@ (defun macsyma-timer (fun) (prog1 (macsyma-trace-sub fun 'timer-handler $timer) - ($put fun 0 '$runtime) - ($put fun 0 '$gctime) - ($put fun 0 '$calls))) + (let ((fun-opr (getopr fun))) + ($put fun-opr 0 '$runtime) + ($put fun-opr 0 '$gctime) + ($put fun-opr 0 '$calls)))) (defun macsyma-untimer (fun) (macsyma-untrace-sub fun 'timer-handler $timer)) |