On Thursday, 26 July 2018 at 12:45:52 UTC, Johan Engelen wrote:
Thanks for pointing to D's placement new. This is bad news for
my devirtualization work; before, I thought D is in a better
situation than C++, but now it seems we may be worse off.
Just say that devirtualization is incompatible w
On 7/26/18 8:45 AM, Johan Engelen wrote:
On Wednesday, 25 July 2018 at 08:11:59 UTC, rikki cattermole wrote:
Standard solution[0].
[0] https://dlang.org/phobos/std_conv.html#.emplace.4
Thanks for pointing to D's placement new. This is bad news for my
devirtualization work; before, I thought
On Thursday, 26 July 2018 at 12:53:44 UTC, rikki cattermole wrote:
On 27/07/2018 12:45 AM, Johan Engelen wrote:
In D, we don't have placement new, great! And now, I learn
that the _standard library_ _does_ have something that looks
like placement new, but without extra guarantees of the spec
On Thursday, 26 July 2018 at 21:22:45 UTC, Petar Kirov
[ZombineDev] wrote:
Please excuse if my question is too naive, but how does this
change anything?
The main insight is to reason about things in terms of language
semantics, not in terms of actual memory addresses and
instructions as pro
On Thursday, 26 July 2018 at 21:22:45 UTC, Petar Kirov
[ZombineDev] wrote:
[..]
D on the other hand is (or at least I'm hopeful that it is)
moving away giving magical powers to its runtime or standard
library and is its embracing the spirit of bare bones systems
programming where the programm
On Thursday, 26 July 2018 at 12:45:52 UTC, Johan Engelen wrote:
On Wednesday, 25 July 2018 at 08:11:59 UTC, rikki cattermole
wrote:
Standard solution[0].
[0] https://dlang.org/phobos/std_conv.html#.emplace.4
Thanks for pointing to D's placement new. This is bad news for
my devirtualization
On 27/07/2018 12:45 AM, Johan Engelen wrote:
On Wednesday, 25 July 2018 at 08:11:59 UTC, rikki cattermole wrote:
Standard solution[0].
[0] https://dlang.org/phobos/std_conv.html#.emplace.4
Thanks for pointing to D's placement new. This is bad news for my
devirtualization work; before, I tho
On Wednesday, 25 July 2018 at 08:11:59 UTC, rikki cattermole
wrote:
Standard solution[0].
[0] https://dlang.org/phobos/std_conv.html#.emplace.4
Thanks for pointing to D's placement new. This is bad news for my
devirtualization work; before, I thought D is in a better
situation than C++, but
On 25/07/2018 8:05 PM, Shachar Shemesh wrote:
Forget the "why" for the moment.
T construct(T, ARGS...)(ARGS args) if( is(T==class) ) {
auto buffer = new ubyte[__traits(classInstanceSize, T)];
T cls = cast(T)buffer.ptr;
Allocates the storage space of the fields (both public and private)
Forget the "why" for the moment.
T construct(T, ARGS...)(ARGS args) if( is(T==class) ) {
auto buffer = new ubyte[__traits(classInstanceSize, T)];
T cls = cast(T)buffer.ptr;
// Is this really the best way to do this?
buffer[] = cast(ubyte[])typeid(T).initializer()[];
cls.__ctor(arg
10 matches
Mail list logo