Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
August 26, 2021 [Issue 22239] Can't migrate from postblits if they are used without frame pointer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22239 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |razvan.nitu1305@gmail.com --- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> --- This affects normal constructors as well (copy constructors are just a particularization of a normal constructor): struct Normal(alias al) { this(int a) {} void x() {} } void main() { Normal!(x => x) a; a.f; } void f(T)(T x) { T y = 6; } -- |
August 26, 2021 [Issue 22239] Can't migrate from postblits if they are used without frame pointer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22239 --- Comment #2 from RazvanN <razvan.nitu1305@gmail.com> --- Hmmm, this code fails also: struct PostBlitted(alias al) { this(this){} void x(){} //a member function so that an instance contains a frame pointer } void main() { PostBlitted!(x => x) a; a.f; } void f(T)(T x) { T y; } -- |
August 26, 2021 [Issue 22239] Can't migrate from postblits if they are used without frame pointer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22239 --- Comment #3 from Ate Eskola <Ajieskola@gmail.com> --- That last example is supposed to fail. `PostBlitted!(x => x)` contains a hidden context pointer to `main` to construct, so they can be default-initialized only at `main`. Not at `f`. (It could be argued that no frame pointer should be needed because `x => x` does not use any variables from `main`, but that's a different issue) Default blittings, and thus postblits, work, because the hidden context pointer gets copied from the original instance. But I can't come up with a way to do the same with a copy constructor. Well, I suppose I could devise a workaround with `static opCall`, but we're supposed to replace postblits with copy constructors, not with hackish workarounds. -- |
November 30, 2021 [Issue 22239] Can't migrate from postblits if they are used without frame pointer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22239 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |timon.gehr@gmx.ch --- Comment #4 from RazvanN <razvan.nitu1305@gmail.com> --- *** Issue 22499 has been marked as a duplicate of this issue. *** -- |
December 17, 2022 [Issue 22239] Can't migrate from postblits if they are used without frame pointer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22239 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P3 -- |
18 hours ago [Issue 22239] Can't migrate from postblits if they are used without frame pointer | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22239 Jonathan M Davis <issues.dlang@jmdavisProg.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |issues.dlang@jmdavisProg.co | |m --- Comment #5 from Jonathan M Davis <issues.dlang@jmdavisProg.com> --- When trying to add a copy constructor to a type in an existing code base, I've been seeing a lot of errors about not having a frame pointer (particularly from std.algorithm code), which has been incredibly annoying to deal with, and it has made no sense to me that a frame pointer would even be needed, since the only difference is that a copy constructor has been added (though honestly, the whole frame pointer stuff is incredibly confusing in general). So, I'm _guessing_ that this is the issue that I've been hitting, but man, it would be nice if the compiler didn't decide that it needed a frame pointer that it can't have just because a type that's involved got a copy constructor added to it. -- |
Copyright © 1999-2021 by the D Language Foundation