In the type system which controls the C2 parser and optimizer, unverified interfaces are freely mixed with verified classes. The result is that the code which makes decisions based on statically predicted reference types must always have a cutout which disables the decision if the type in question is an interface instead of a class. If such a cutout is missing, there will be a bug, but only in rare cases where a class is recompiled without an interface, and client classes continue to assume it has the interface.
Our system has a more or less complete set of such cutouts, because we have fixed a number of historical bugs involving interface paradoxes. However, there may be remaining bugs in the system, and new code involving reference type checks will always be somewhat buggy until the proper interface cutouts are coded.
One reason we do not perform certain optimizations, such as CHA on interfaces and recognition of unique implementors, is that the new code to do this would have to "undo" some of the interface cutouts, and would therefore be risky. C1 has one such optimization, at the cost of inserting a local 'instanceof' check guarding the optimized 'invokeinterface'. Such an optimization in C2 is best done by the type system, which is impossible as long as type system assertions about interfaces are untrustworthy.
- is cloned by
-
JDK-8297933 [REDO] Compiler should only use verified interface types for optimization
-
- Resolved
-
- relates to
-
JDK-6366780 A big win for concrete class inference
-
- Closed
-
-
JDK-8297343 TestStress*.java fail with "got different traces for the same seed"
-
- Resolved
-
-
JDK-8297345 C2: SIGSEGV in PhaseIdealLoop::push_pinned_nodes_thru_region
-
- Closed
-
-
JDK-8297514 Timeouts in JCK C2 lang tests e.g. lang/LMBD/lmbd169/lmbd16901m851/lmbd16901m851_rt.html
-
- Closed
-
-
JDK-8297556 Parse::check_interpreter_type fails with assert "must constrain OSR typestate"
-
- Closed
-
-
JDK-8280469 No CHA for interface calls when inlining through method handle linker
-
- Open
-
-
JDK-8275201 C2: hide klass() accessor from TypeOopPtr and typeKlassPtr subclasses
-
- Resolved
-
-
JDK-8222075 C2: Enable loop predication for subtype checks
-
- Closed
-