638
edits
(note meeting) |
|||
| Line 16: | Line 16: | ||
We won't bend over backwards to make the API support [[mdc:MMgc|MMgc]] in the fastest or most natural way. For example, the fastest possible MMgc write barrier requires the caller to know the beginning-of-allocation pointers for both the object containing the field being written and the pointer being stored there. This is a pain for the user, and a card-marking GC doesn't need those pointers anyway. So our API will *not* provide this information; the MMgc wrapper will have to calculate it each time the write barrier hits. This will make MMgc look slow, but we can live with that. | We won't bend over backwards to make the API support [[mdc:MMgc|MMgc]] in the fastest or most natural way. For example, the fastest possible MMgc write barrier requires the caller to know the beginning-of-allocation pointers for both the object containing the field being written and the pointer being stored there. This is a pain for the user, and a card-marking GC doesn't need those pointers anyway. So our API will *not* provide this information; the MMgc wrapper will have to calculate it each time the write barrier hits. This will make MMgc look slow, but we can live with that. | ||
The purpose of this API is to support switching to a different GC implementation ''at compile time'', not at run time. (Each implementation will have its own header file, with its own inline functions or function-like macros. Maybe we'll produce a GC API header file that has no inline anything, just showing the signatures the implementation must provide, for reference.) | |||
'''Open issue:''' API style. (C or C++? Use templates? What naming conventions? I think it's too early to ask these questions. So please consider all the function signatures below to be pseudocode.) | |||
'''Open issue:''' We should detect dumb implementation mismatches at link time and bomb out. I don't know the trick, but I bet bsmedberg does. | |||
=API areas= | =API areas= | ||
edits