JVM_IR KT-41214 emit PermittedSubclasses on JDK17+

This commit is contained in:
Dmitry Petrov
2021-10-08 09:57:05 +03:00
committed by TeamCityServer
parent dca4a8e722
commit 146f0f4904
41 changed files with 695 additions and 43 deletions
@@ -0,0 +1,26 @@
// IGNORE_BACKEND: JVM
// IGNORE_DEXING
// JVM_TARGET: 17
// !LANGUAGE: +JvmPermittedSubclassesAttributeForSealed
// FILE: Expr.kt
sealed interface Expr
class VarExpr(val name: String) : Expr
class ParensExpr(val arg: Expr) : Expr
// FILE: Literals.kt
class IntExpr(val value: Int) : Expr
class DoubleExpr(val value: Double) : Expr
// FILE: UnaryOperators.kt
sealed class UnaryExpr(val arg: Expr) : Expr
class UnaryPlusExpr(arg: Expr) : UnaryExpr(arg)
class UnaryMinusExpr(arg: Expr) : UnaryExpr(arg)
// FILE: BinaryOperators.kt
sealed class BinaryExpr(val arg1: Expr, val arg2: Expr) : Expr
class BinaryPlusExpr(arg1: Expr, arg2: Expr) : BinaryExpr(arg1, arg2)
class BinaryMinusExpr(arg1: Expr, arg2: Expr) : BinaryExpr(arg1, arg2)
class BinaryMulExpr(arg1: Expr, arg2: Expr) : BinaryExpr(arg1, arg2)
class BinaryDivExpr(arg1: Expr, arg2: Expr) : BinaryExpr(arg1, arg2)
@@ -0,0 +1,104 @@
@kotlin.Metadata
public final class BinaryDivExpr {
// source: 'BinaryOperators.kt'
public method <init>(@org.jetbrains.annotations.NotNull p0: Expr, @org.jetbrains.annotations.NotNull p1: Expr): void
}
@kotlin.Metadata
public abstract class BinaryExpr {
// source: 'BinaryOperators.kt'
private final @org.jetbrains.annotations.NotNull field arg1: Expr
private final @org.jetbrains.annotations.NotNull field arg2: Expr
private method <init>(p0: Expr, p1: Expr): void
public synthetic method <init>(p0: Expr, p1: Expr, p2: kotlin.jvm.internal.DefaultConstructorMarker): void
public final @org.jetbrains.annotations.NotNull method getArg1(): Expr
public final @org.jetbrains.annotations.NotNull method getArg2(): Expr
permittedSubclass: BinaryDivExpr
permittedSubclass: BinaryMinusExpr
permittedSubclass: BinaryMulExpr
permittedSubclass: BinaryPlusExpr
}
@kotlin.Metadata
public final class BinaryMinusExpr {
// source: 'BinaryOperators.kt'
public method <init>(@org.jetbrains.annotations.NotNull p0: Expr, @org.jetbrains.annotations.NotNull p1: Expr): void
}
@kotlin.Metadata
public final class BinaryMulExpr {
// source: 'BinaryOperators.kt'
public method <init>(@org.jetbrains.annotations.NotNull p0: Expr, @org.jetbrains.annotations.NotNull p1: Expr): void
}
@kotlin.Metadata
public final class BinaryPlusExpr {
// source: 'BinaryOperators.kt'
public method <init>(@org.jetbrains.annotations.NotNull p0: Expr, @org.jetbrains.annotations.NotNull p1: Expr): void
}
@kotlin.Metadata
public final class DoubleExpr {
// source: 'Literals.kt'
private final field value: double
public method <init>(p0: double): void
public final method getValue(): double
}
@kotlin.Metadata
public interface Expr {
// source: 'Expr.kt'
permittedSubclass: BinaryExpr
permittedSubclass: DoubleExpr
permittedSubclass: IntExpr
permittedSubclass: ParensExpr
permittedSubclass: UnaryExpr
permittedSubclass: VarExpr
}
@kotlin.Metadata
public final class IntExpr {
// source: 'Literals.kt'
private final field value: int
public method <init>(p0: int): void
public final method getValue(): int
}
@kotlin.Metadata
public final class ParensExpr {
// source: 'Expr.kt'
private final @org.jetbrains.annotations.NotNull field arg: Expr
public method <init>(@org.jetbrains.annotations.NotNull p0: Expr): void
public final @org.jetbrains.annotations.NotNull method getArg(): Expr
}
@kotlin.Metadata
public abstract class UnaryExpr {
// source: 'UnaryOperators.kt'
private final @org.jetbrains.annotations.NotNull field arg: Expr
private method <init>(p0: Expr): void
public synthetic method <init>(p0: Expr, p1: kotlin.jvm.internal.DefaultConstructorMarker): void
public final @org.jetbrains.annotations.NotNull method getArg(): Expr
permittedSubclass: UnaryMinusExpr
permittedSubclass: UnaryPlusExpr
}
@kotlin.Metadata
public final class UnaryMinusExpr {
// source: 'UnaryOperators.kt'
public method <init>(@org.jetbrains.annotations.NotNull p0: Expr): void
}
@kotlin.Metadata
public final class UnaryPlusExpr {
// source: 'UnaryOperators.kt'
public method <init>(@org.jetbrains.annotations.NotNull p0: Expr): void
}
@kotlin.Metadata
public final class VarExpr {
// source: 'Expr.kt'
private final @org.jetbrains.annotations.NotNull field name: java.lang.String
public method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final @org.jetbrains.annotations.NotNull method getName(): java.lang.String
}