"Don" <[email protected]> wrote: > In order for CTFE code to call pre-compiled code, three things are > required: > (1) the compiler needs to be able to find the file (.obj/.lib/shared > library) containing the compiled code; > (2) the compiler needs to be able to load the module and call it. This > requires some form of dynamic linking. > (3) We need a marshalling step, to convert from compiler literal to > compiled data, and back. > > > Step (3) is straightforward. The challenge is step(2), although note that > it's a general "allow the compiler to load a plugin" problem, and doesn't > have much to do with CTFE.
Understand. So, it should be dynamic loaded, compiler should know which D library to load for used function and this function's name mangling, also then phobos should be dynamic library to call it's functions in macro. This is non trivial stuff, and compiler itselt is written in C++ so this plugin architecture should be working in C++ too. Also when cross-compile it's neeaded compiler for both X and Y architectures or two compilers, communicating among them. So that compiler for Y when finds macro should call compiler X and dynamically load to itself produced function. OK, IMO it's too complex and experimental to be of any priority in nearest future.
