Minor change

Stephen Weeks MLton@sourcelight.com
Wed, 3 Jan 2001 09:07:13 -0800 (PST)


> > Another minor fix: with the native mode version of MLton, `-keep a' doesn't
> > leave any .s or .S files around, and it clearly should do that for the natively
> > generated assembler code.  I would argue that it should not leave around the
> > .s version of the small C code it makes, but it should leave the .c file around,
> > which it doesn't.
> 
> Well, under the last release of MLton -keep a didn't keep the .c or .s
> files from the C backend.  My understanding was that the sets of files
> kept by the different flags were all disjoint;

Almost.  "-keep p" keeps the CPS, which overlaps with "-keep a", which keeps all 
compiler ILs.

> -keep a would keep just
> those auxilary files make up through the cps simplification phase, and a
> few other representation decisions made in backend.fun.  I agree that it
> would be useful to have a save "what MLton passes on to gcc" flag (which
> would be the small .c and the .n.S files) but that would not save the
> files generated by gcc (the small .s files and the .o files).

I agree.  The -keep flag needs some reworking.  Here is what I propose.  First,
the -keep flag will take a single argument so that we can have multiple letter
abbreviations.  Next, here is the set of abbreviations I propose.

	-keep	keeps
	-----	----------------------------------------
	c	.c file (generated C file)
	cps	.cps file (cps IL)
	il	all compiler intermediate languages
	s	.s files (both from .c and .n.S files)
	S	.n.S files
	sml	.sml file (entire SML program)
	o	.o files
	
So, to get what MLton passes on to gcc with the native backend, you would do
	-keep c -keep S

Thoughts?