<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 2014-10-01 23:55, Tony Rogvall
wrote:<br>
</div>
<blockquote
cite="mid:C803B3FD-CB5A-4A38-8857-02E715643D0D@rogvall.se"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
To my (mild) surprise I discovered that the tuples above where NOT
generated as literals!
<div>So of course I checked if there was any particular reason for
this.</div>
</blockquote>
Was there? =)<br>
<blockquote
cite="mid:C803B3FD-CB5A-4A38-8857-02E715643D0D@rogvall.se"
type="cite">
<div><br>
</div>
<div>I developed a patch produced to patch function return values:</div>
<div><br>
</div>
<div>'__ffe_sqr'() -> <<"sqr">>.</div>
<div><br>
</div>
<div>here I replaced <<"sqr">>.</div>
<div>with</div>
<div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;"> { 0,
<<"sqr">>, fun ffe:docol/4, fun ffe:dupe/0, fun
ffe:star/0, fun ffe:semis/0 }.</div>
</div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;"><br>
</div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;">in the
literal section of the beam file using beam_lib and a simple
match.</div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;"><br>
</div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;">The loader
worked and the code now return constant tuples with functions in
them.</div>
</blockquote>
<br>
Could you use these literals? Even if the external module wasn't
loaded?<br>
<br>
I only checked the code briefly but I think that if you load an
external as a literal you have to make a stub for the module if it
isn't loaded, so the<br>
error handler can load the module later on. But you are a savvy
person, I think you can figure it out. =)<br>
<br>
I'm sure there are other things to consider as well.<br>
<br>
<blockquote
cite="mid:C803B3FD-CB5A-4A38-8857-02E715643D0D@rogvall.se"
type="cite">
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;"><br>
</div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;">Question: </div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;">1. Is my
code going to crash later ? :-)</div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;">2. if so can
I do anything about it ?</div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;">3. if not
can we get external funs as supported literals ?</div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;"><br>
</div>
<div apple-content-edited="true" style="color: rgb(51, 51, 51);
font-family: Geneva, Arial, Helvetica, sans-serif;">/Tony</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
eeps mailing list
<a class="moz-txt-link-abbreviated" href="mailto:eeps@erlang.org">eeps@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/eeps">http://erlang.org/mailman/listinfo/eeps</a>
</pre>
</blockquote>
<br>
</body>
</html>