[m-rev.] for review; compiler changes needed for il grade

Tyson Dowd trd at cs.mu.OZ.AU
Fri Jun 28 18:15:46 AEST 2002


On 27-Jun-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> Hi,
> 
> For Simon, Tyson or Fergus to review.
> 
> ===================================================================
> 
> 
> Estimated hours taken: 8
> Branches: main
> 
> Misc changes to the compiler needed so that the library can be compiled in the
> il grade.  Note that the library doesn't yet currently compile in the il grade,
> these changes are just the first step to getting it to.
> 
> compiler/handle_options.m:
> 	Intermodule optimization needs to be turned on when using high-level
> 	data in the il grade, so that equivalence types can be fully expanded.
> 
> compiler/mlds_to_managed.m:
> 	When outputting MC++ code do the following
> 		- define MR_HIGHLEVEL_DATA so that conditional choices
> 		  can be made,
> 		- add a #using for each imported module so that the types can
> 		  be found,
> 		- treat imported std lib modules specially.
> 
> compiler/mlds.m:
> 	Add a utility predict that tests whether a mlds_module_name is one
> 	belonging to the standard library.

s/predict/predicate

> Index: compiler/handle_options.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
> retrieving revision 1.140
> diff -u -r1.140 handle_options.m
> --- compiler/handle_options.m	30 May 2002 12:54:56 -0000	1.140
> +++ compiler/handle_options.m	27 Jun 2002 16:05:09 -0000
> @@ -328,6 +328,9 @@
>  	%         XXX Previously static ground terms used to not work with
>  	%             --high-level-data.  But this has been (mostly?) fixed now.
>  	%             So we should investigate re-enabling static ground terms.
> +	%   - intermodule optimization
> +	%	  This is only required for high-level data and is needed so
> +	%	  that equivalence types can be expanded.
>  	( { Target = il } ->
>  		globals__io_set_gc_method(none),
>  		globals__io_set_option(reclaim_heap_on_nondet_failure,

A bit more explanation is required -- you can either cite the paper on
this, or put a quick statement of why.  Something along the lines of
"because .NET requires that structural details about the type are known
at all times".

Otherwise the change seems fine.

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list