<div dir="ltr">Hello everyone, I would like to implement functionality something like the following in my sample language.....<div><br></div><div>class A {</div><div> Object attrA1</div><div>}</div><div><br></div><div>class B {</div>
<div> int attrB1</div><div> bool method methTestB ( .... )</div><div>}</div><div><br></div><div>main () {</div><div> bool test</div><div> Object a</div><div> a = new Class A()</div><div> a.attr1 = new Class B()</div>
<div><br></div><div> a.attrB1 = 5</div><div> test = a.methTestB(...)<br></div><div>}</div><div><br></div><div>I assume that I will need:</div><div><br></div><div>- some type of runtime lookup table to store the class structure of Class A and B. </div>
<div><div>- some way of encoding and storing an object's attribute type information </div><div>- 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.</div>
<div><br></div><div>I have looked at the LLVM API but didn't see any straightforward way to do this.</div><div><br></div><div>Thanks in advance for any comments.</div><div>Frank. <br></div><div><br></div></div></div>