Thread overview
[Issue 10276] Nested structs with constructors get a context pointer even if they don't need one
[Issue 10276] Compiler pointlessly makes a struct nested even if it doesn't need to be
Apr 20, 2014
Andrej Mitrovic
[Issue 10276] Nested structs get a context pointer even if they don't need one
Apr 20, 2014
Andrej Mitrovic
Aug 27, 2016
Andrej Mitrovic
Jul 21, 2017
Vladimir Panteleev
May 20, 2019
Simen Kjaeraas
May 20, 2019
Basile-z
Feb 07, 2020
Simen Kjaeraas
Mar 21, 2020
Basile-z
Jan 25, 2021
Simen Kjaeraas
Dec 17, 2022
Iain Buclaw
April 20, 2014
https://issues.dlang.org/show_bug.cgi?id=10276

Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrdarksys@gmail.com

--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> ---
*** Issue 12601 has been marked as a duplicate of this issue. ***

--
April 20, 2014
https://issues.dlang.org/show_bug.cgi?id=10276

Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Compiler pointlessly makes  |Nested structs get a
                   |a struct nested even if it  |context pointer even if
                   |doesn't need to be          |they don't need one

--
August 27, 2016
https://issues.dlang.org/show_bug.cgi?id=10276

Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |performance

--- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> ---
I'm marking this as a performance issue. It should in theory be simple to implement this in the compiler:

1. Check if the struct definition compiles
2. Check if a `static` version of it compiles
3. If 2 fails make the struct nested

--
July 21, 2017
https://issues.dlang.org/show_bug.cgi?id=10276

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Nested structs get a        |Nested structs with
                   |context pointer even if     |constructors get a context
                   |they don't need one         |pointer even if they don't
                   |                            |need one
           Severity|normal                      |enhancement

--
May 20, 2019
https://issues.dlang.org/show_bug.cgi?id=10276

Simen Kjaeraas <simen.kjaras@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |petar.p.kirov@gmail.com

--- Comment #3 from Simen Kjaeraas <simen.kjaras@gmail.com> ---
*** Issue 15343 has been marked as a duplicate of this issue. ***

--
May 20, 2019
https://issues.dlang.org/show_bug.cgi?id=10276

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp@gmx.com

--
February 07, 2020
https://issues.dlang.org/show_bug.cgi?id=10276

Simen Kjaeraas <simen.kjaras@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kiithsacmp@gmail.com

--- Comment #4 from Simen Kjaeraas <simen.kjaras@gmail.com> ---
*** Issue 20564 has been marked as a duplicate of this issue. ***

--
March 21, 2020
https://issues.dlang.org/show_bug.cgi?id=10276

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|b2.temp@gmx.com             |

--
January 25, 2021
https://issues.dlang.org/show_bug.cgi?id=10276

Simen Kjaeraas <simen.kjaras@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cr@tagion.org

--- Comment #5 from Simen Kjaeraas <simen.kjaras@gmail.com> ---
*** Issue 21580 has been marked as a duplicate of this issue. ***

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=10276

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P4

--