May 09, 2012 Re: run-time stack-based allocation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gor Gyolchanyan | On Wednesday, 9 May 2012 at 20:52:33 UTC, Gor Gyolchanyan wrote:
> I thought function default parameters need to be statically known...
> isn't it the case?
Nope – AFAIK you can also do something like (Foo param = new Foo).
David
|
May 10, 2012 Re: run-time stack-based allocation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tove | On 5/9/12 3:17 PM, Tove wrote: > On Tuesday, 8 May 2012 at 07:03:35 UTC, Gor Gyolchanyan wrote: >> Cool! Thanks! I'l definitely check it out! I hope it's DDOCed :-D >> > > I just invented an absolutely wicked way of using alloca() in the parent > context... Yah, me too. http://forum.dlang.org/thread/i1gnlo$18g0$1@digitalmars.com#post-i1gql2:241k6o:241:40digitalmars.com I found it by googling for my name and "dark" and "devious" :o). Andrei |
May 10, 2012 Re: run-time stack-based allocation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Thursday, 10 May 2012 at 03:03:22 UTC, Andrei Alexandrescu wrote:
> On 5/9/12 3:17 PM, Tove wrote:
>> On Tuesday, 8 May 2012 at 07:03:35 UTC, Gor Gyolchanyan wrote:
>>> Cool! Thanks! I'l definitely check it out! I hope it's DDOCed :-D
>>>
>>
>> I just invented an absolutely wicked way of using alloca() in the parent
>> context...
>
> Yah, me too. http://forum.dlang.org/thread/i1gnlo$18g0$1@digitalmars.com#post-i1gql2:241k6o:241:40digitalmars.com I found it by googling for my name and "dark" and "devious" :o).
>
> Andrei
Muharrr, way cool :D We seriously need a highly visible "blog:ish page" (which was suggested in another lost thread), listing some useful D gems... I have a feeling these forums are a treasure trove with forgotten snippets...
|
July 09, 2012 Re: run-time stack-based allocation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Thursday, 10 May 2012 at 03:03:22 UTC, Andrei Alexandrescu wrote:
> On 5/9/12 3:17 PM, Tove wrote:
>> On Tuesday, 8 May 2012 at 07:03:35 UTC, Gor Gyolchanyan wrote:
>>> Cool! Thanks! I'l definitely check it out! I hope it's DDOCed :-D
>>>
>>
>> I just invented an absolutely wicked way of using alloca() in the parent
>> context...
>>
>> auto Create(void* buf=alloca(frame_size))
>
> Yah, me too. http://forum.dlang.org/thread/i1gnlo$18g0$1@digitalmars.com#post-i1gql2:241k6o:241:40digitalmars.com I found it by googling for my name and "dark" and "devious" :o).
That is so awesome that it can't possibly be legal by the spec!
This "runtime struct" sounds really cool too. Pinch me, I must be dreaming :D
|
Copyright © 1999-2021 by the D Language Foundation