[erlang-questions] At what point am I "playing compiler"

jm <>
Tue May 19 11:44:17 CEST 2009


Thanks for the explaination.

Jeff.


Thomas Lindgren wrote:
>
>
> The basic problem here is hot code loading. Some years ago, I worked on some solutions to cross-module optimization, which at least showed that there was some juice in the idea; I know some Java compilers do lots of clever reoptimization when code is loaded. However, such a compiler needs a lot of work and there doesn't seem to be manpower to make that sort of effort, so a simpler approach might be that we could just designate more modules as "preloaded". 
>
> This approach relies on how preloaded modules behave in Erlang/OTP, which is somewhat obscure and not really part of the language, but essentially straightforward. Preloaded modules are compiled into the VM runtime today at VM build time, so no way to change the code on the fly there. A compiler can thus assume any modules marked as preloaded are fixed and available for optimization. The code of the preloaded modules would have to be known at compile-time, and the compiler would have to be aware of how to optimize calls to these modules. (And you might get into trouble by cross-compiling between systems with different sets of preloadeds.)
>
> Best,
> Thomas
>
>
>
>       
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>   



More information about the erlang-questions mailing list