IR: cleanup expression implementations
Remove unused constructors with descriptors, minimize usages of secondary constructors and make some properties non-lateinit, fix some inspections. (cherry picked from commit 98ad94e630f86bd2c92fc8e2cf0f8796de6002cc)
This commit is contained in:
committed by
Vasily Levchenko
parent
b2fbe0135f
commit
bf74bd76a7
+1
-1
@@ -1098,7 +1098,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
|
||||
}
|
||||
}
|
||||
|
||||
if (catch.parameter.type == context.builtIns.throwable.defaultType) {
|
||||
if (catch.catchParameter.descriptor.type == context.builtIns.throwable.defaultType) {
|
||||
genCatchBlock()
|
||||
return // Remaining catch clauses are unreachable.
|
||||
} else {
|
||||
|
||||
+5
-6
@@ -267,12 +267,11 @@ internal class FinallyBlocksLowering(val context: Context): FileLoweringPass, Ir
|
||||
type = context.irBuiltIns.nothingType,
|
||||
tryResult = transformedTry,
|
||||
catches = listOf(
|
||||
irCatch(catchParameter).apply {
|
||||
result = irBlock {
|
||||
+copy(finallyExpression)
|
||||
+irThrow(irGet(catchParameter))
|
||||
}
|
||||
}),
|
||||
irCatch(catchParameter, irBlock {
|
||||
+copy(finallyExpression)
|
||||
+irThrow(irGet(catchParameter))
|
||||
})
|
||||
),
|
||||
finallyExpression = null
|
||||
)
|
||||
using(TryScope(syntheticTry, transformedFinallyExpression, this)) {
|
||||
|
||||
Reference in New Issue
Block a user