No header files?
Michel Fortin
michel.fortin at michelf.com
Fri Oct 23 05:44:23 PDT 2009
On 2009-10-23 03:52:10 -0400, Yigal Chripun <yigal100 at gmail.com> said:
> I was suggesting to convert *both* obj files and lib files to llvm
> bit-code. such library files will still contain the metadata.
>
> what I ultimately want is to have something similar in concept to .net
> asseblies/java Jars but with native code (no VM involved). LLVM
> provides the infrastructure to do exactly this: the compiler generates
> platform neutral D-assemblies (in llvm bitcode) that can be used on any
> architecture/OS/llvm-compiler. This would also allow us to use
> libraries written in other languages when there's an appropriate llvm
> compiler for them (Ruby, scheme, python, etc).
The LLVM bitcode is too much low-level for that. It won't carry enough
information about types for correct type checking in D, and it cannot
express templates. True, you can express arbitrary metadata in bitcode,
but that'd be a whole new format to create and support...
Perhaps the solution is to embed the "header file" (I mean the '.di'
file) into the generated object file itself, and make DMD check
existing object files for an embedded interface. That could work
independently of the object file format too.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list