<div>Hi,</div><div><br></div><div>In the purpose of making it clear and easy-enough for the unintroduced to understand the inner workings of Gambit in its current version, it'd be great to know what strategies/philosophies, papers  and other reference documents underly Gambit - its compiler, environment and so on, beyond the Scheme (R5RS etc.) and SRFI specs.</div>

<div><br></div><div>I'd be happy to make a Wiki page, Theory and papers, or alike, of this.</div><div><br></div><div><div>My best understanding is that compilation to C/asm of Scheme with callcc support generally is perceived as a process that's intricate and of an abstract nature, asking this quite a lot therefore. :-)</div>

<br class="Apple-interchange-newline"></div><div><br></div><div>The papers I'm aware of are basically those on Marc's homepage and those listed by Alex below. And, beyond knowing which they are, it'd be great to have a clue of how central the respective paper is in Gambit's particular design / how strictly it was adhered to, on the scale from directly/being implemented as it is to indirectly/used rather for inspiration.</div>

<div><br></div><div>Things whose answers can be found in the papers would include:</div><div> * How the internal value, object, procedure and closure representations look and fit together</div><div>   Closures effectively special-purpose vectors of boxes?</div>

<div>   All values and object references are internally native-size integers with a number of reserved bytes describing the value type, what about them?</div><div> * Value and object allocations, made how and what optimizations for fast dead object detection and subsequent reclaim are there</div>

<div> * The layout of the asm/C-level stack and trampolines and how the GC resolves the locations of all object reference, anatomy of a procedure call and return</div><div> * How the CPS transformation works</div><div> * What optimizations are made, in terms of register use optimizations, compile-time pre-evaluation or deductions of datatype</div>

<div>   At some point I got that generally |cdr| is translated to +1 in asm/c, for instance</div><div> * What does the internal form of interpreted code actually look/work like</div><div> * Interrupt checks, made provenly at what granularity</div>

<div> * Code debuggability, made in compiled code on what basis</div><div> * Motivations for the GVM code's design</div><div> * Hashtable algorithm</div><div> * Number handling</div><div><br class="Apple-interchange-newline">

</div><div>I suppose there's key areas beyond these also. And, I suppose quite possibly, some key things are not described in any paper.</div><div><br></div><div>Find below an attempt to figure out which of Marc's papers are in use for these respects of Gambit today.</div>

<div><br></div><div>If you know such papers/docs or you see areas beyond those listed above that ought to be considered as in the scope too, please tell.</div><div><br></div>Kind regards,<div>Mikael<br><span style="font-family:'Times New Roman';font-size:medium"><br>

</span></div><div> * Marc Feeley. <b style="font-family:'Times New Roman';font-size:medium">Speculative inlining of predefined procedures in an R5RS Scheme to C compiler. </b><span style="font-family:'Times New Roman';font-size:medium">In Olaf Chitil, Zoltán Horváth, and Viktória Zsók, editors, </span><i style="font-family:'Times New Roman';font-size:medium">Implementation and Application of Functional Languages (IFL'07)</i><span style="font-family:'Times New Roman';font-size:medium">, volume 5083 of </span><i style="font-family:'Times New Roman';font-size:medium">Lecture Notes in Computer Science</i><span style="font-family:'Times New Roman';font-size:medium">, pages 237-253, 2008. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/FeeleyIFL07.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div> * <span style="font-family:'Times New Roman';font-size:medium">Fernanda Kri and Marc Feeley. </span><b style="font-family:'Times New Roman';font-size:medium">Genetic instruction scheduling and register allocation. </b><span style="font-family:'Times New Roman';font-size:medium">In </span><i style="font-family:'Times New Roman';font-size:medium">International Conference on the Quantitative Evaluation of Systems (QEST'04)</i><span style="font-family:'Times New Roman';font-size:medium">, pages 76-83, 2004. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/KriFeeleyQEST04.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div><span style="font-family:'Times New Roman';font-size:medium"> * Marc Feeley. </span><b style="font-family:'Times New Roman';font-size:medium">A better API for first-class continuations. </b><span style="font-family:'Times New Roman';font-size:medium">In </span><i style="font-family:'Times New Roman';font-size:medium">Scheme and Functional Programming Workshop (SFPW'01)</i><span style="font-family:'Times New Roman';font-size:medium">, pages 1-3, September 2001. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/FeeleySW01.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div><span style="font-family:'Times New Roman';font-size:medium"> * Danny Dubé and Marc Feeley. </span><b style="font-family:'Times New Roman';font-size:medium">Demand-driven type analysis: an introduction. </b><span style="font-family:'Times New Roman';font-size:medium">In </span><i style="font-family:'Times New Roman';font-size:medium">Scheme and Functional Programming Workshop (SFPW'01)</i><span style="font-family:'Times New Roman';font-size:medium">, pages 21-32, September 2001. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/DubeFeeleySW01.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div><span style="font-family:'Times New Roman';font-size:medium"> * Marc Feeley. </span><b style="font-family:'Times New Roman';font-size:medium">A portable implementation of first-class continuations for unrestricted interoperability with C in a multithreaded Scheme. </b><span style="font-family:'Times New Roman';font-size:medium">In </span><i style="font-family:'Times New Roman';font-size:medium">Scheme and Functional Programming Workshop (SFPW'00)</i><span style="font-family:'Times New Roman';font-size:medium">, pages 65-66, September 2000. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/FeeleySW00.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div><span style="font-family:'Times New Roman';font-size:medium"> * Mauricio Solar and Marc Feeley. </span><b style="font-family:'Times New Roman';font-size:medium">Scheduling algorithm considering latency time on a shared-memory machine. </b><span style="font-family:'Times New Roman';font-size:medium">In </span><i style="font-family:'Times New Roman';font-size:medium">XVI World Computer Congress, International Conference on Software: Theory and Practice</i><span style="font-family:'Times New Roman';font-size:medium">, August 2000.</span></div>

<div><span style="font-family:'Times New Roman';font-size:medium"> * Marc Feeley, James S. Miller, Guillermo J. Rozas, and Jason A. Wilson. </span><b style="font-family:'Times New Roman';font-size:medium">Compiling higher-order languages into fully tail-recursive portable C. </b><span style="font-family:'Times New Roman';font-size:medium">Technical Report 1078, département d'informatique et r.o., Université de Montréal, August 1997. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/FeeleyMillerRozasWilsonDIRO1078.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div><span style="font-family:'Times New Roman';font-size:medium"> * Dominique Boucher and Marc Feeley. </span><b style="font-family:'Times New Roman';font-size:medium">Abstract compilation: a new implementation paradigm for static analysis. </b><span style="font-family:'Times New Roman';font-size:medium">In </span><i style="font-family:'Times New Roman';font-size:medium">International Conference on Compiler Construction (CC'96)</i><span style="font-family:'Times New Roman';font-size:medium">, pages 192-207, April 1996.</span><a href="http://www.iro.umontreal.ca/~feeley/papers/BoucherFeeleyCC96.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div><span style="font-family:'Times New Roman';font-size:medium"> * Manuel Serrano and Marc Feeley. </span><b style="font-family:'Times New Roman';font-size:medium">Storage use analysis and its applications. </b><span style="font-family:'Times New Roman';font-size:medium">In </span><i style="font-family:'Times New Roman';font-size:medium">ACM SIGPLAN International Conference on Functional Programming (ICFP'96)</i><span style="font-family:'Times New Roman';font-size:medium">, pages 50-61, May 1996. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/SerranoFeeleyICFP96.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div><span style="font-family:'Times New Roman';font-size:medium"> * Marc Feeley. </span><b style="font-family:'Times New Roman';font-size:medium">Polling efficiently on stock hardware. </b><span style="font-family:'Times New Roman';font-size:medium">In </span><i style="font-family:'Times New Roman';font-size:medium">ACM Conference on Functional Programming Languages and Computer Architecture (FPCA'93)</i><span style="font-family:'Times New Roman';font-size:medium">, pages 179-187, 1993. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/FeeleyFPCA93.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div><span style="font-family:'Times New Roman';font-size:medium"> * Marc Feeley and Guy Lapalme. </span><b style="font-family:'Times New Roman';font-size:medium">Closure generation based on viewing LAMBDA as EPSILON plus COMPILE. </b><i style="font-family:'Times New Roman';font-size:medium">Computer Languages</i><span style="font-family:'Times New Roman';font-size:medium">, 17(4):251-267, 1992. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/FeeleyLapalmeCL92.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div><span style="font-family:'Times New Roman';font-size:medium">Marc Feeley and Guy Lapalme. </span><b style="font-family:'Times New Roman';font-size:medium">Using closures for code generation. </b><i style="font-family:'Times New Roman';font-size:medium">Computer Languages</i><span style="font-family:'Times New Roman';font-size:medium">, 12(1):47-66, 1987. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/FeeleyLapalmeCL87.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div> * <span style="font-family:'Times New Roman';font-size:medium">Marc Feeley. </span><b style="font-family:'Times New Roman';font-size:medium">Deux approches ŕ l'implantation du language Scheme. </b><span style="font-family:'Times New Roman';font-size:medium">Master's thesis, Université de Montréal, May 1986. </span><a href="http://www.iro.umontreal.ca/~feeley/papers/FeeleyMSc.pdf" style="font-family:'Times New Roman';font-size:medium">[PDF]</a></div>

<div><br><div class="gmail_quote">2011/6/9 Alex Queiroz <br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hallo,<br>
<div><br>
On Wed, Jun 8, 2011 at 11:14 PM, Jason E. Aten <<a href="mailto:j.e.aten@gmail.com" target="_blank">j.e.aten@gmail.com</a>> wrote:<br>
><br>
> If others on the list have pointers to papers as well, I'd enjoy reading<br>
> about the best thoughts on how to implement continuations.<br>
><br>
<br>
</div>"Representing Control in the Presence of First-Class Continuations"<br>
<a href="http://www.cs.indiana.edu/~dyb/papers/stack.ps" target="_blank">http://www.cs.indiana.edu/~dyb/papers/stack.ps</a><br>
<br>
"A portable implementation of first-class continuations for<br>
unrestricted interoperability with C in a multithreaded Scheme"<br>
<a href="http://repository.readscheme.org/ftp/papers/sw2000/feeley.pdf" target="_blank">http://repository.readscheme.org/ftp/papers/sw2000/feeley.pdf</a><br>
<br>
"Implementation strategies for first-class continuations"<br>
<a href="http://www.springerlink.com/content/h5808n962434j275/fulltext.pdf" target="_blank">http://www.springerlink.com/content/h5808n962434j275/fulltext.pdf</a><br>
<br>
More in:<br>
<a href="http://library.readscheme.org/page6.html" target="_blank">http://library.readscheme.org/page6.html</a><br>
<br>
Cheers,<br>
<span><font color="#888888">--<br>
-alex<br>
</font></span></blockquote></div><div><br></div></div>