review request (L): 7032323: code changes for JSR 292 EG adjustments to API, through Public Review (original) (raw)
Y. S. Ramakrishna y.s.ramakrishna at oracle.com
Thu May 26 13:55:59 PDT 2011
- Previous message: review request (L): 7032323: code changes for JSR 292 EG adjustments to API, through Public Review
- Next message: review request (L): 7032323: code changes for JSR 292 EG adjustments to API, through Public Review
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Yes, agreed. But one could also write:
void maybeCleanUpMess(SwitchPoint sp) { if (mysp.isInvalid()) { ... // do cleanup after invalidation } // else nothing to do }
I don't know if one style is better than the other generally.
It's just that doing something based on the value of an unstable predicate seems slightly counterintuitive, but of course below you are not doing something based on not seeing a stable predicate.
Anyway, that was just an off-the-cuff remark -- sorry for the interruption... back to your normal programming now (pun intended :-)
-- ramki
On 05/26/11 13:33, John Rose wrote:
On May 26, 2011, at 1:21 PM, Charles Oliver Nutter wrote:
isInvalid seems a bit double-negativy to me. That's my hesitation. Consider the use case: void maybeCleanUpMess(SwitchPoint sp) { if (!mysp.isInvalid()) return; ... // do cleanup after invalidation } It reads better as: if (mysp.isValid()) return; -- John
- Previous message: review request (L): 7032323: code changes for JSR 292 EG adjustments to API, through Public Review
- Next message: review request (L): 7032323: code changes for JSR 292 EG adjustments to API, through Public Review
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the hotspot-compiler-dev mailing list