On Tue, 3 Feb 2026 12:31:59 GMT, Marc Chevalier <[email protected]> wrote:

>> Tobias Hartmann has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Nice comments
>
> src/hotspot/share/runtime/sharedRuntime.cpp line 2943:
> 
>> 2941:                   methodHandle mh(thread, super_method);
>> 2942:                   DeoptimizationScope deopt_scope;
>> 2943:                   {
> 
> Maybe one could put a comment on the block start, stating that's it's to 
> limit the scope of the MutexLocker. I've seen such pattern, so it's possible 
> that I'd guess it out of context, but uncertain. I've seen some blocks whose 
> purpose were sometimes unclear (either to allow to shadow variables, or maybe 
> a leftover of some control structure).
> 
> But maybe I'm being over cautious, and documenting a common pattern is not 
> worth the noise. I'm not convinced myself. Feel free to ignore.

I think comments are always good. What about this?

-------------

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2014#discussion_r2759184416

Reply via email to