<div class="gmail_quote">On 10 April 2012 00:06, deadalnix <span dir="ltr"><<a href="mailto:deadalnix@gmail.com">deadalnix@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Le 09/04/2012 20:33, Manu a écrit :<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Eh?<br>
Not sure what you mean. The idea is the template would produce a<br>
struct/table of data instead of being a pointer to a function, this way<br>
the GC could work without calling anything. If the GC was written to<br>
assume GC info in a particular format/structure, it could be written<br>
without any calls.<br>
I'm just saying to leave that as a possibility, and not REQUIRE an<br>
indirect function call for every single allocation in the system. Some<br>
GC might be able to make better use of that sort of setup.<br>
</blockquote>
<br></div>
If you have reference to objects, you can't avoid a function call. If you have something you know at compile time, the generated function can directly call the other function that mark the pointed data (or even can do it itself, if you don't fear code bloat) without going back to the GC and its indirect call.<br>

<br>
So it make no difference in the number of indirect calls you have, but the struct proposal is a stronger constraint on the GC that the function one.<br>
<br>
BTW, starting you answer by « Not sure what you mean. » should have been a red flag.<br></blockquote><div><br></div><div>It is, and I still don't follow. I can't imagine there are any indirect function calls, except for the ones introduced by this proposal, where you may register a function to mark the pointers in complex structs.</div>
<div>You seem to be suggesting that another one already exists anyway? Where is it? Why is it there?</div></div>