Raw binary(to work without OS) in D

Iain Buclaw ibuclaw at ubuntu.com
Fri Jun 29 04:30:32 PDT 2012


On 28 June 2012 18:02, Sean Kelly <sean at invisibleduck.org> wrote:
> On Jun 28, 2012, at 9:45 AM, Iain Buclaw wrote:
>>
>> Wouldn't it be useful if the compiler had diagnostics for all implicit
>> allocations it makes (ie: closures, array literals)?  Similar to that
>> of the -vtls switch. These such things you may want to avoid in a
>> freestanding environment (no link to C runtime).
>
> Yes it would.  I guess the question is how to expose this.  Generally speaking though, array append type operations allocate, AA insertions allocate, and non-scope delegate use allocates.  I think that's it.

>From a user perspective?  A switch that has a less ugly than
-vimplicit_library_calls.  Which spurts out messages like:

"Function %s builds a closure", func

or

"Expression %s makes implicit allocation call to %s", expr, func


-- 
Iain Buclaw

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


More information about the Digitalmars-d mailing list