[Larceny-users] Compiler - Intermediate Representation

William D Clinger will at ccs.neu.edu
Mon Sep 15 09:20:20 EDT 2008


Ray Racine wrote:
> Is there a way to dump out the compiler intermediate representation(s) from
> the various passes up to MacScheme IR for a given R6RS module?

Yes, it should be possible to do this using the Twobit
timing hook.  lib/Experimental/twobit-timer.sch
contains an example of its use, but you'll care about
the third argument to the timer procedure, which is
the input or output for the indicated phase of Twobit.

For most phases, you will probably want to use the 
make-readable procedure to reduce the apparent size
of the input or output.	 Viewing MacScheme assembly
language is a little more difficult; I normally set
listify? to true and use the assemble procedure.  

I haven't used the timer hook for this,	however, and
all of the above is off	the top	of my head.

Will



More information about the Larceny-users mailing list