On 2009-10-23 03:52:10 -0400, Yigal Chripun <yigal...@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.for...@michelf.com
http://michelf.com/