digitalmars.D - newCTFE Status October 2021
- Stefan Koch (38/38) Oct 17 2021 Hi Guys,
- Dylan Graham (2/3) Oct 17 2021 Keep up the good work :)
- H. S. Teoh (6/11) Oct 20 2021 Will newCTFE ever be merged? I've been looking forward to it for ...
- Stefan Koch (4/15) Oct 20 2021 I think once it's ready it would be merged.
- bauss (6/17) Oct 21 2021 Relatable, but that's often the case with most things in D. It
Hi Guys, I know I have been quiet about newCTFE for a while, mainly I have been focusing on other features which would make it more important, since a lot of the compile-time of certain companies is not spent in CTFE. However recently I had the urge to fix an early design mistake in newCTFE. And that was that newCTFE had no notion of a frame pointer. Which made it impossible to easily take pointers of locals. What newCTFE would do when it was asked to take the address of a local variable was to allocate space space on the heap. Copy the local to the heap. and then convert the local variable into a pointer to that heap location under the hood. so ```D int x = 22; int* y = &x; ``` would become: ```D int x = 22; void* _mem_y = malloc(x.sizeof); memcpy(mem_y, &x, z.sizeof); int* y = cast(int*)mem_y, &x = y; // this line represents nasty compiler magic ``` Now however I have the concept of a frame pointer, and things becomes much cleaner The code above becomes: ```D int x = 22; int* y = framePointer + OffsetFromFramePointer(x); ``` And no nasty syncing of different memory locations is required anymore ;) Cheers, Stefan
Oct 17 2021
On Sunday, 17 October 2021 at 11:44:24 UTC, Stefan Koch wrote:Hi Guys,Keep up the good work :)
Oct 17 2021
On Sun, Oct 17, 2021 at 11:44:24AM +0000, Stefan Koch via Digitalmars-d wrote:Hi Guys, I know I have been quiet about newCTFE for a while, mainly I have been focusing on other features which would make it more important, since a lot of the compile-time of certain companies is not spent in CTFE.Will newCTFE ever be merged? I've been looking forward to it for ... years. T -- Today's society is one of specialization: as you grow, you learn more and more about less and less. Eventually, you know everything about nothing.
Oct 20 2021
On Thursday, 21 October 2021 at 02:11:44 UTC, H. S. Teoh wrote:On Sun, Oct 17, 2021 at 11:44:24AM +0000, Stefan Koch via Digitalmars-d wrote:I think once it's ready it would be merged. It is fairly well tested. But maybe I am naive :)Hi Guys, I know I have been quiet about newCTFE for a while, mainly I have been focusing on other features which would make it more important, since a lot of the compile-time of certain companies is not spent in CTFE.Will newCTFE ever be merged? I've been looking forward to it for ... years. T
Oct 20 2021
On Thursday, 21 October 2021 at 02:11:44 UTC, H. S. Teoh wrote:On Sun, Oct 17, 2021 at 11:44:24AM +0000, Stefan Koch via Digitalmars-d wrote:Relatable, but that's often the case with most things in D. It takes years before you can use them and by that time most things have moved on, in which case the next new big thing has been started. D has ADHD.Hi Guys, I know I have been quiet about newCTFE for a while, mainly I have been focusing on other features which would make it more important, since a lot of the compile-time of certain companies is not spent in CTFE.Will newCTFE ever be merged? I've been looking forward to it for ... years. T
Oct 21 2021