[jhc] what to work on next?

John Meacham john at repetae.net
Wed Jun 24 21:29:48 EDT 2009


On Wed, Jun 24, 2009 at 02:56:24PM -0400, Rick R wrote:
> > I'll look into it, an issue is that I am looking for a GC I can use with
> > the gcc backend. Other backends (such as cmm or jvm) come with their own
> > garbage collectors, and although a native code generator would be neat,
> > I wouldn't want to rely on one. In fact, rather than write a native code
> > generator, I would likely want to write a standalone c-- compiler that I
> > can bundle with jhc. In the end, grin is close enough to c-- that I
> > don't think I lose anything in the translation.
> 
> Timber's only target at the moment is C.  So you can use it with gcc.

Excellent, I'll look at how they solve the problem.

> Let me see if I understand your intention for the long term correctly:
> For native code jhc would emit C/C++ and use the native garbage collector.
> For everything else it would emit c-- which would then get compiled to the
> appropriate VM, utilizing that VM's GC?

No, C-- is independent of a VM implementation. I am thinking 3
independent back ends,

C   - uses gcc, fully complete and good except for the lack of a good GC.

C-- - basically this is the native code generator, c-- is a portable
      assembly code at a much lower level than C, I'd then use or write a C--
      -> native assembler. C-- supports garbage collection, it doesn't
      come with one, but it allows root-finding on the stack which is the
      major problem that needs to be solved with the C back end, so it is much
      simpler.

VM - some sort of VM back end, .NET or JVM. Simply because it would be a
     good thing to have and useful to people, I would use the VM's GC for
     this back end.

The C-- back end is probably the easiest, as I designed GRIN with it in
mind. However, the lack of C-- compilers means it is not as big of a win
as we might hope. Now, a VM back end could be a killer feature for a lot
of people, but it is something I would need help with, someone who knows
the VM to spearhead the effort. 

And of course, I really need to bite the bullet and write a GC for the C
back end, as that would fix the major issue with jhc right now.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/


More information about the jhc mailing list