<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">THAT WAS NOT FUNNY :-)<div><br></div><div>I do not see what low level transformation has to do with anything in </div><div>the example I sent. It is just a plain module that illustrate some problem</div><div>with an undocumented feature that I found looking through the code.</div><div>(Upping the default inline_effort from 24 to say 100 might have exposed it anyway)</div><div><br></div><div>In the inline transform that I am writing I read forms from the beam files compiled with debug_info</div><div>and then toss them into the module, cleaning and massaging a bit. It is not on core Erlang level at all.</div><div>And does not have to be. The rest is passed on to the regular compiler to work on.</div><div><br></div><div>Regards</div><div><br></div><div>/Tony</div><div><br></div><div><br></div><div><div><div>On 9 sep 2013, at 10:54, Anthony Ramine <<a href="mailto:n.oxyde@gmail.com">n.oxyde@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hey don't remove Core transforms, I use them :p<br><br><a href="https://github.com/nox/shippai">https://github.com/nox/shippai</a><br><br>-- <br>Anthony Ramine<br><br>Le 9 sept. 2013 ā 10:42, Björn-Egil Dahlberg <egil@erlang.org> a écrit :<br><br><blockquote type="cite">On 2013-09-09 08:56, Anthony Ramine wrote:<br><blockquote type="cite">Hi Tony,<br><br>Btw for low-level transformations, you should rather make a Core Erlang transform, it is way easier to reason about.<br></blockquote>+1, do it in core erlang<br><br>or wait that's a novel idea, perhaps we should remove it .. =)<br><br>// Björn-Egil<br><br><br><blockquote type="cite"><br>Regards,<br><br>Le 8 sept. 2013 ā 22:55, Tony Rogvall a écrit :<br><br><blockquote type="cite">Hi!<br><br>I dont know who is working on the cerl_inline functionality but it is really intriguing !<br>I have found some problems doing experiments with (undocumented) compile attributes<br>inline_effort and inline_unroll. No No No do not remove them!!!! They just needs to be<br>tested and reworked a bit :-)<br><br>I am working on a module inline parse transform that I need for speed things up a bit,<br>specially on modules that I think will not change so much over time (think lists module)<br>Also, hipe compile on top of this tends to do marvelous things with performance :-)<br><br>Any way here is a module that when compiled, first of all warns about some strange things<br>and then generates some "interesting" code.<br><br>I guess the ones working on this will see what is the problem. And please do NOT remove<br>functionality just because I found it, improve it. I need it :-)<br><br>Thanks<br><br><br>/Tony<br><br><br><br>-module(example3i).<br><br>-export([run/1]).<br><br>-compile(inline).<br>-compile({inline_size,   500}).    %% default=24<br>-compile({inline_effort, 500}).   %% default=150<br>%% -compile({inline_unroll, 1}).   %% default=1<br>-compile({verbose,true}).<br><br>run(V) when is_float(V) -><br>   B = vec3f_new(4,5,6),<br>   C = vec3f_new(7,8,9),<br>   vec3f_multiply(V,vec3f_add(B,C)).<br><br>-define(is_vecA, is_float(A1), is_float(A2), is_float(A3)).<br>-define(is_vecB, is_float(B1), is_float(B2), is_float(B3)).<br><br>vec3f_new(X,Y,Z) when is_number(X), is_number(Y), is_number(Z) -><br>   {float(X),float(Y),float(Z)}.<br><br>vec3f_add({A1,A2,A3},{B1,B2,B3}) when ?is_vecA, ?is_vecB -><br>   {A1+B1,A2+B2,A3+B3}.<br><br>vec3f_multiply({A1,A2,A3},{B1,B2,B3}) when ?is_vecA, ?is_vecB -><br>   {A1*B1,A2*B2,A3*B3};<br>vec3f_multiply(A, {B1,B2,B3}) when is_float(A), ?is_vecB -><br>   {A*B1,A*B2,A*B3};<br>vec3f_multiply({A1,A2,A3}, B) when is_float(B), ?is_vecA -><br>   {A1*B,A2*B,A3*B}.<br><br><br>_______________________________________________<br>erlang-bugs mailing list<br>erlang-bugs@erlang.org<br>http://erlang.org/mailman/listinfo/erlang-bugs<br></blockquote>_______________________________________________<br>erlang-bugs mailing list<br>erlang-bugs@erlang.org<br>http://erlang.org/mailman/listinfo/erlang-bugs<br></blockquote><br>_______________________________________________<br>erlang-bugs mailing list<br>erlang-bugs@erlang.org<br>http://erlang.org/mailman/listinfo/erlang-bugs<br></blockquote>_______________________________________________<br>erlang-bugs mailing list<br>erlang-bugs@erlang.org<br>http://erlang.org/mailman/listinfo/erlang-bugs<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; ">"Installing applications can lead to corruption over time. </span><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; ">Applications gradually write over each other's libraries, partial upgrades occur, user and system errors happen, and minute changes may be unnoticeable and difficult to fix"</span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; "><br></span></div></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>