Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
On Fri, Jan 12, 2007 at 11:09:03PM +0100, Abdelrazak Younes wrote: Andre Poenitz wrote: Does this actually help? I would have expected that moving the method definition to the header would have been needed, too (possiby causing additional header pulled in) Year, that's what I ended up doing in a following commit. It was a genuine question. With 'global optimization' features creeping into recent compilers (icc, MSVC, maybe others) I could have imagined that it 'worked' (apart from breaking C++ definition/declaration rules, but MSVC is still pretty forgiving when it comes to violations). So I understand now that the path helps, but only if the definition is indeed put in the header. Right? Andre'
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Andre Poenitz wrote: On Fri, Jan 12, 2007 at 11:09:03PM +0100, Abdelrazak Younes wrote: Andre Poenitz wrote: Does this actually help? I would have expected that moving the method definition to the header would have been needed, too (possiby causing additional header pulled in) Year, that's what I ended up doing in a following commit. It was a genuine question. With 'global optimization' features creeping into recent compilers (icc, MSVC, maybe others) I could have imagined that it 'worked' (apart from breaking C++ definition/declaration rules, but MSVC is still pretty forgiving when it comes to violations). I think that some link time optimisation is possible (maybe not that). Or more funky stuff like llvm... So I understand now that the path helps, but only if the definition is indeed put in the header. Right? That's what I've come to understand also. Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
On Fri, Jan 12, 2007 at 11:09:03PM +0100, Abdelrazak Younes wrote: > Andre Poenitz wrote: > >Does this actually help? > > > >I would have expected that moving the method definition to the header > >would have been needed, too (possiby causing additional header pulled > >in) > > Year, that's what I ended up doing in a following commit. It was a genuine question. With 'global optimization' features creeping into recent compilers (icc, MSVC, maybe others) I could have imagined that it 'worked' (apart from breaking C++ definition/declaration rules, but MSVC is still pretty forgiving when it comes to violations). So I understand now that the path helps, but only if the definition is indeed put in the header. Right? Andre'
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Andre Poenitz wrote: On Fri, Jan 12, 2007 at 11:09:03PM +0100, Abdelrazak Younes wrote: Andre Poenitz wrote: Does this actually help? I would have expected that moving the method definition to the header would have been needed, too (possiby causing additional header pulled in) Year, that's what I ended up doing in a following commit. It was a genuine question. With 'global optimization' features creeping into recent compilers (icc, MSVC, maybe others) I could have imagined that it 'worked' (apart from breaking C++ definition/declaration rules, but MSVC is still pretty forgiving when it comes to violations). I think that some link time optimisation is possible (maybe not that). Or more funky stuff like llvm... So I understand now that the path helps, but only if the definition is indeed put in the header. Right? That's what I've come to understand also. Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
On Mon, Jan 08, 2007 at 10:50:17AM -, [EMAIL PROTECTED] wrote: Author: younes Date: Mon Jan 8 11:50:15 2007 New Revision: 16597 URL: http://www.lyx.org/trac/changeset/16597 Log: performance fix. Modified: lyx-devel/trunk/src/dociterator.h Modified: lyx-devel/trunk/src/dociterator.h URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/dociterator.h?rev=16597 == --- lyx-devel/trunk/src/dociterator.h (original) +++ lyx-devel/trunk/src/dociterator.h Mon Jan 8 11:50:15 2007 @@ -125,10 +125,14 @@ /// void boundary(bool b) { boundary_ = b; } - /// are we in mathed? - bool inMathed() const; - /// are we in texted? - bool inTexted() const; + /// are we in mathed?. + /// inlined out because of profiling results under linux when + /// opening a document. + inline bool inMathed() const; + /// are we in texted?. + /// inlined out because of profiling results under linux when + /// opening a document. + inline bool inTexted() const; Does this actually help? I would have expected that moving the method definition to the header would have been needed, too (possiby causing additional header pulled in) Andre'
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Abdelrazak Younes wrote: Hum, maybe gcc needs the 'virtual' keyword. Could you try it please: inline virtual bool inMathed() const; inline virtual bool inTexted() const; I think virtual methods cannot be inlined because the decision which method to call is done at runtime but for inlining the compiler already has to know that. bernhard
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Andre Poenitz wrote: Does this actually help? I would have expected that moving the method definition to the header would have been needed, too (possiby causing additional header pulled in) Year, that's what I ended up doing in a following commit. Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
On Mon, Jan 08, 2007 at 10:50:17AM -, [EMAIL PROTECTED] wrote: > Author: younes > Date: Mon Jan 8 11:50:15 2007 > New Revision: 16597 > > URL: http://www.lyx.org/trac/changeset/16597 > Log: > performance fix. > > Modified: > lyx-devel/trunk/src/dociterator.h > > Modified: lyx-devel/trunk/src/dociterator.h > URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/dociterator.h?rev=16597 > == > --- lyx-devel/trunk/src/dociterator.h (original) > +++ lyx-devel/trunk/src/dociterator.h Mon Jan 8 11:50:15 2007 > @@ -125,10 +125,14 @@ > /// > void boundary(bool b) { boundary_ = b; } > > - /// are we in mathed? > - bool inMathed() const; > - /// are we in texted? > - bool inTexted() const; > + /// are we in mathed?. > + /// inlined out because of profiling results under linux when > + /// opening a document. > + inline bool inMathed() const; > + /// are we in texted?. > + /// inlined out because of profiling results under linux when > + /// opening a document. > + inline bool inTexted() const; Does this actually help? I would have expected that moving the method definition to the header would have been needed, too (possiby causing additional header pulled in) Andre'
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Abdelrazak Younes wrote: Hum, maybe gcc needs the 'virtual' keyword. Could you try it please: inline virtual bool inMathed() const; inline virtual bool inTexted() const; I think virtual methods cannot be inlined because the decision which method to call is done at runtime but for inlining the compiler already has to know that. bernhard
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Andre Poenitz wrote: Does this actually help? I would have expected that moving the method definition to the header would have been needed, too (possiby causing additional header pulled in) Year, that's what I ended up doing in a following commit. Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
younes == younes [EMAIL PROTECTED] writes: younes + /// are we in texted?. younes + /// inlined out because of profiling results under linux when younes + // opening a document. younes + inline bool inTexted() const; Abdel, are you sure this is a proper syntax? My compiler complains with ../../lyx-devel/src/dociterator.h:135: warning: inline function `bool lyx::DocIterator::inTexted() const' used but never defined I did not try to link yet, but I think this does not inline anything. JMarc
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: younes == younes [EMAIL PROTECTED] writes: younes + /// are we in texted?. younes + /// inlined out because of profiling results under linux when younes + // opening a document. younes + inline bool inTexted() const; Abdel, are you sure this is a proper syntax? MSVC does not complain... Hum, maybe gcc needs the 'virtual' keyword. Could you try it please: inline virtual bool inMathed() const; inline virtual bool inTexted() const; Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: younes == younes [EMAIL PROTECTED] writes: younes + /// are we in texted?. younes + /// inlined out because of profiling results under linux when younes + // opening a document. younes + inline bool inTexted() const; Abdel, are you sure this is a proper syntax? My compiler complains with By the way, 'insetlatexaccent.h' uses the same syntax: inline bool canDisplay(); Don't you have a warning for this one? If not, maybe the constness plays a role and I think this a gcc bug. ../../lyx-devel/src/dociterator.h:135: warning: inline function `bool lyx::DocIterator::inTexted() const' used but never defined I did not try to link yet, but I think this does not inline anything. Please try to link in order to make sure. Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak Jean-Marc Lasgouttes wrote: younes == younes [EMAIL PROTECTED] writes: younes + /// are we in texted?. younes + /// inlined out because of profiling results under linux when younes + // opening a document. younes + inline bool inTexted() const; Abdel, are you sure this is a proper syntax? My compiler complains with Abdelrazak By the way, 'insetlatexaccent.h' uses the same syntax: Abdelrazak inline bool canDisplay(); Abdelrazak Don't you have a warning for this one? No, because this one is defined later in the header file. This is different from putting it in the .C file only. From a compiler POV, this should not matter really. I did not try to link yet, but I think this does not inline anything. Abdelrazak Please try to link in order to make sure. It does link, but I do not like the warnings. I even suspect that it may not be inlined, but I am not sure what a weak symbol is: Maybe. ehrenfest: nm src/lyx|grep inTexted|c++filt 082e847a W lyx::DocIterator::inTexted() const JMarc
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: It does link, but I do not like the warnings. I will put the code in the header. Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Abdelrazak Younes wrote: Jean-Marc Lasgouttes wrote: Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak By the way, 'insetlatexaccent.h' uses the same syntax: Abdelrazak inline bool canDisplay(); Abdelrazak Don't you have a warning for this one? No, because this one is defined later in the header file. This is different from putting it in the .C file only. From a compiler POV, this should not matter really. It matters a lot. During the compile, the compiler sees only what is in the .h file. It does not know at all in which .C file the code of only declared functions is, so it can't inline it. If that would at all be possible the compiler would need the help of the linker, because only at linking time the function body is known. Then the linker could tell the compiler where the functin is defined, and the compiler could recompile all code that uses the function with the inlined version. I guess it is obvious why this is not in the standard. It does link, but I do not like the warnings. I even suspect that it may not be inlined, but I am not sure what a weak symbol is: I knew that once, but forgot. I am 100% sure that this does not get inlined. MSVC probably does not warn about that because inline is only a hint to the compiler. The compiler is free to ignore that hint. Georg, whos holidays are over and who has therefore very little spare time again.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak Jean-Marc Lasgouttes wrote: Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak Jean-Marc Lasgouttes wrote: younes == younes [EMAIL PROTECTED] writes: younes + /// are we in texted?. younes + /// inlined out because of profiling results under linux when younes + // opening a document. younes + inline bool inTexted() const; Abdel, are you sure this is a proper syntax? My compiler complains with Abdelrazak By the way, 'insetlatexaccent.h' uses the same syntax: Abdelrazak inline bool canDisplay(); Abdelrazak Don't you have a warning for this one? No, because this one is defined later in the header file. This is different from putting it in the .C file only. Abdelrazak From a compiler POV, this should not matter really. Not when compiling dociterator.o, but it sound more complicated when compiling another file. JMarc
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Georg, whos holidays are over and who has therefore very little Georg spare time again. Did you manage to do something with insetlatexaccent? JMarc
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: Did you manage to do something with insetlatexaccent? Yes. It is basically finished, but lyx2lyx needs a bit of testing. I'll send it when it is finished. Georg
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Georg Baum wrote: Abdelrazak Younes wrote: From a compiler POV, this should not matter really. It matters a lot. During the compile, the compiler sees only what is in the .h file. It does not know at all in which .C file the code of only declared functions is, so it can't inline it. If that would at all be possible the compiler would need the help of the linker, because only at linking time the function body is known. Then the linker could tell the compiler where the functin is defined, and the compiler could recompile all code that uses the function with the inlined version. I guess it is obvious why this is not in the standard. It makes sense indeed, thanks. Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: Abdelrazak Please try to link in order to make sure. It does link, but I do not like the warnings. It does not here: BufferView.o: In function `lyx::BufferView::getStatus(lyx::FuncRequest const)': /home/juergen/lyx/lyx-qt/src/BufferView.C:611: undefined reference to `lyx::DocIterator::inTexted() const' BufferView.o: In function `lyx::BufferView::menuInsertLyXFile(std::basic_stringchar, std::char_traitschar, std::allocatorchar const)': /home/juergen/lyx/lyx-qt/src/BufferView.C:1451: undefined reference to `lyx::DocIterator::inTexted() const' BufferView.o: In function `lyx::BufferView::mouseSetCursor(lyx::LCursor)': /home/juergen/lyx/lyx-qt/src/BufferView.C:1279: undefined reference to `lyx::DocIterator::inTexted() const' CutAndPaste.o: In function `lyx::cap::copySelectionToStack(lyx::LCursor)': /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:574: undefined reference to `lyx::DocIterator::inTexted() const' /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:593: undefined reference to `lyx::DocIterator::inMathed() const' CutAndPaste.o: In function `lyx::cap::cutSelection(lyx::LCursor, bool, bool)': /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:493: undefined reference to `lyx::DocIterator::inTexted() const' /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:542: undefined reference to `lyx::DocIterator::inMathed() const' CutAndPaste.o: In function `lyx::cap::pasteParagraphList(lyx::LCursor, lyx::RandomAccessListlyx::Paragraph const, unsigned long, lyx::ErrorList)': /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:619: undefined reference to `lyx::DocIterator::inTexted() const' /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:635: undefined reference to `lyx::DocIterator::inMathed() const' buffer_funcs.o: In function `lyx::countWords(lyx::DocIterator const, lyx::DocIterator const)': /home/juergen/lyx/lyx-qt/src/buffer_funcs.C:264: undefined reference to `lyx::DocIterator::inTexted() const' cursor.o: In function `lyx::LCursor::getPossibleLabel()': /home/juergen/lyx/lyx-qt/src/cursor.C:1222: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o: In function `lyx::LCursor::pullArg()': /home/juergen/lyx/lyx-qt/src/cursor.C:976: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o: In function `lyx::LCursor::erase()': /home/juergen/lyx/lyx-qt/src/cursor.C:837: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o: In function `lyx::LCursor::insert(lyx::InsetBase*)': /home/juergen/lyx/lyx-qt/src/cursor.C:719: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o: In function `lyx::LCursor::insert(wchar_t)': /home/juergen/lyx/lyx-qt/src/cursor.C:699: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o:/home/juergen/lyx/lyx-qt/src/cursor.C:780: more undefined references to `lyx::DocIterator::inMathed() const' follow cursor.o: In function `lyx::LCursor::selectionAsString(bool) const': /home/juergen/lyx/lyx-qt/src/cursor.C:1169: undefined reference to `lyx::DocIterator::inTexted() const' /home/juergen/lyx/lyx-qt/src/cursor.C:1198: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o: In function `lyx::LCursor::currentState()': /home/juergen/lyx/lyx-qt/src/cursor.C:1207: undefined reference to `lyx::DocIterator::inMathed() const' /home/juergen/lyx/lyx-qt/src/cursor.C:1213: undefined reference to `lyx::DocIterator::inTexted() const' lyxfind.o: In function `lyx::(anonymous namespace)::findChange(lyx::DocIterator)': /home/juergen/lyx/lyx-qt/src/lyxfind.C:128: undefined reference to `lyx::DocIterator::inTexted() const' lyxfind.o: In function `lyx::(anonymous namespace)::findForward(lyx::DocIterator, lyx::(anonymous namespace)::MatchString const)': /home/juergen/lyx/lyx-qt/src/lyxfind.C:108: undefined reference to `lyx::DocIterator::inTexted() const' lyxfind.o: In function `lyx::(anonymous namespace)::findBackwards(lyx::DocIterator, lyx::(anonymous namespace)::MatchString const)': /home/juergen/lyx/lyx-qt/src/lyxfind.C:118: undefined reference to `lyx::DocIterator::inTexted() const' lyxfunc.o: In function `lyx::LyXFunc::dispatch(lyx::FuncRequest const)': /home/juergen/lyx/lyx-qt/src/lyxfunc.C:1734: undefined reference to `lyx::DocIterator::inTexted() const' text3.o:/home/juergen/lyx/lyx-qt/src/text3.C:1697: more undefined references to `lyx::DocIterator::inTexted() const' follow undo.o: In function `lyx::(anonymous namespace)::doRecordUndo(lyx::Undo::undo_kind, lyx::DocIterator const, long, long, lyx::DocIterator const, lyx::BufferParams const, bool, lyx::limited_stacklyx::Undo)': /home/juergen/lyx/lyx-qt/src/undo.C:97: undefined reference to `lyx::DocIterator::inMathed() const' undo.o: In function `lyx::(anonymous namespace)::textUndoOrRedo(lyx::BufferView, lyx::limited_stacklyx::Undo, lyx::limited_stacklyx::Undo)': /home/juergen/lyx/lyx-qt/src/undo.C:168: undefined reference to `lyx::DocIterator::inMathed() const' mathed/.libs/libmathed.a(InsetMathHull.o): In function
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
> "younes" == younes <[EMAIL PROTECTED]> writes: younes> + /// are we in texted?. younes> + /// inlined out because of profiling results under linux when younes> + // opening a document. younes> + inline bool inTexted() const; Abdel, are you sure this is a proper syntax? My compiler complains with ../../lyx-devel/src/dociterator.h:135: warning: inline function `bool lyx::DocIterator::inTexted() const' used but never defined I did not try to link yet, but I think this does not inline anything. JMarc
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: "younes" == younes <[EMAIL PROTECTED]> writes: younes> + /// are we in texted?. younes> + /// inlined out because of profiling results under linux when younes> + // opening a document. younes> + inline bool inTexted() const; Abdel, are you sure this is a proper syntax? MSVC does not complain... Hum, maybe gcc needs the 'virtual' keyword. Could you try it please: inline virtual bool inMathed() const; inline virtual bool inTexted() const; Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: "younes" == younes <[EMAIL PROTECTED]> writes: younes> + /// are we in texted?. younes> + /// inlined out because of profiling results under linux when younes> + // opening a document. younes> + inline bool inTexted() const; Abdel, are you sure this is a proper syntax? My compiler complains with By the way, 'insetlatexaccent.h' uses the same syntax: inline bool canDisplay(); Don't you have a warning for this one? If not, maybe the constness plays a role and I think this a gcc bug. ../../lyx-devel/src/dociterator.h:135: warning: inline function `bool lyx::DocIterator::inTexted() const' used but never defined I did not try to link yet, but I think this does not inline anything. Please try to link in order to make sure. Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Jean-Marc Lasgouttes wrote: "younes" == younes <[EMAIL PROTECTED]> writes: younes> + /// are we in texted?. younes> + /// inlined out because of profiling results under linux when younes> + // opening a document. younes> + inline bool inTexted() const; Abdel, are you sure this is a proper syntax? My compiler complains with Abdelrazak> By the way, 'insetlatexaccent.h' uses the same syntax: Abdelrazak> inline bool canDisplay(); Abdelrazak> Don't you have a warning for this one? No, because this one is defined later in the header file. This is different from putting it in the .C file only. From a compiler POV, this should not matter really. I did not try to link yet, but I think this does not inline anything. Abdelrazak> Please try to link in order to make sure. It does link, but I do not like the warnings. I even suspect that it may not be inlined, but I am not sure what a weak symbol is: Maybe. ehrenfest: nm src/lyx|grep inTexted|c++filt 082e847a W lyx::DocIterator::inTexted() const JMarc
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: It does link, but I do not like the warnings. I will put the code in the header. Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Abdelrazak Younes wrote: > Jean-Marc Lasgouttes wrote: >>> "Abdelrazak" == Abdelrazak Younes >>> <[EMAIL PROTECTED]> writes: >> Abdelrazak> By the way, 'insetlatexaccent.h' uses the same syntax: >> >> Abdelrazak> inline bool canDisplay(); >> >> Abdelrazak> Don't you have a warning for this one? >> >> No, because this one is defined later in the header file. This is >> different from putting it in the .C file only. > > From a compiler POV, this should not matter really. It matters a lot. During the compile, the compiler sees only what is in the .h file. It does not know at all in which .C file the code of only declared functions is, so it can't inline it. If that would at all be possible the compiler would need the help of the linker, because only at linking time the function body is known. Then the linker could tell the compiler where the functin is defined, and the compiler could recompile all code that uses the function with the inlined version. I guess it is obvious why this is not in the standard. >> It does link, but I do not like the warnings. I even suspect that it >> may not be inlined, but I am not sure what a weak symbol is: I knew that once, but forgot. I am 100% sure that this does not get inlined. MSVC probably does not warn about that because "inline" is only a hint to the compiler. The compiler is free to ignore that hint. Georg, whos holidays are over and who has therefore very little spare time again.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: Abdelrazak> Jean-Marc Lasgouttes wrote: >>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> Abdelrazak> Jean-Marc Lasgouttes wrote: > "younes" == younes <[EMAIL PROTECTED]> writes: younes> + /// are we in texted?. younes> + /// inlined out because of profiling results under linux when younes> + // opening a document. younes> + inline bool inTexted() const; Abdel, are you sure this is a proper syntax? My compiler complains with >> Abdelrazak> By the way, 'insetlatexaccent.h' uses the same syntax: >> Abdelrazak> inline bool canDisplay(); >> Abdelrazak> Don't you have a warning for this one? >> No, because this one is defined later in the header file. This is >> different from putting it in the .C file only. Abdelrazak> From a compiler POV, this should not matter really. Not when compiling dociterator.o, but it sound more complicated when compiling another file. JMarc
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Georg, whos holidays are over and who has therefore very little Georg> spare time again. Did you manage to do something with insetlatexaccent? JMarc
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: > Did you manage to do something with insetlatexaccent? Yes. It is basically finished, but lyx2lyx needs a bit of testing. I'll send it when it is finished. Georg
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Georg Baum wrote: Abdelrazak Younes wrote: From a compiler POV, this should not matter really. It matters a lot. During the compile, the compiler sees only what is in the .h file. It does not know at all in which .C file the code of only declared functions is, so it can't inline it. If that would at all be possible the compiler would need the help of the linker, because only at linking time the function body is known. Then the linker could tell the compiler where the functin is defined, and the compiler could recompile all code that uses the function with the inlined version. I guess it is obvious why this is not in the standard. It makes sense indeed, thanks. Abdel.
Re: [Cvslog] r16597 - /lyx-devel/trunk/src/dociterator.h
Jean-Marc Lasgouttes wrote: > Abdelrazak> Please try to link in order to make sure. > > It does link, but I do not like the warnings. It does not here: BufferView.o: In function `lyx::BufferView::getStatus(lyx::FuncRequest const&)': /home/juergen/lyx/lyx-qt/src/BufferView.C:611: undefined reference to `lyx::DocIterator::inTexted() const' BufferView.o: In function `lyx::BufferView::menuInsertLyXFile(std::basic_stringconst&)': /home/juergen/lyx/lyx-qt/src/BufferView.C:1451: undefined reference to `lyx::DocIterator::inTexted() const' BufferView.o: In function `lyx::BufferView::mouseSetCursor(lyx::LCursor&)': /home/juergen/lyx/lyx-qt/src/BufferView.C:1279: undefined reference to `lyx::DocIterator::inTexted() const' CutAndPaste.o: In function `lyx::cap::copySelectionToStack(lyx::LCursor&)': /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:574: undefined reference to `lyx::DocIterator::inTexted() const' /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:593: undefined reference to `lyx::DocIterator::inMathed() const' CutAndPaste.o: In function `lyx::cap::cutSelection(lyx::LCursor&, bool, bool)': /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:493: undefined reference to `lyx::DocIterator::inTexted() const' /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:542: undefined reference to `lyx::DocIterator::inMathed() const' CutAndPaste.o: In function `lyx::cap::pasteParagraphList(lyx::LCursor&, lyx::RandomAccessList const&, unsigned long, lyx::ErrorList&)': /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:619: undefined reference to `lyx::DocIterator::inTexted() const' /home/juergen/lyx/lyx-qt/src/CutAndPaste.C:635: undefined reference to `lyx::DocIterator::inMathed() const' buffer_funcs.o: In function `lyx::countWords(lyx::DocIterator const&, lyx::DocIterator const&)': /home/juergen/lyx/lyx-qt/src/buffer_funcs.C:264: undefined reference to `lyx::DocIterator::inTexted() const' cursor.o: In function `lyx::LCursor::getPossibleLabel()': /home/juergen/lyx/lyx-qt/src/cursor.C:1222: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o: In function `lyx::LCursor::pullArg()': /home/juergen/lyx/lyx-qt/src/cursor.C:976: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o: In function `lyx::LCursor::erase()': /home/juergen/lyx/lyx-qt/src/cursor.C:837: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o: In function `lyx::LCursor::insert(lyx::InsetBase*)': /home/juergen/lyx/lyx-qt/src/cursor.C:719: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o: In function `lyx::LCursor::insert(wchar_t)': /home/juergen/lyx/lyx-qt/src/cursor.C:699: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o:/home/juergen/lyx/lyx-qt/src/cursor.C:780: more undefined references to `lyx::DocIterator::inMathed() const' follow cursor.o: In function `lyx::LCursor::selectionAsString(bool) const': /home/juergen/lyx/lyx-qt/src/cursor.C:1169: undefined reference to `lyx::DocIterator::inTexted() const' /home/juergen/lyx/lyx-qt/src/cursor.C:1198: undefined reference to `lyx::DocIterator::inMathed() const' cursor.o: In function `lyx::LCursor::currentState()': /home/juergen/lyx/lyx-qt/src/cursor.C:1207: undefined reference to `lyx::DocIterator::inMathed() const' /home/juergen/lyx/lyx-qt/src/cursor.C:1213: undefined reference to `lyx::DocIterator::inTexted() const' lyxfind.o: In function `lyx::(anonymous namespace)::findChange(lyx::DocIterator&)': /home/juergen/lyx/lyx-qt/src/lyxfind.C:128: undefined reference to `lyx::DocIterator::inTexted() const' lyxfind.o: In function `lyx::(anonymous namespace)::findForward(lyx::DocIterator&, lyx::(anonymous namespace)::MatchString const&)': /home/juergen/lyx/lyx-qt/src/lyxfind.C:108: undefined reference to `lyx::DocIterator::inTexted() const' lyxfind.o: In function `lyx::(anonymous namespace)::findBackwards(lyx::DocIterator&, lyx::(anonymous namespace)::MatchString const&)': /home/juergen/lyx/lyx-qt/src/lyxfind.C:118: undefined reference to `lyx::DocIterator::inTexted() const' lyxfunc.o: In function `lyx::LyXFunc::dispatch(lyx::FuncRequest const&)': /home/juergen/lyx/lyx-qt/src/lyxfunc.C:1734: undefined reference to `lyx::DocIterator::inTexted() const' text3.o:/home/juergen/lyx/lyx-qt/src/text3.C:1697: more undefined references to `lyx::DocIterator::inTexted() const' follow undo.o: In function `lyx::(anonymous namespace)::doRecordUndo(lyx::Undo::undo_kind, lyx::DocIterator const&, long, long, lyx::DocIterator const&, lyx::BufferParams const&, bool, lyx::limited_stack&)': /home/juergen/lyx/lyx-qt/src/undo.C:97: undefined reference to `lyx::DocIterator::inMathed() const' undo.o: In function `lyx::(anonymous namespace)::textUndoOrRedo(lyx::BufferView&, lyx::limited_stack&, lyx::limited_stack&)': /home/juergen/lyx/lyx-qt/src/undo.C:168: undefined reference to `lyx::DocIterator::inMathed() const' mathed/.libs/libmathed.a(InsetMathHull.o): In function