bug-gnustep
[Top][All Lists]
Advanced

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

Re: Re[2]: [RFC/PATCH] EOEntity


From: Richard Frith-Macdonald
Subject: Re: Re[2]: [RFC/PATCH] EOEntity
Date: Thu, 28 Nov 2002 15:15:53 +0000

On Thursday, November 28, 2002, at 02:57  pm, Manuel Guesdon wrote:

Hi,

On Thu, 28 Nov 2002 12:20:50 +0100 David Ayers <address@hidden> wrote:
| I'm wondering if anyone is considering this patch? (Which is admittedly
| a hack :-) but I wanted to get my tests working.)


I'll try to check it tommorow or this week-end.

I just did it ... It looked correct/harmless, so I added it ... but if it's not too much bother it would be nice for you to check it too. You are all much more familiar with this than I am, so my checking is really only good for localised issues rather than overall architectural ones.

| Or rather if someone
| is working on restructuring the caching/laziness-mechanisms in EOEntity? | If not, I'll try to revamp it a bit as there are similar problems with
| other ivars that should be adressed.

Which kind of problem ?

Speaking of other problems ... it's not really a big problem necessarily, but I think it would be nice to re-implement the Fault/FaultHandler code somewhat...

At the moment objects get morphed into faults by -
1. changing the isa pointer
2. overwriting the next four bytes of ivar data with a pointer to the fault handler. The second part is a theoretical problem if a class being made into a fault doesn't actually have any ivars beyond the isa pointer ... this may not be possible in practice, but I don't like it.

Because of this messing with the initial ivars, where an object being faulted is a garbage collecting object, the linked list of pointers in the garbage collection is screwed up - which means that the faulting mechanism also has to be intimately aware of the GC mechanism (and hack it to continue working), and also that the GC mechanism has to work entirely through methods rather than accessing the linked list pointer ivars directly. This adds complexity to the faulting mechanism and makes GC passes quite inefficient.

If we used a global map table to map fault objects to their handlers, we could make an object into a fault simply by changing its isa pointer and adding it to the mapping. This would mean that the faulting code could be simplified a bit, and also that the GC could run faster because we would not have interfered with the linked list pointers.

Or am I missing something that means doing that would be a bad idea?






reply via email to

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