December 31, 2020 Should the compiler be able to do a double look up? | ||||
---|---|---|---|---|
| ||||
Context: https://github.com/dlang/dmd/pull/9702 Would a double look up be able to fix this bug properly? -Alex |
January 01, 2021 Re: Should the compiler be able to do a double look up? | ||||
---|---|---|---|---|
| ||||
Posted in reply to 12345swordy | On Thursday, 31 December 2020 at 18:52:18 UTC, 12345swordy wrote:
> Context: https://github.com/dlang/dmd/pull/9702
>
> Would a double look up be able to fix this bug properly?
>
> -Alex
Lots of things would be able to fix it. The most obvious way would be to have each template alias parameter carry its own (optional) context pointer with it--then there'd be no need for different contexts to fight over who owns the "this" pointer.
Unfortunately the implementation of closures and context pointers in DMD is not very high-quality to begin with (see the many, many delegate-related issues in bugzilla), so any actual attempt to solve issue 5710 has to either address or work around the existing technical debt in that part of the frontend.
|
Copyright © 1999-2021 by the D Language Foundation