May 20, 2016 Re: pl0stuff an optimizing pl0 > c transcompiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | On Friday, 20 May 2016 at 18:04:55 UTC, Stefan Koch wrote:
> Therefore you can transcompile code at compileTime at call PL/0 functions as there were naively implemented in D.
>
If you do want to call functions from D.
You cannot use the optimizer.
As it does _very_ aggressive inlineing and will fold all used functions into main.
|
May 20, 2016 [OT] Re: pl0stuff an optimizing pl0 > c transcompiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | On Friday, 20 May 2016 at 18:04:55 UTC, Stefan Koch wrote:
>
> Update I have implemented D codegen.
> The CodeGenerator as well as the optimizer work at CTFE.
> Therefore you can transcompile code at compileTime at call PL/0 functions as there were naively implemented in D.
This is pretty cool :D
Now I understand why you want to improve CTFE. You actually want better C++ interop. And to do that, you are going to CTFE compile the C++ code to D code, which is then mixed in, and all is good. Excellent idea! ;-)
cheers,
Johan
|
May 21, 2016 Re: [OT] Re: pl0stuff an optimizing pl0 > c transcompiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johan Engelen | On Friday, 20 May 2016 at 19:20:34 UTC, Johan Engelen wrote:
> On Friday, 20 May 2016 at 18:04:55 UTC, Stefan Koch wrote:
>>
>> Update I have implemented D codegen.
>> The CodeGenerator as well as the optimizer work at CTFE.
>> Therefore you can transcompile code at compileTime at call PL/0 functions as there were naively implemented in D.
>
> This is pretty cool :D
>
> Now I understand why you want to improve CTFE. You actually want better C++ interop. And to do that, you are going to CTFE compile the C++ code to D code, which is then mixed in, and all is good. Excellent idea! ;-)
>
> cheers,
> Johan
Actually I think compiling c++ is a bit out of my league at the moment.
It would only work for self-contained subset of c++. Not for the whole c++ language.
Especially preprocessor tricks make this approach unfeasible.
|
Copyright © 1999-2021 by the D Language Foundation