[m-dev.] diff: improve comments in ml_code_gen.m

Erwan Jahier Erwan.Jahier at irisa.fr
Wed May 10 16:44:50 AEST 2000


| Estimated hours taken: 0.5
| 
| compiler/ml_code_gen.m:
| 	Improve the documentation a little, particularly with regard
| 	to the declaration of the `succeeded' variable.
| 
| Workspace: /home/pgrad/fjh/ws/hg
| Index: compiler/ml_code_gen.m
| ===================================================================
| RCS file: /home/mercury1/repository/mercury/compiler/ml_code_gen.m,v
| retrieving revision 1.37
| diff -u -d -r1.37 ml_code_gen.m
| --- compiler/ml_code_gen.m	2000/05/09 10:05:32	1.37
| +++ compiler/ml_code_gen.m	2000/05/09 17:26:59


| @@ -296,6 +315,14 @@
|  %		}
|  %	}
|  
| +% For model_non goals, there are a couple of different
| +% ways that we could generate code, depending on whether
| +% we are aiming to maximize readability, or whether we
| +% prefer to generate code that may be more efficient
| +% but is a little less readabile.  The more readable method

s/readabile/readable/

| +% puts the generated goals in the same order that
| +% they occur in the source code:
| +%
|  %	model_non Goal (optimized for readability)
|  %		<Goal, Goals>
|  % 	===>
| @@ -310,6 +337,11 @@
|  %		entry_func();
|  %	}
|  %
| +% The more efficient method generates the goals in
| +% reverse order, so its less readable, but it has fewer

s/its/it's/ ?

| +% function calls and can make it easier for the C compiler
| +% to inline things:
| +%
|  %	model_non Goal (optimized for efficiency):
|  %		<Goal, Goals>
|  % 	===>

| @@ -357,6 +413,12 @@
|  %
|  %		<Goal1 && label1_func()>;
|  %	}
| +%
| +% This would avoid the undesirable deep nesting that we sometimes get
| +% with our current scheme.  However, if we're eliminating nested
| +% functions, as is normally the case, then after the ml_elim_nested

s/is/it is/ ??

| +% transformation all the functions and variables have been hoisted
| +% to the top level, so there is no difference between these two.
|  
|  %-----------------------------------------------------------------------------%
|  %

-- 
R1.


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