[m-dev.] for review: Infrastructure for Java Backend

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Jan 24 16:49:32 AEDT 2001


On 24-Jan-2001, Julien Fischer <juliensf at students.cs.mu.oz.au> wrote:
> On Tue, 23 Jan 2001, Fergus Henderson wrote:
> > > @@ -1836,21 +1850,22 @@
> > >  	%
> > >  	=(MLDSGenInfo),
> > >  	{ ml_gen_info_get_varset(MLDSGenInfo, VarSet) },
> > > -	{ ml_gen_info_get_module_info(MLDSGenInfo, ModuleInfo) },
> > > +	{ ml_gen_info_get_module_info(MLDSGenInfo, _ModuleInfo) },

That line of code should be deleted.

> > >  	{ OutputVarName = ml_gen_var_name(VarSet, OutputVar) },
> > >  
> > >  	%
> > >  	% Generate a declaration for a corresponding local variable.
> > > -	%
> > > +	% XXX LocalVarDefn contained ModuleInfo as 4th argument

Likewise that XXX comment should be deleted.

> > >  	{ string__append("local_", OutputVarName, LocalVarName) },
> > > -	{ LocalVarDefn = ml_gen_var_decl(LocalVarName, Type,
> > > -		mlds__make_context(Context), ModuleInfo) },
> > > -
> > > +	ml_gen_type(Type, MLDS_Type),
> > > +	{ LocalVarDefn = ml_gen_mlds_var_decl(var(LocalVarName), MLDS_Type,
> > > +		mlds__make_context(Context)) },
> > 
> > What's the reason for those changes?
> > They look wrong to me.
> 
> The reason for those changes is the code that follows, specifically:
> 
> ml_gen_var(OutputVar, OutputVarLval),
> ml_gen_var_lval(LocalVarName, MLDS_Type, LocalVarLval),
> 
> Since we now need to provide the MLDS type to ml_gen_var_lval, rather
> than calling ml_gen_var_decl and passing the it the HLDS type, we convert
> it to an MLDS type at this point and call ml_gen_mlds_var_decl instead.

OK.  But the call to ml_gen_info_get_module_info and the XXX comment
aren't needed.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- 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