Appendix F. Hotdog: Compiling Scheme to Object-Oriented Virtual Machines


Pankaj Surana

Appendix F credit: Copyright of Pankaj Surana.

The Hotdog Scheme compiler tests the feasibility of compiling an advanced functional language to an object-oriented virtual machine (VM); in particular, the compiler targets the .NET Common Language Runtime (CLR) and the Java Virtual Machine (JVM). As both are ported to more platforms and increasing numbers of programmers write more libraries, these VMs present an attractive alternative to compiling directly to the hardware. However, the compiler must somehow cross the semantic gap between functional and object-oriented languages. The Hotdog compiler aims to translate Scheme to code approximating the output of an object-oriented compiler, rather than exploiting the idiosyncrasies of a particular VM implementation. The overall performance of Scheme programs compiled to these VMs tends to be better than that of a Scheme interpreter, but falls short of optimizing Scheme native-code compilers.



Programming in the .NET Environment
Programming in the .NET Environment
ISBN: 0201770180
EAN: 2147483647
Year: 2002
Pages: 146

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net