RFR(S): 7111795: G1: Various cleanups identified during walk through of changes for 6484965

Jesper Wilhelmsson jesper.wilhelmsson at oracle.com
Sat Nov 19 08:14:52 UTC 2011


18 nov 2011 kl. 21:36 skrev Tony Printezis <tony.printezis at oracle.com>:

> John,
> 
> Re: the { } placement: I'm also OK either way. But I have tended to do the latter. So we should be consistent. Does anyone else have any preferences?

I would also prefer the latter even though I don't have a strong opinion on C++ formatting yet.
/Jesper

> 
> Tony
> 
> On 11/18/2011 12:57 PM, John Cuthbertson wrote:
>> Hi Tony,
>> 
>> Thanks for the review.
>> 
>> On 11/18/11 09:28, Tony Printezis wrote:
>>> John,
>>> 
>>> Thanks for doing the cleanup. It's fine, one minor issue:
>>> 
>>> 1989   G1CMParKeepAliveAndDrainClosure(ConcurrentMark* cm, CMTask* task) :
>>> 1990     _cm(cm), _task(task),
>>> 
>>> 
>>> 1991     _ref_counter_limit(G1RefProcDrainInterval)
>>> 1992   {
>>> 1993     assert(_ref_counter_limit>  0, "sanity");
>>> 1994     _ref_counter = _ref_counter_limit;
>>> 1995   }
>>> 
>>> 
>>> maybe:
>>> 
>>> 1991     _ref_counter_limit(G1RefProcDrainInterval) {
>>> 1992     assert(_ref_counter_limit>  0, "sanity");
>>> 1993     _ref_counter = _ref_counter_limit;
>>> 1994   }
>>> 
>> 
>> Sure - no problem.
>> 
>>> 
>>> And one stylistic question: do you prefer this style for an empty constructor:
>>> 
>>> class A {
>>>  int _a, _b, _c;
>>>  A() : _a(0), _b(0), _c(0)
>>>   { }
>>> };
>>> 
>>> over this?
>>> 
>>> class A {
>>>  int _a, _b, _c;
>>>  A() : _a(0), _b(0), _c(0) { }
>>> };
>>> 
>>> I would recommend the latter myself, given that it saves an extra line.
>> 
>> I do tend to favor the former. I don't know why. But I'm not absolutely tied to it. I'll revert back any I've changed.
>> 
>> Thanks,
>> 
>> JohnC



More information about the hotspot-gc-dev mailing list