[m-dev.] for review: The .NET MSIL backend.

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Oct 11 00:13:43 AEDT 2000


On 22-Sep-2000, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> 
> The .NET MSIL (Microsoft Intermediate Language) backend. 
...
> diff -N ilds.m
> +	% The relative virtual address of something (e.g. a static data
> +	% structure)
> +:- type addressrva == int.

Relative to what?
(I suppose this is another MS documentation issue...)

> +:- type number == int.

What's that for?

> +	% each block has an identifier (mainly so you can tell which
> +	% ones match up without counting them).
> +:- type blockid == int. 

s/an identifier/a unique identifier/ ?
The point here is that different blocks should have different identifiers.

> +++ compiler/ml_code_gen.m	2000/09/18 03:41:01
> @@ -1871,8 +1871,19 @@
>  			raw_target_code("\t\tif (MR_succeeded) {\n")],
>  			AssignOutputsList
>  	]) },
> +	=(MLDSGenInfo),
> +	{ ml_gen_info_get_module_info(MLDSGenInfo, ModuleInfo) },
> +	{ module_info_globals(ModuleInfo, Globals) },
> +	{ globals__lookup_string_option(Globals, target, Target) },
>  	( { CodeModel = model_non } ->
> -		ml_gen_call_current_success_cont(Context, CallCont)
> +		(
> +			{ Target = "il" }
> +		->
> +			ml_gen_call_current_success_cont_indirectly(Context,
> +				CallCont)
> +		;
> +			ml_gen_call_current_success_cont(Context, CallCont)
> +		)

A comment here explaining why we need to do things differently for IL
would help.

> @@ -1398,6 +1416,93 @@
> +	% XXX this code is quite similar to some of the existing code
> +	% for calling continuations when doing copy-in/copy-out.
> +	% Sharing code should be investigated.
> +
> +ml_gen_call_current_success_cont_indirectly(Context, MLDS_Statement) -->

Put fixing that XXX on the list of things to do...
(it doesn't need to be done before committing this, though).

> Index: compiler/mlds_to_il.m

[... to be continued ...]

-- 
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