[LLVMdev] Unique shape and types

Nicolas Geoffray nicolas.geoffray at lip6.fr
Wed Jun 20 14:29:21 PDT 2007


Chris Lattner wrote:
>
>> The issue I'm facing is object inheritance and how to find from a LLVM
>> type what types it inherits. Currently this can't be implemented in LLVM
>> and I need to implement a higher representation for types.
>>     
>
> Yep.  Sorry :(.  

"Sorry", like "this can really not be integrated in LLVM" or like "it is 
possible but it requires a lot of work to integrate it"? :)

> Depending on your application, you could read debug info, 
>   

Actually I am not using llvm-gcc. I'm just targeting a new language and 
it would have been a lot easier implementing the compiler with LLVM if 
it had this kind of feature (string <-> type). But if it's not feasible, 
well I'll just stick with my higher type representation.

This leads to another question of type inference for dynamic languages 
(I refer to your slides from the LLVM meeting day). I do not see how you 
can integrate type inference on objects in LLVM without knowning 
inheritance between types. Maybe you only target type inference to 
dissociate floating point values from integer or object values?


Nicolas



More information about the llvm-dev mailing list