On Fri, 12 Sep 2025 12:23:42 GMT, Maurizio Cimadamore <[email protected]> 
wrote:

>> Question: can we ever get here for a static symbol? I think for statics we 
>> should never run `analyzeSymbol` right? I'm not sure: `analyzeSymbol` seems 
>> called regardless of static-ness. Then it has two checks inside, one for 
>> writes and another for reads. The check for reads excludes `static` symbols, 
>> but the check for writes doesn't? I think we should maybe write some tests 
>> where we assign to a static field from a prologue :-)
>
> E.g. what I'm referring to is this:
> https://github.com/openjdk/valhalla/pull/1567/files#L1395
> What happens if `sym` is static?

`analyzeSymbol` is invoked for static symbols but all paths check if a symbol 
is static or not. Anyways I have included a explicit check to make this 
constraint more visible

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1567#discussion_r2344883303

Reply via email to