How about a 100% CTFE?

Don nospam at nospam.com
Tue Nov 8 00:08:49 PST 2011


On 07.11.2011 21:36, Martin Nowak wrote:
> On Mon, 07 Nov 2011 20:42:17 +0100, Trass3r <un at known.com> wrote:
>
>>>>> version(ARM)
>>>>> {
>>>>> immutable X = armSpecificCode(); // you want to run this on an X86???
>>>>> }
>>>>>
>>>> I've always thought that it would be worthwhile to experiment with
>>>> LLVM's JIT engine here.
>>>> But as has been said quite some care will be necessary for cross
>>>> compilation.
>>>> Allowing arbitrary non-pure functions would cause lots troubles.
>>>
>>> Yeah, I think JIT for CTFE would be *very* interesting. But mainly
>>> for reasons of speed rather than functionality.
>>
>> How would JIT work in the above case?
>
> You would need to do JIT a target agnostic IR.

Yeah, it's only the glue layer which needs to change. The main 
complexity is dealing with pointers.


More information about the Digitalmars-d mailing list