Hi,

SpiderMonkey has numerous inlines.h/-inl.h files.  Please avoid
putting code in these as much as possible.  If something needs to be
inlined and it can go in a vanilla .h file, put it there.  If it
doesn't need to be inlined, put it in the .cpp file.  Only put things
in inlines.h/-inl.h files that need to be there (i.e. because they
must be inlined and they depend on a header that the vanilla .h cannot
#include).

Why?  Because inlines.h/-inl.h files cause problems.  Did you know
that until recently we had a cycle in our #include graph that included
*11* inlines.h/-inl.h files?  As well as being morally repugnant, it
greatly increased the length of many incremental builds.  And have you
ever had to deal with one of those annoying "function is used but
never defined" warnings?  Yeah, me too.  Annoying, aren't they?

BTW, I think we inline many more functions than we need to;  think
about if a function needs to be inlined before putting it in an
inlines.h/-inl.h file.  Is it genuinely hot?  Is it small enough?
Etc.

I have and am continuing to whittle down the amount of code we have in
inlines.h/-inl.h files (see
https://bugzilla.mozilla.org/show_bug.cgi?id=886205,
https://bugzilla.mozilla.org/show_bug.cgi?id=890192,
https://bugzilla.mozilla.org/show_bug.cgi?id=891215).  Please don't
increase it unnecessarily.

Thanks.

Nick
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to