Le 16/04/2012 18:32, Walter Bright a écrit :
On 4/15/2012 7:29 PM, Walter Bright wrote:
I realized after I posted this that the patterns:

ptr .. int .. ptr .. int
ptr .. int .. ptr
ptr .. int .. ptr .. int .. int

are the same as far as marking goes, and so should all generate the same
function/data.

Another possibility is to just emit a bit mask:

0 no pointers
101 ptr .. int .. ptr
1011 ptr .. ptr .. int .. ptr
 >0xFFFF a pointer to a function that does the marking

This has the advantage of almost never needing to resort to the indirect
function call.

As long as it fit in a pointer, I see no reason why it can't be done.

Reply via email to