[webkit-dev] …Inlines.h vs …InlineMethods.h
fpizlo at apple.com
Sat Nov 3 01:33:28 PDT 2012
On Nov 2, 2012, at 5:48 PM, Mark Lam <mark.lam at apple.com> wrote:
> Naming-wise, the existing JSC code has a few inline headers named …Inlines.h and more named …InlinedMethods.h. On the WebCore side, the few that exists there are named …InlineMethods.h. I have a preference for the …Inlines.h convention because it is shorter and concisely communicates the intent. I plan to rename all these inline headers to be …Inlines.h for consistency. Does anyone object to my renaming the inline headers?
> Also, a lot of the existing inlined methods are 1 liners. I plan to leave these in the original header file. Here's the convention I'm going to adopt:
> 1. If the inline method is a 1 liner, then leave it in the original header file.
> 2. If it takes more than 1 line, then move it into a corresponding inline header file.
But I don't think that this rule - any inline method over one line should be in a separate file - is going to be a good idea in the long term. For example, I would find it much more difficult to reason about DFG::AbstractValue if I had to be looking at two different files to do it. Same for DFG::Node. Probably others as well. The general challenge here is that many of the methods have semantics that are best deduced by not only reading their names but also looking at their contents.
So, for most of the inline methods with which I am familiar, I'd prefer if they stayed where they are now.
> I will only be breaking out the inline methods (per the above convention) in the JSC sources. Apart from renaming the few WebCore inline headers, I won't be looking into WebCore's placement of inline methods for now.
> If anyone has an opinion on this, please let me know asap. Thanks.
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
More information about the webkit-dev