RFR: JDK-8278135: Remove un-necessary null-check for get-static in c2

王超 duke at openjdk.java.net
Mon Dec 6 07:41:16 UTC 2021


On Fri, 3 Dec 2021 21:21:02 GMT, Volker Simonis <simonis at openjdk.org> wrote:

> So to cut a long story short, I don't think that your proposed fix is correct. I have to think more about it, but maybe one approach for a fix could be to handle `java.lang.Class` special because it is always loaded in the bootstrap classloader during VM initialization.
> 
> I'll take another look at the problem next week :) Have a nice weekend, Volker

Got it: the `null-check` is used to unload un-optimized version of jit code, it can not be removed.

Thank you for the detailed explanation. I have updated the patch to handle `java.lang.Class` special.

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

PR: https://git.openjdk.java.net/jdk/pull/6667


More information about the hotspot-compiler-dev mailing list