RFR: 8261675: ObjectValue::set_visited(bool) sets _visited false
Vladimir Kozlov
kvn at openjdk.java.net
Sat Feb 13 06:36:38 UTC 2021
On Sat, 13 Feb 2021 01:51:39 GMT, Xin Liu <xliu at openjdk.org> wrote:
> The setter is error-prone. it unconditionally sets _visited false.
> this patch stores the argument to it.
Wow. This was original changes for first implementation of Escape Analysis 6558600.
But it works because the only place where `set_visited()` is called it sets to `false`:
[debugInfoRec.cpp#L358](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/code/debugInfoRec.cpp#L358)
`is_visited()` is not called at all - `_visited` field is accessed directly only in one place:
[debugInfo.cpp#L161](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/code/debugInfo.cpp#L161)
Would be nice to clean up this mess.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2560
More information about the hotspot-compiler-dev
mailing list