Thread overview
newCTFE Status October 2021
Oct 17, 2021
Stefan Koch
Oct 17, 2021
Dylan Graham
Oct 21, 2021
H. S. Teoh
Oct 21, 2021
Stefan Koch
Oct 21, 2021
bauss
October 17, 2021

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

int  x = 22;
int* y = &x;

would become:

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:

int  x = 22;
int* y = framePointer + OffsetFromFramePointer(x);

And no nasty syncing of different memory locations is required anymore ;)

Cheers,

Stefan

October 17, 2021

On Sunday, 17 October 2021 at 11:44:24 UTC, Stefan Koch wrote:

>

Hi Guys,

Keep up the good work :)

October 20, 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.
October 21, 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:
>> 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

I think once it's ready it would be merged.
It is fairly well tested.
But maybe I am naive :)

October 21, 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:
>> 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

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.