DMD as a library package can now run through all semantic phases

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Jan 30 15:56:12 UTC 2018


On Tue, Jan 30, 2018 at 04:31:43AM +0000, rikki cattermole via Digitalmars-d wrote:
[...]
> D isn't a scripting language, it is native. It will always matter what
> OS/platform you are compiling to.

One could always hook the front end to a codegen that emits bytecode
instead of native assembly.  Who knows, perhaps there's already an LLVM
codegen that does this, so all you have to do is to specify the right
arch to ldc.

The argument about asm{} is moot anyway because it's x86-specific.
IIRC, gdc doesn't even support dmd's asm{} syntax; it uses its own
gcc-specific asm syntax. In theory, even asm blocks can be translated
into, say, LLVM IR, and then retargeted to whatever arch you one,
including a VM.


T

-- 
To provoke is to call someone stupid; to argue is to call each other stupid.


More information about the Digitalmars-d mailing list