HiPE can't compile a module with on_load attribute. This sample module fails:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font face="courier new, monospace">-module(foo).</font></div>
</div><div><div><font face="courier new, monospace">-on_load(do_nothing/0).</font></div></div><div><div><font face="courier new, monospace"><br></font></div></div><div><div><font face="courier new, monospace">%% Exporting the function doesn't affect the outcome</font></div>
</div><div><div><font face="courier new, monospace">%% -exports([do_nothing/0]).</font></div></div><div><div><font face="courier new, monospace"><br></font></div></div><div><div><font face="courier new, monospace">do_nothing() -> ok.</font></div>
</div></blockquote><div><div><br></div><div>When compiled via command line or via compile:forms.</div><div>A snippet of the error message is:</div><div><br></div><div><div>=ERROR REPORT==== 25-Nov-2012::18:48:29 ===</div>
<div>Error in process <0.88.0> with exit value: {{badmatch,{'EXIT',{{hipe_beam_to_icode,1103,{'trans_fun/2',on_load}},[{hipe_beam_to_icode,trans_fun,2,[{file,"hipe_beam_to_icode.erl"},{line,1103}]},{hipe_beam_to_icode,trans_fun,2,[{file,"hipe_beam_to_icode.erl"},{line,253}]},{hipe_beam_to_icode... </div>
</div><div><br></div><div>I have put the full stack in a gist:</div><div><br></div><div><a href="https://gist.github.com/9ae21eb51928d7de5f23" target="_blank">https://gist.github.com/9ae21eb51928d7de5f23</a></div><div><br>
</div><div>Using R15B02 on Mac OS X Snow Leopard installed from homebrew.</div>
<div>Let me know if you need more information, thanks!<br clear="all"><div><br></div><div><br></div><div><span style="font-size:13px"><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div>
<div><span style="font-family:verdana,sans-serif;font-size:x-small">Skype: jv.ptec</span></div><div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></div>
<br>
</div></div>