[m-dev.] tech preview 1: webserver

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Aug 22 01:12:13 AEST 2000


On 21-Aug-2000, Peter Ross <peter.ross at miscrit.be> wrote:
> On Mon, Aug 21, 2000 at 11:00:43PM +1000, Fergus Henderson wrote:
> > On 21-Aug-2000, Peter Ross <peter.ross at miscrit.be> wrote:
> > > +++ compiler/ml_code_gen.m	2000/08/21 08:42:59
> > > @@ -2097,7 +2097,7 @@
> > >  				Cast = ""
> > >  			)
> > >  		},
> > > -		{ string__format("\t%s = %s\n",
> > > +		{ string__format("\t%s = %s ",
> > >  			[s(ArgName), s(Cast)],
> > >  			AssignToArgName) },
> > >  		{ AssignInput = [
> > > @@ -2179,7 +2179,7 @@
> > >  		},
> > >  		{ string__format(" = %s%s;\n", [s(RHS_Cast), s(ArgName)],
> > >  			AssignFromArgName) },
> > > -		{ string__format("\t%s\n", [s(LHS_Cast)], AssignTo) },
> > > +		{ string__format("\t%s ", [s(LHS_Cast)], AssignTo) },
> > >  		{ AssignOutput = [
> > >  			raw_target_code(AssignTo),
> > >  			target_code_output(ArgLval),
> > 
> > Could you explain why that patch is needed?
> > 
> > I think that change will break things when --line-numbers is enabled,
> > since it fails to abide by the invariant for that data structure
> > documented in mlds.m that the string in a `raw_target_code'
> > must end in a newline.
>
> I was debugging my code, and I didn't like the fact that some lines were
> spread over multiple lines.  I meant to delete those lines from the
> patch but forgot.

Yeah, the layout of the code generated with `--no-line-numbers' is a pain.
If you want to fix this one properly, then this code could be
changed so that it only added the newline when `--line-numbers' is
enabled.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list