latest RPM

Stephen Weeks MLton@sourcelight.com
Tue, 5 Dec 2000 11:08:52 -0800 (PST)


> > I am confident (I even put an assert in), but I don't want to get rid of void
> > for now, since there is a place in backend where I would have to create an
> > Operand.t option instead of an Operand.t, and I don't wanna pay that cost.
> 
> In backend.fun or in the c-codegen?

backend.fun

> What I was suggesting was during the
> translation from Machine.Operand.t to MachineOuput.Operand.t we could
> eliminate the Void variant.  The backend.fun runs completely on the
> machine IL defined in machine.{sig,fun}, but the two codegens run on
> machine-output.{sig,fun}.  The translation occurs in main.sml at
>       val mprogram = Machine.Program.toMachineOutput machine

I looked at that, but unfortunately right now Machine.Operand.t is the same as
MachineOutput.operand.t (look at machine.fun).  We could do it by duplicating
the code and paying some copying cost at translation.  I wish we had refinement
types.

> As I think about it, we could also set up that translation to do clear any
> property lists that you think are still lying around.  It's going to walk
> over the whole program anyways.

I'm pretty sure I've got 'em all now.