|Heap Allocated Stack Frame x86 Compiler? email@example.com (Bruce) (2002-09-03)|
|Re: Heap Allocated Stack Frame x86 Compiler? firstname.lastname@example.org (Stephen J. Bevan) (2002-09-08)|
|Re: Heap Allocated Stack Frame x86 Compiler? email@example.com (Peter \Firefly\Lund) (2002-09-08)|
|Re: Heap Allocated Stack Frame x86 Compiler? firstname.lastname@example.org.OZ.AU (Fergus Henderson) (2002-09-08)|
|Re: Heap Allocated Stack Frame x86 Compiler? email@example.com (Ira Baxter) (2002-09-08)|
|Re: Heap Allocated Stack Frame x86 Compiler? firstname.lastname@example.org (Paolo Bonzini) (2002-09-12)|
|From:||"Fergus Henderson" <email@example.com.OZ.AU>|
|Date:||8 Sep 2002 22:52:26 -0400|
|Organization:||Computer Science, University of Melbourne|
|Posted-Date:||08 Sep 2002 22:52:26 EDT|
"Bruce" <firstname.lastname@example.org> writes:
>Is there a compiler available that will create native x86 code that
>makes no use of the stack. Instead it could dynamically allocate space
>for a stack frame on the heap and then set the EBP and ESP registers
>and then use the stack as normal.
>I searched the internet but all I can find are langauges such as
>python and PicoC that run on top of virtual machines.
Well, there are language implementations which work by first compiling
their source language to code for a virtual machine, and then
*compiling* the virtual machine code to native code (rather than
interpreting it), perhaps via another intermediate language such as C.
Examples in this category include ghc, GNU Prolog, and the "low level
C" back-end of the Mercury compiler . These language
implementations all compile to native code (albeit via C), and AFAIK
do not use the ESP register for their normal call frames. (This is
definitely true for GNU Prolog and Mercury, but I'm not so sure for
ghc.) However, I don't think it is true that they make no use of the
system stack; since they compile via C, the generated code may make
use of the system stack to hold temporary values used for expression
Another example which might be even closer to what you are looking for
is SML/NJ . SML/NJ allocates stack frames on the heap, and
recovers them by garbage collection (or at least it did last time I
looked). It has an x86 native code generator.
 See <http://www.cs.mu.oz.au/research/mercury/backends.html>.
 See <http://www.smlnj.org>.
Fergus Henderson <email@example.com> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
Return to the
Search the comp.compilers archives again.