[MLton] C-- backend
John Dias
dias@eecs.harvard.edu
Tue, 4 Jul 2006 01:23:47 -0400 (EDT)
An excellent point. You can see the (non-final) design in section 11.2,
and Cmm_CreateThread is even implemented. The big missing piece is the
limitcheck. If you want to see an example from the qc-- test suite, you
can take a look at the pair of files qc--/test2/src/factmain.c and
qc--/test2/src/fact.c--
-j
On Mon, 3 Jul 2006, Matthew Fluet wrote:
>
> O.k., but the C-- spec (Section 8.3) doesn't give any specifics on how to
> start a new stack going.
>
>> Well, to be more precise, qc-- supports multiple stacks, but it does not
>> yet detect overflow.
>> -j
>>
>> On Mon, 3 Jul 2006, Matthew Fluet wrote:
>>
>>>
>>>> I was recently told that a C-- backend for MLton exists, but the newest
>>>> information I could find was from March of 2005.
>>>
>>> That is the most recent info in the mailing list. I made a couple more
>>> modifications to the backend in Summer 2005, when one of Norman Ramsey's
>>> summer undergrad students was thinking about more efficient
>>> representations of span data.
>>>
>>>> Targetting C-- would be pretty handy for us, because some of the
>>>> optimizations involve weak continuations. However, the last thing I read
>>>> on the backend said that it still hasn't implemented callcc (among other
>>>> features), so that might make things more difficult.
>>>
>>> Correct; the qc-- compiler doesn't currently support multiple stacks.
>>> Since, to use C-- effectively, we aren't using the same trampoline as is
>>> used in the C backend, there needs to be a C-- stack for every ML stack.
>>>
>>> A grad student was working on getting C-- and qc-- to support multiple
>>> stacks, but I don't believe that they have been fully integrated yet. And
>>> they certainly haven't been pushed into the C-- backend.
>>>
>>>> I wanted to know what the current state of the C-- backend is, and
>>>> if/where we could get the source code.
>>>
>>> The state is pretty much what was documented in the March 2005 emails.
>>> (Modulo some bugs fixed in the qc-- compiler.) It is still very
>>> experimental, but you're welcome to check it out. It is available in SVN
>>> at:
>>> svn://mlton.org/svnroot/mlton/branches/on-20050420-cmm-branch
>>>
>>> IIRC, in order to compile with qc-- using the C-- backend, you'll need to
>>> copy the lib/qc-- files from the qc-- install directory to build/lib/self
>>> in the mlton build.
>>>
>>> _______________________________________________
>>> MLton mailing list
>>> MLton@mlton.org
>>> http://mlton.org/mailman/listinfo/mlton
>>>
>>
>> _______________________________________________
>> MLton mailing list
>> MLton@mlton.org
>> http://mlton.org/mailman/listinfo/mlton
>>
>