LDC 1.6.0

Ivan Butygin ivan.butygin at gmail.com
Mon Dec 4 17:51:09 UTC 2017


On Monday, 4 December 2017 at 12:47:35 UTC, data pulverizer wrote:

> where `newFunction()` is constructed at dynamic compile-time 
> (during runtime) and its return type as well as the return type 
> of `myDynamicFunction()` is only known once the dynamic 
> compilation is done? So could I call `myDynamicFunction()` and 
> potentially return different types each time it is called?

This is not possible with current design. All high level language 
processing is still done during compile time and only low-level 
llvm ir is saved to be optimized and codegened later. Jit runtime 
knows nothing about language, it only have llvm optimizer and 
backend.

Implementing high level D code processing during runtime will 
require pulling D frontend which isn't very well suited to be 
used as library.


More information about the Digitalmars-d-announce mailing list