[m-dev.] profiling grades broken

Zoltan Somogyi zs at cs.mu.oz.au
Mon Feb 17 14:18:22 AEDT 1997


Tyson wrote:
> compiler/llds_out.m:
> 	- Put 
> 	  	static bool done = FALSE; 
> 		if (!done) { 
> 			done = TRUE 
> 			[...  call functions ...] 
> 			} 
> 	  wrappers around calls to initialization functions.

The way I see it, if you have two or more such blocks of code, your proposal
will prevent more than one call to the init functions FROM THE SAME SITE,
but won't prevent more than one call from different sites.

Even if there were some reason why one can be sure that there will be
at most one such site, it would be more robust to put the static bool
variables in the init functions themselves.

Zoltan.



More information about the developers mailing list