JVM_IR. Generate additional checkcast for when/try epressions to avoid frame map problems on reification

This commit is contained in:
Mikhael Bogdanov
2021-01-26 16:12:54 +01:00
parent 16928d6e3f
commit 5b64ceceb3
4 changed files with 43 additions and 20 deletions
@@ -629,7 +629,11 @@ public abstract class StackValue {
}
public static void coerce(@NotNull Type fromType, @NotNull Type toType, @NotNull InstructionAdapter v) {
if (toType.equals(fromType)) return;
coerce(fromType, toType, v, false);
}
public static void coerce(@NotNull Type fromType, @NotNull Type toType, @NotNull InstructionAdapter v, boolean forceSelfCast) {
if (toType.equals(fromType) && !forceSelfCast) return;
if (toType.getSort() == Type.VOID) {
pop(v, fromType);