[bitc-dev] Choice of runtime/VM

wren ng thornton wren at freegeek.org
Sat Jul 31 14:23:52 PDT 2010


Kristopher Micinski wrote:
>  Oh, first we can start as simply "Kris" : ).
> 
> To your previous response on garbage collection, I will promise to look into
> this. My garbage collection knowledge is minimal outside of what you find in
> your basic compilers textbooks and toy runtimes for small functional
> languages. But yes, I will read up on this and look into the possibility,
> and if it looks like I would choose to retarget BitC to MCUs I would be
> willing to work on this.

You may want to look at the JHC implementation of Haskell for some 
starting pointers

     http://repetae.net/computer/jhc/

Unlike GHC which has its own runtime and compiles down to 
C-as-portable-assembly or LLVM, JHC compiles to legible ANSI C. The goal 
of JHC is to explore the possibilities of optimizing representations, 
and so it supports an extensive set of unboxing tricks to deal with 
Haskell code; whereas GHC aims for a simpler and more generic 
representation.

Until very recently, JHC had no support for garbage collection. In the 
latest versions it supports pluggable GC, and offers a "jgc" 
implementation along with other options like Boehm GC. AFAIK, the jgc 
implementation uses a strategy similar to the one Shap mentioned.

-- 
Live well,
~wren


More information about the bitc-dev mailing list