6348631 - request for review (updated)

Y. S. Ramakrishna y.s.ramakrishna at oracle.com
Thu Dec 2 09:10:38 PST 2010



On 12/02/10 02:22, Volker Simonis wrote:
...
> 
> As far as I remember, the rule of thumb (as detailed in includeDB_core) was:
> - put declarations into .hpp
> - put definitions of inline functions into .inline.hpp
> - .hpp files only include other .hpp files
> - every xxx.inline.hpp includes the corresponding xxx.hpp
> - every yyy.cpp includes xxx.inline.hpp if it requires definitions
> from it or just xxx.hpp if it only needs the declarations
> 
> Now after we have no includeDB anymore I would also advocate for the
> inclusion of system headers where they are needed. So if
> xxx.inline.hpp requires a declaration from zzz.h, it should include
> it. Otherwise the users of xxx.inline.hpp (i.e. every file which
> includes xxx.inline.hpp) would have to manually include zzz.h BEFORE
> including xxx.inline.hpp which is not obvious.
> 
> As mentioned by Ivan, another nice benefit of this approach is that if
> xxx.inline.hpp will be in the precompiled header file, so will be the
> system headers like zzz.h. This  will speed up compilation compared to
> the case where zzz.h would be directly included into  the .cpp  file.

I agree. This sounds like the right approach, and one that is consistent
with past practice. This would also be exactly what the
make-deps removal accomplished for the existing .inline.hpp dependencies as
well.

-- ramki


More information about the hotspot-dev mailing list