Parse transformery (Was: Re: Calling internal functions - foo::bar() ?)

Thomas Lindgren thomasl_erlang@REDACTED
Wed Mar 9 15:13:58 CET 2005


--- Bjorn Gustavsson <bjorn@REDACTED> wrote:
> Thomas Lindgren <thomasl_erlang@REDACTED> writes:
>
> > Alas, for optimization purposes it's the moral
> > equivalent of exporting the function. The
> transform
> > introduces an unknown caller to all functions; if
> the
> > compiler does not account for this, certain
> > optimizations will be unsafe.
> 
> Since the wrapper function presumably is exported,
> the optimizer will not generate unsafe code, but
> will simply do less optimization.

Sure, so it's "the moral equivalent of exporting the
function". 

Given a debug wrapper exporting all functions (even
indirectly, as in the parse transform example), a
conscientous compiler is obviously back at the
export_all level of optimization. Ignoring the
wrapper, on the other hand, leads to unsafe
optimization as described previously. 

There may be ways around this dilemma, of course.

Best,
Thomas



	
		
__________________________________ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/



More information about the erlang-questions mailing list