Closed
Bug 902917
Opened 11 years ago
Closed 11 years ago
Minimize #include statements some more
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
(Blocks 1 open bug)
Details
(Whiteboard: [include-what-you-use])
Attachments
(34 files)
Till, I'm going to post a whole lot of small patches. I've done it that way because I think it makes the reviewing easier. However, I'll probably fold them up into a few larger patches before landing, because that makes rebasing easier. I'll warn you in advance that the patch descriptions won't be pretty. These patches require a certain degree of faith -- often #includes are removed from one place, only to be added in other places, and it's not always easy to understand why (which is why having an automated tool is so helpful). Generally when that happens, either (a) the removed #includes are in .h files and the added #includes are in .cpp files, and/or (b) the added #includes are lower-level than the removed #includes.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #787517 -
Flags: review?(till)
Assignee | ||
Updated•11 years ago
|
Assignee: general → n.nethercote
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #787518 -
Flags: review?(till)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #787524 -
Flags: review?(till)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #787526 -
Flags: review?(till)
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #787528 -
Flags: review?(till)
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #787529 -
Flags: review?(till)
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #787530 -
Flags: review?(till)
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #787532 -
Flags: review?(till)
Assignee | ||
Comment 9•11 years ago
|
||
Attachment #787534 -
Flags: review?(till)
Assignee | ||
Comment 10•11 years ago
|
||
Attachment #787537 -
Flags: review?(till)
Assignee | ||
Comment 11•11 years ago
|
||
Attachment #787539 -
Flags: review?(till)
Assignee | ||
Comment 12•11 years ago
|
||
Attachment #787541 -
Flags: review?(till)
Assignee | ||
Comment 13•11 years ago
|
||
Attachment #787546 -
Flags: review?(till)
Assignee | ||
Comment 14•11 years ago
|
||
Attachment #787548 -
Flags: review?(till)
Assignee | ||
Comment 15•11 years ago
|
||
Attachment #787549 -
Flags: review?(till)
Assignee | ||
Comment 16•11 years ago
|
||
Attachment #787550 -
Flags: review?(till)
Assignee | ||
Comment 17•11 years ago
|
||
Attachment #787551 -
Flags: review?(till)
Assignee | ||
Comment 18•11 years ago
|
||
Attachment #787552 -
Flags: review?(till)
Assignee | ||
Comment 19•11 years ago
|
||
Attachment #787553 -
Flags: review?(till)
Assignee | ||
Comment 20•11 years ago
|
||
Attachment #787555 -
Flags: review?(till)
Assignee | ||
Comment 21•11 years ago
|
||
Attachment #787556 -
Flags: review?(till)
Assignee | ||
Comment 22•11 years ago
|
||
Attachment #787557 -
Flags: review?(till)
Assignee | ||
Comment 23•11 years ago
|
||
Attachment #787558 -
Flags: review?(till)
Assignee | ||
Comment 24•11 years ago
|
||
Attachment #787559 -
Flags: review?(till)
Assignee | ||
Comment 25•11 years ago
|
||
Attachment #787561 -
Flags: review?(till)
Assignee | ||
Comment 26•11 years ago
|
||
Attachment #787562 -
Flags: review?(till)
Assignee | ||
Comment 27•11 years ago
|
||
Attachment #787564 -
Flags: review?(till)
Assignee | ||
Comment 28•11 years ago
|
||
Attachment #787565 -
Flags: review?(till)
Assignee | ||
Comment 29•11 years ago
|
||
Attachment #787566 -
Flags: review?(till)
Assignee | ||
Comment 30•11 years ago
|
||
Attachment #787567 -
Flags: review?(till)
Assignee | ||
Comment 31•11 years ago
|
||
Attachment #787568 -
Flags: review?(till)
Assignee | ||
Comment 32•11 years ago
|
||
jsstrinlines.h is only #included by jsstr.cpp now, so this patch just inlines it.
Attachment #787569 -
Flags: review?(till)
Assignee | ||
Comment 33•11 years ago
|
||
Attachment #787570 -
Flags: review?(till)
Assignee | ||
Comment 34•11 years ago
|
||
Attachment #787572 -
Flags: review?(till)
Assignee | ||
Comment 35•11 years ago
|
||
I haven't even tried to minimize #includes of ion headers yet, but this is enough for one bug, I think.
Comment 36•11 years ago
|
||
Comment on attachment 787517 [details] [diff] [review] blah Review of attachment 787517 [details] [diff] [review]: ----------------------------------------------------------------- r=me
Attachment #787517 -
Flags: review?(till) → review+
Comment 37•11 years ago
|
||
Comment on attachment 787518 [details] [diff] [review] blah2 Review of attachment 787518 [details] [diff] [review]: ----------------------------------------------------------------- r=me
Attachment #787518 -
Flags: review?(till) → review+
Comment 38•11 years ago
|
||
Comment on attachment 787524 [details] [diff] [review] blah Review of attachment 787524 [details] [diff] [review]: ----------------------------------------------------------------- nice, nice ::: js/src/jsnum.h @@ +6,5 @@ > > #ifndef jsnum_h > #define jsnum_h > > #include "mozilla/FloatingPoint.h" Shouldn't the ordering have been fixed by another script?
Attachment #787524 -
Flags: review?(till) → review+
Comment 39•11 years ago
|
||
Comment on attachment 787526 [details] [diff] [review] blah Review of attachment 787526 [details] [diff] [review]: ----------------------------------------------------------------- I like it!
Attachment #787526 -
Flags: review?(till) → review+
Comment 40•11 years ago
|
||
Comment on attachment 787529 [details] [diff] [review] blah Review of attachment 787529 [details] [diff] [review]: ----------------------------------------------------------------- yes
Attachment #787529 -
Flags: review?(till) → review+
Comment 41•11 years ago
|
||
Comment on attachment 787528 [details] [diff] [review] blah Review of attachment 787528 [details] [diff] [review]: ----------------------------------------------------------------- nice
Attachment #787528 -
Flags: review?(till) → review+
Comment 42•11 years ago
|
||
Comment on attachment 787530 [details] [diff] [review] blah Review of attachment 787530 [details] [diff] [review]: ----------------------------------------------------------------- makes sense
Attachment #787530 -
Flags: review?(till) → review+
Comment 43•11 years ago
|
||
Comment on attachment 787534 [details] [diff] [review] blah Review of attachment 787534 [details] [diff] [review]: ----------------------------------------------------------------- indeed
Attachment #787534 -
Flags: review?(till) → review+
Attachment #787532 -
Flags: review?(till) → review+
Comment 44•11 years ago
|
||
Comment on attachment 787532 [details] [diff] [review] blah Review of attachment 787532 [details] [diff] [review]: ----------------------------------------------------------------- yup
Comment 45•11 years ago
|
||
Comment on attachment 787537 [details] [diff] [review] blah Review of attachment 787537 [details] [diff] [review]: ----------------------------------------------------------------- r=me
Attachment #787537 -
Flags: review?(till) → review+
Comment 46•11 years ago
|
||
Comment on attachment 787539 [details] [diff] [review] blah Review of attachment 787539 [details] [diff] [review]: ----------------------------------------------------------------- totally
Attachment #787539 -
Flags: review?(till) → review+
Comment 47•11 years ago
|
||
Comment on attachment 787541 [details] [diff] [review] blah Review of attachment 787541 [details] [diff] [review]: ----------------------------------------------------------------- neat
Attachment #787541 -
Flags: review?(till) → review+
Comment 48•11 years ago
|
||
Comment on attachment 787546 [details] [diff] [review] blah Review of attachment 787546 [details] [diff] [review]: ----------------------------------------------------------------- right
Attachment #787546 -
Flags: review?(till) → review+
Comment 49•11 years ago
|
||
Comment on attachment 787548 [details] [diff] [review] blah Review of attachment 787548 [details] [diff] [review]: ----------------------------------------------------------------- good
Attachment #787548 -
Flags: review?(till) → review+
Comment 50•11 years ago
|
||
Comment on attachment 787549 [details] [diff] [review] blah Review of attachment 787549 [details] [diff] [review]: ----------------------------------------------------------------- short, but nice
Attachment #787549 -
Flags: review?(till) → review+
Comment 51•11 years ago
|
||
Comment on attachment 787550 [details] [diff] [review] blah Review of attachment 787550 [details] [diff] [review]: ----------------------------------------------------------------- Less jsfun, what's not to like?
Attachment #787550 -
Flags: review?(till) → review+
Comment 52•11 years ago
|
||
Comment on attachment 787551 [details] [diff] [review] blah Review of attachment 787551 [details] [diff] [review]: ----------------------------------------------------------------- yes
Attachment #787551 -
Flags: review?(till) → review+
Comment 53•11 years ago
|
||
Comment on attachment 787552 [details] [diff] [review] blah Review of attachment 787552 [details] [diff] [review]: ----------------------------------------------------------------- r=me
Attachment #787552 -
Flags: review?(till) → review+
Comment 54•11 years ago
|
||
Comment on attachment 787553 [details] [diff] [review] blah Review of attachment 787553 [details] [diff] [review]: ----------------------------------------------------------------- Lovely
Attachment #787553 -
Flags: review?(till) → review+
Comment 55•11 years ago
|
||
Comment on attachment 787555 [details] [diff] [review] blah Review of attachment 787555 [details] [diff] [review]: ----------------------------------------------------------------- splendid
Attachment #787555 -
Flags: review?(till) → review+
Comment 56•11 years ago
|
||
Comment on attachment 787556 [details] [diff] [review] blah Review of attachment 787556 [details] [diff] [review]: ----------------------------------------------------------------- agreed
Attachment #787556 -
Flags: review?(till) → review+
Comment 57•11 years ago
|
||
Comment on attachment 787557 [details] [diff] [review] blah Review of attachment 787557 [details] [diff] [review]: ----------------------------------------------------------------- yup
Attachment #787557 -
Flags: review?(till) → review+
Comment 58•11 years ago
|
||
Comment on attachment 787558 [details] [diff] [review] blah Review of attachment 787558 [details] [diff] [review]: ----------------------------------------------------------------- likable
Attachment #787558 -
Flags: review?(till) → review+
Comment 59•11 years ago
|
||
Comment on attachment 787559 [details] [diff] [review] blah Review of attachment 787559 [details] [diff] [review]: ----------------------------------------------------------------- So JSON has no Values, I knew it!
Attachment #787559 -
Flags: review?(till) → review+
Comment 60•11 years ago
|
||
Comment on attachment 787561 [details] [diff] [review] blah Review of attachment 787561 [details] [diff] [review]: ----------------------------------------------------------------- Can't say I liked reviewing this. The outcome's nice, though.
Attachment #787561 -
Flags: review?(till) → review+
Comment 61•11 years ago
|
||
Comment on attachment 787562 [details] [diff] [review] blah Review of attachment 787562 [details] [diff] [review]: ----------------------------------------------------------------- beautiful
Attachment #787562 -
Flags: review?(till) → review+
Comment 62•11 years ago
|
||
Comment on attachment 787564 [details] [diff] [review] blah Review of attachment 787564 [details] [diff] [review]: ----------------------------------------------------------------- terrific
Attachment #787564 -
Flags: review?(till) → review+
Comment 63•11 years ago
|
||
Comment on attachment 787565 [details] [diff] [review] blah Review of attachment 787565 [details] [diff] [review]: ----------------------------------------------------------------- yes, yes
Attachment #787565 -
Flags: review?(till) → review+
Comment 64•11 years ago
|
||
Comment on attachment 787566 [details] [diff] [review] blah Review of attachment 787566 [details] [diff] [review]: ----------------------------------------------------------------- jsinferinlines, of all headers, should really be able to infer more things. Inline. Nice to see that it can.
Attachment #787566 -
Flags: review?(till) → review+
Comment 65•11 years ago
|
||
Comment on attachment 787567 [details] [diff] [review] blah Review of attachment 787567 [details] [diff] [review]: ----------------------------------------------------------------- very nice
Attachment #787567 -
Flags: review?(till) → review+
Comment 66•11 years ago
|
||
Comment on attachment 787568 [details] [diff] [review] blah Review of attachment 787568 [details] [diff] [review]: ----------------------------------------------------------------- I guess
Attachment #787568 -
Flags: review?(till) → review+
Comment 67•11 years ago
|
||
Comment on attachment 787569 [details] [diff] [review] blah Review of attachment 787569 [details] [diff] [review]: ----------------------------------------------------------------- \o/
Attachment #787569 -
Flags: review?(till) → review+
Comment 68•11 years ago
|
||
Comment on attachment 787570 [details] [diff] [review] blah Review of attachment 787570 [details] [diff] [review]: ----------------------------------------------------------------- Yes, potentially with moving the TraceLogging.h include in ArgumentsObject.cpp ::: js/src/vm/ArgumentsObject.cpp @@ +3,5 @@ > * This Source Code Form is subject to the terms of the Mozilla Public > * License, v. 2.0. If a copy of the MPL was not distributed with this > * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ > > +#include "TraceLogging.h" I'm not sure I understand why that's up here.
Attachment #787570 -
Flags: review?(till) → review+
Comment 69•11 years ago
|
||
Comment on attachment 787572 [details] [diff] [review] blah Review of attachment 787572 [details] [diff] [review]: ----------------------------------------------------------------- This I like! And I like that I'm through!
Attachment #787572 -
Flags: review?(till) → review+
Assignee | ||
Comment 70•11 years ago
|
||
> ::: js/src/jsnum.h > > Shouldn't the ordering have been fixed by another script? I don't understand. The ordering in this file looks ok. > ::: js/src/vm/ArgumentsObject.cpp > @@ +3,5 @@ > > * This Source Code Form is subject to the terms of the Mozilla Public > > * License, v. 2.0. If a copy of the MPL was not distributed with this > > * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ > > > > +#include "TraceLogging.h" > > I'm not sure I understand why that's up here. Oh, that shouldn't be there. Sometimes when testing I want to know if a .h file is self-contained, i.e. it #includes everything it needs to. So I temporarily #include it at the top of ArgumentsObjects.cpp, because that's the first file that gets compiled. I just forgot to take this out. Good catch! Thanks for such a quick turnaround on this review bomb! And I gave you plenty of practice finding positive things to say :)
Comment 71•11 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #70) > > ::: js/src/jsnum.h > > > > Shouldn't the ordering have been fixed by another script? > > I don't understand. The ordering in this file looks ok. Damn, I meant to rescind that comment. I forgot about the mozilla/ stuff going before the rest for a moment. > Thanks for such a quick turnaround on this review bomb! And I gave you > plenty of practice finding positive things to say :) That you did. :) And I very much mean it: this work mustn't be thankless, because it's needed and awesome.
Assignee | ||
Comment 72•11 years ago
|
||
Landed as a single patch, because anything else would have been a total nightmare to rebase (esp. in the presence of bug 902908): https://hg.mozilla.org/integration/mozilla-inbound/rev/b9b8ad32c72b
Comment 73•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b9b8ad32c72b
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•