digitalmars.D - [SAoC 2023] Replace DRuntime Hooks with Templates Weekly Update #1
- Teodor Dutu (26/26) Sep 25 2023 Hi,
- M.M. (3/8) Sep 25 2023 Good luck! It's good to see a concentrated effort to bring a
- Teodor Dutu (2/4) Sep 26 2023 Thanks!
- sighoya (3/4) Sep 27 2023 Thanks for improving DMD.
Hi, I started this week debugging [my older PR for converting `_d_newarray{U,iT,T}` to two templates](https://github.com/dlang/dmd/pull/15299): - `_d_newarrayT` is the template to which the compiler lowers `new A[n]`. It decides how to initialise the elements of the array based on their type at compile time. - `_d_newarrayU` is the generic implementation called by `_d_newarrayT`. It is necessary to keep this hook separate because other functions such as `dup()` call `_d_newarrayU`. They do so because there's no need to initialise the copied array since its elements will be copied from the older array. I couldn't remove the old hooks from `rt/lifetime.d` because they're still used by `_d_newarraym{i,}TX`. I'll be able to remove the old `_d_newarray*` hooks when I convert `_d_newarraym` to templates, hopefully in the following weeks. I tried updating `dup()` to also use the template `_d_newarrayU`, but this resulted in some errors that became difficult to manage given the other changes required for this PR. I intend to take care of `dup()` after the `_d_newarray{U,iT,T}` hooks are converted to templates. Up to now, the latter are passing all tests (except for the FreeBSD ones that seem to be broken globally) and I'm looking forward to continuing with `_d_newarraym*` and `dup()`. Thanks, Teodor
Sep 25 2023
On Monday, 25 September 2023 at 10:47:18 UTC, Teodor Dutu wrote:Hi, I started this week debugging [my older PR for converting `_d_newarray{U,iT,T}` to two templates](https://github.com/dlang/dmd/pull/15299): [...]Good luck! It's good to see a concentrated effort to bring a longer-term project over the line...
Sep 25 2023
On Monday, 25 September 2023 at 14:28:53 UTC, M.M. wrote:Good luck! It's good to see a concentrated effort to bring a longer-term project over the line...Thanks!
Sep 26 2023
On Monday, 25 September 2023 at 10:47:18 UTC, Teodor Dutu wrote:[...]Thanks for improving DMD. Wishing you great success.
Sep 27 2023