Mercurial > projects > ddmd
diff dmd/FuncDeclaration.d @ 14:2cc604139636
Implemented Linux support for ddmd. Some parts are a bit hacky to just "get it working", that said, druntime and phobos compile, and unittests pass.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sun, 04 Apr 2010 02:06:32 +0100 |
parents | 10317f0c89a5 |
children | ddae60498573 |
line wrap: on
line diff
--- a/dmd/FuncDeclaration.d Wed Mar 31 16:29:36 2010 +0400 +++ b/dmd/FuncDeclaration.d Sun Apr 04 02:06:32 2010 +0100 @@ -112,6 +112,7 @@ import core.stdc.stdio; import core.stdc.string; +version (Bug4054) import core.memory; import std.string; @@ -2645,6 +2646,9 @@ type *t; n = sym.Sident; + version (Bug4054) + id = cast(char*) GC.malloc(8 + 5 + strlen(n) + 1); + else id = cast(char*) alloca(8 + 5 + strlen(n) + 1); sprintf(id, "_thunk%d__%s", offset, n); s = symbol_calloc(id); @@ -2837,6 +2841,9 @@ pi += parameters.dim; // Allow extra 2 for sthis and shidden + version (Bug4054) + params = cast(Symbol**)GC.malloc((pi + 2) * (Symbol*).sizeof); + else params = cast(Symbol**)alloca((pi + 2) * (Symbol*).sizeof); // Get the actual number of parameters, pi, and fill in the params[] @@ -3245,4 +3252,4 @@ } FuncDeclaration isFuncDeclaration() { return this; } -} \ No newline at end of file +}