<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 1 March 2013 10:43, Jacob Carlborg <span dir="ltr"><<a href="mailto:doob@me.com" target="_blank">doob@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">On 2013-03-01 11:29, Iain Buclaw wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The code that interfaces with gcc needs to be in either C or C++. There<br>
are C++ structs/classes defined in the D frontend that while they<br>
include all methods required for parsing/semantic analysis of D code.<br>
They also include methods that are used to generate the codegen for the<br>
backend (toElem, toIR, toSymbol, etc). In gdc, these are gcc<br>
interfacing methods that can't be converted to D.<br>
</blockquote>
<br></div>
Can you use the current toElem, toIR and toSymbol written in C++. Then port in changes from the version written in D as needed?<span class=""><font color="#888888"><br>
<br>
-- <br>
/Jacob Carlborg<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">It's much more complex than that. Think about compatibility between calling D structs/classes from C++, and that dmd and gdc don't share the same representation of types in the back-end that are common to the front-end - elem, type, IRState, real_t, to name a few.<br>
</div><div class="gmail_extra"><br><br></div><div class="gmail_extra">Regards<br>-- <br>Iain Buclaw<br><br>*(p < e ? p++ : p) = (c & 0x0f) + '0';
</div></div>