On Feb 15, 2013, at 4:34 PM, Adrian Prantl <[email protected]> wrote:
> > On Feb 15, 2013, at 4:16 PM, jahanian <[email protected]> wrote: > >> Few comments all related to all_declared_ivar_begin only. >> >> There is only one implementation per class. Please do not mention "all >> implementations" in code comment. > > Fixed, patch attached! >> Do not change the indentations. It has added to the diff making it harder to >> review. > > I don't think I changed the indentation on its own, but I did move that block > inside the > if (!data().IvarList) > compound statement. > >> Make sure this patch does not add same ivar to the list more than once if it >> is called for >> debug info. multiple times. Does you patch prevent that? (Note that we have >> ivars in primary class, >> in multiple class extensions and one class implementation). No matter how >> this routine is called per >> each top-level declaration, no duplicate ivar should be added to the list. > > The first big block is only executed if data().IvarList is 0. If there is no > implementation, the data().ivarListMissingImplementation flag is set. If > there is an implementation, the ivars from that implementation will be added > to the list and the flag is cleared. After that the cached ivarlist will > always be returned. At least that's what I intended to write! > Thanks for the explanation Adrian. Have you thought about the scenario that Debug info. is generated for primary class and then this routine is called for ivars in class extensions. There is no guarantee that debug info. for primary and all class extensions are generated all the the same time. This is the test case I am thinking: @interface I { … } @end void foo (*I pi) { // poking into pi for primary class ivars. } @interface I() { … } @end void gorf (I* pg) { // poking into pg for ivars for class extension } - fariborz - Fariborz > thanks, > Adrian > > <private-ivars.patch> _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
