D-

Iain Buclaw ibuclaw at ubuntu.com
Mon Feb 13 07:00:37 PST 2012


On 12 February 2012 17:45, Daniel Murphy <yebblies at nospamgmail.com> wrote:
> Turns out I can't help myself:
>
> https://github.com/yebblies/dmd/tree/microd
> (the makefile changes are win32 only, but aren't very compilcated)
>
> It compiles the following into cryptic c full of mangled names just fine:
>
> __gshared int global = 3;
>
> int main()
> {
>    uint x;
>    foreach(i; 0..20)
>    {
>        x += i;
>    }
>    return 0;
> }
>
> Doesn't seem that hard.  Dmd would need support for 8/16 bit pointers and a
> few other things, but I think most of the customization could be done with
> some well-defined macros and per-architecture header files.  Some features
> are implemented in wrong part of the compiler, and will cause problems.
>
>

O_O


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list