Improper usage of CHECK macros generates unreachable code

David Holmes - Sun Microsystems David.Holmes at Sun.COM
Wed Oct 7 21:31:32 PDT 2009


Hi John,

John Rose said the following on 10/08/09 14:23:
> There's no issue of failing to catch the exception, since the caller is 
> also required to poll for exceptions.

In that case use of CHECK was completely superfluous in the first place. 
If that is indeed always the case then changing to THREAD is fine as has 
been stated.

>> But personally I would vote for the much cleaner solution with the
>> temporary variable because it's not more overhead and there's still a
>> small chance to catch some undiscovered errors.
> 
> I don't see useless variables and duplicated tests as producing cleanliness.

The assumption was that the functionality performed by CHECK was 
actually necessary, hence the variables would not be useless nor the 
test duplicated.

Cheers,
David


More information about the hotspot-dev mailing list