Why does this mixin fail to compile?

Stefan Koch uplink.coder at googlemail.com
Fri Aug 16 05:10:07 UTC 2024


On Tuesday, 13 August 2024 at 19:40:30 UTC, IchorDev wrote:
> On Monday, 12 August 2024 at 15:23:31 UTC, Stefan Koch wrote:
>> It's about 12.000 lines of code.
>> I am not sure how much has rotted away, I last touched it in 
>> 2021.
>>
>> The relevant files would be:
>> the bytecode interpreter:
>> https://github.com/UplinkCoder/dmd/blob/newCTFE_2093/src/dmd/ctfe/bc.d
>> the visitor that builds the bytodecode:
>> https://github.com/UplinkCoder/dmd/blob/newCTFE_2093/src/dmd/ctfe/ctfe_bc.d
>>
>> as you can see by the branch name it was rebased on dmd 2.093.
>> so that's a few versions old now.
>
> My word! I wonder how difficult it would be to maintain that if 
> it actually got merged into dmd. Do you remember what parts of 
> it were left unfinished?

I do not know on the top of my head.
I remember some math was not interpreted correctly.
Though after I stopped working with D I never went back to look.

>> As far as I know Max Haughton has tried to rebase it on master 
>> and improve it but I have not heard from him about that.
>
> I won’t get my hopes up for one person to rebase 12k lines 
> through 14.5K commits. It’s simply not feasible. I think a 
> larger community effort would be required to successfully 
> resurrect this implementation; although I am perhaps foolhardy 
> enough to try it myself…

The code is rather self contained.
I usually don't rebase but I simply copy the files from the ctfe 
directory into the master checkout do what I can to make it 
compile and then commit them as new files.
The history has been lost a long time ago already.

The only change to existing files should be in dinterpret.d where 
I hook myself into the existing evaluator.



More information about the Digitalmars-d-learn mailing list