On Sat, 21 Nov 2026 03:17:24 GMT, Quan Anh Mai <[email protected]> wrote:
> Creating a ciInstanceKlass for D would lead to an inconsistency, so we fall > back to a more conservative result for the call to > ciInstanceKlass::implementor on C and assume it has multiple implementors. > This is useful because the compiler does not expect to fail after calling > something innocent such as TypeOopPtr::make_from_klass. You lost me here. How can we fall back to a more conservative result if the previous result was already observed by the compiler? > Same as the example above. But this time the class file says that it wants to > create an instance of D. This time, we cannot reject the creation of the > ciInstanceKlass for D as there is no reasonable thing to fall back to. So we > still create that ciInstanceKlass and wait for the next call to > Compile::failing to bail out. But can we just return an unloaded ciKlass when asked (and possibly proactively mark compilation as failing)? The compiler already has to account for similar situation when handling not-yet-linked bytecodes. Parser inserts an uncommon trap and eagerly prunes the path. ------------- PR Comment: https://git.openjdk.org/jdk/pull/33753#issuecomment-7056686300
