On Tue, 23 May 2023 16:36:32 GMT, Cesar Soares Lucas <cslu...@openjdk.org> 
wrote:

>  Are you suggesting to implement it as ScopeDesc::is_root(ScopeValue* sv) and 
> the body of the method would just check if the sv is referenced in 
> locals/expressions/monitor? Did I get it right?

I didn't propose exactly that, but I like your idea. I'm not against having it 
cached on `ScopeValue` side (and serialized in debug info), but implementing it 
as a query on `ScopeDesc` does look like a better alternative. (If it turns out 
to matter from performance POV, the check can be then turned into an assert and 
the cached value is used.)

Maybe call it `ScopeDesc::has_reference_to(ScopeValue* sv)` then.

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

PR Comment: https://git.openjdk.org/jdk/pull/12897#issuecomment-1559844211

Reply via email to