[bitc-dev] Random thought about closures
Zorg 421
zorglub421 at gmail.com
Sat Apr 25 11:14:45 EDT 2009
c-- (www.cminusminus.org) maybe has quiet some ideas to borrow from.
(I'm relatively new to this list so excuse me if c-- has already been
discussed here).
it's a high level assembly, low level C with support for tail
recursion, GC implementation most notably, and other func. language
features facilities.
The backend for x86 seems mature, ppc not too bad (from memory),
others like mips and ARM really basic, just a start. x86 and IA64
backends knows nothing about SIMD.
The qc-- compiler is written in ocaml.
It's an interesting beast for sure.
On Sat, Apr 25, 2009 at 4:01 PM, Jonathan S. Shapiro <shap at eros-os.com> wrote:
> A blindingly obvious thought just occurred to me, and I want to write it
> down before I forget: there is no reason that procedures expecting a closure
> pointer need to honor the standard calling convention.
>
> Such a procedure can only be called in two ways:
>
> 1. Through a statically resolved reference from a bitc call site.
> 2. From it's trampoline, which is actuall a degenerate case of (2).
>
> So what this means is that the entire calling convention problem for
> closures is entirely a consequence of generating C code, and the whole issue
> will go away when native code generation is used.
>
> Yet *another* reason not to generate C code for this kind of thing. Sigh.
> _______________________________________________
> bitc-dev mailing list
> bitc-dev at coyotos.org
> http://www.coyotos.org/mailman/listinfo/bitc-dev
>
>
More information about the bitc-dev
mailing list