[LLVMdev] Dynamic Type Lookup ...

Tyler Hardin tghardin1 at catamount.wcu.edu
Wed Apr 24 15:26:23 PDT 2013


Good question. I've been wondering about that myself.
On Apr 24, 2013 6:16 PM, "Frank White" <frankwhite1003 at gmail.com> wrote:

> Hello everyone, I would like to implement functionality something like the
> following in my sample language.....
>
> class A {
>   Object attrA1
> }
>
> class B {
>    int attrB1
>    bool method methTestB ( .... )
> }
>
> main ()  {
>   bool test
>   Object a
>   a = new Class A()
>   a.attr1 = new Class B()
>
>   a.attrB1 = 5
>   test = a.methTestB(...)
> }
>
> I assume that I will need:
>
> - some type of runtime lookup table to store the class structure of Class
> A and B.
> - some way of encoding and storing an object's attribute type information
> - a means of retrieving this information at runtime so that in the event
> that an object's attribute is itself an object, attributes from the latter
> can be accessed as well.
>
> I have looked at the LLVM API but didn't see any straightforward way to do
> this.
>
> Thanks in advance for any comments.
> Frank.
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130424/29d477d2/attachment.html>


More information about the llvm-dev mailing list