On Sun, Jul 10, 2011 at 11:59 AM, Renato Golin <span dir="ltr"><<a href="mailto:rengolin@systemcall.org">rengolin@systemcall.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On 10 July 2011 19:47, Talin <<a href="mailto:viridia@gmail.com">viridia@gmail.com</a>> wrote:<br>
> However, I would imagine other uses for this facility. What this effectively<br>
> is "metadata for types", although unlike metadata nodes this data would be<br>
> immutable.<br>
<br>
</div>Hi Talin,<br>
<br>
The new type system allows you to name types and, if I got it rght,<br>
that's unique and immutable.<br>
<br>
You could use that fact, plus some metadata, to group your values and<br>
use one annotation per group.<br>
<br>
Should be easy to iterate through all values in a given function<br>
testing for a given (unique) type.<br></blockquote><div><br></div><div>So essentially use a dummy named type as a container to hold other types that share a common annotation? That's an interesting idea. And then I presume that on loading the module you'd use that to build a map of unique type pointer to annotation pointer.</div>

<div><br></div><div>So basically you'd have a pair of utility classes in LLVM that would read and write this data structure into a module. Then on top of that you'd build the GC primitives that annotate a given type and retrieve the annotation.</div>

<div><br></div><div>Hmmmm...</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
cheers,<br>
<font color="#888888">--renato<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>-- Talin<br>