This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

experimental option to disable inlining


I've checked into CVS experimental support disabling
function inlining, enabled by the command-line option
--no-inline or --inline=none.  This is experimental,
has only been tested as shown below, and probably will
need some fine-tuning.

However, it does make the trace/untrace macros more
useful for debugging:

$ cat /tmp/fact.scm
(define (fact x)
  (if (= x 0) 1 (* x (fact (- x 1)))))
$ java kawa.repl --no-inline -f /tmp/fact.scm  --
#|kawa:1|# (fact 4)
24
#|kawa:2|# (trace fact)
#|kawa:3|# (fact 4)
call to fact (4)
  call to fact (3)
    call to fact (2)
      call to fact (1)
        call to fact (0)
        return from fact => 1
      return from fact => 1
    return from fact => 2
  return from fact => 6
return from fact => 24
24
#|kawa:4|# (untrace fact)
#|kawa:5|# (fact 4)
24

--
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]