gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GSIMap


From: David Chisnall
Subject: GSIMap
Date: Wed, 1 Jun 2011 19:30:02 +0100

Hi,

I'm trying to make NSHashTable / NSMapTable use the correct read / write 
barrier functions in GC mode, but I don't really understand the GSIMap code.  
Does it define macros for reading / writing pointers anywhere?  In GC mode, we 
need to call the relevant read and write barrier functions for assigning 
pointer values, depending in the pointer functions:

For storing strong pointers, we should call objc_assign_strongCast(value, 
address), and read directly.

For storing weak pointers, we should call objc_assign_weak(value, address) and 
read using objc_read_weak(address).

This is the main thing required still for full Apple-compatible GC support.  

There also seem to be a few places (I've not identified them yet) where GNUstep 
code is storing strong pointers in globals that are not marked as strong.  The 
compiler will only generate a write barrier if the pointer is either id, or has 
the __strong qualifier.  Without these, we need to mark the entire data segment 
as potentially containing pointers, which adds some overhead (I'm currently 
doing this, but I'd like to turn it off).

David

-- Sent from my brain


reply via email to

[Prev in Thread] Current Thread [Next in Thread]