[LLVMdev] Dynamic Type Lookup ...
Frank White
frankwhite1003 at gmail.com
Wed Apr 24 15:13:51 PDT 2013
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130424/7cef2a50/attachment.html>
More information about the llvm-dev
mailing list