On Thu, Jul 15, 2010 at 3:08 AM, Gabriel Dos Reis <span dir="ltr"><<a href="mailto:gdr@integrable-solutions.net">gdr@integrable-solutions.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

 Do you have a documentation for ECL's FASL format (and data structures)?<br>
</blockquote></div><br>Not really: read.d and more precisely read_VV document the process of initializing a FASL file, while load.d shows how it is loaded.<br><br>FASL files are just shared libraries. We do not use "formats" as such, but just link together object files.<br>

<br>Each object file contains a single initialization routine, which is just a C function with the statements in the lisp file, compiled.<br><br>This routine is called twice by read_VV. The first time it just returns a structure (ecl_codeblock) with some fields filled in, such as the text representation of all constants, the text representation of those constants that are only used during initialization (and can be eliminated afterwards), and some debug information.<br>

<br>The second time, the init function executes the compiled statements I mentioned before. Now all constants and packages have been set up and thus the lisp code works just fine. Functions will be installed by the statements that implement DEFUN, and macros, classes, and other things will be defined.<br>

<br>But again, this is _how_ it works. There is no format as such. ECL just uses whatever the operating system provides in terms of binary file formats, system calls to load them, etc.<br><br>Juanjo<br clear="all"><br>-- <br>

Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com">http://juanjose.garciaripoll.googlepages.com</a><br>