On Mon, 1 Jun 2026 19:23:32 GMT, Vladimir Ivanov <[email protected]> wrote:

>> src/hotspot/share/opto/library_call.cpp line 2418:
>> 
>>> 2416:   bool can_access_non_heap = 
>>> TypePtr::NULL_PTR->higher_equal(_gvn.type(base));
>>> 2417: 
>>> 2418:   assert(!is_non_heap_access || can_access_non_heap, "sanity"); // 
>>> is_non_heap_access implies can_access_non_heap
>> 
>> Suggestion:
>> 
>>   assert(!is_non_heap_access || can_access_non_heap, "is_non_heap_access 
>> must imply can_access_non_heap");
>> 
>> Makes the assert a bit more descriptive.
>
> Well, the condition is sort of self-explanatory. I don't see much value in 
> expanding the message part. IMO a comment is enough to clarify the intention.

I agree. But if you comment the assert you might as well use the comment as a 
more descriptive error message than "sanity". That in turn makes more 
descriptive JBS issues, which also makes it easier to search for duplicate 
issues. 

I guess is a bit of a pet peeve of mine, so I won't block on this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31249#discussion_r3339940764

Reply via email to