Simplify findLocalIndex in ExpressionCodegen
This commit is contained in:
committed by
Georgy Bronnikov
parent
b04dc69157
commit
1e08b3c7da
+1
-5
@@ -463,12 +463,8 @@ class ExpressionCodegen(
|
|||||||
|
|
||||||
private fun findLocalIndex(irSymbol: IrSymbol): Int {
|
private fun findLocalIndex(irSymbol: IrSymbol): Int {
|
||||||
val index = frameMap.getIndex(irSymbol)
|
val index = frameMap.getIndex(irSymbol)
|
||||||
if (index >= 0) {
|
if (index >= 0)
|
||||||
return index
|
return index
|
||||||
}
|
|
||||||
if (irFunction.dispatchReceiverParameter != null && (irFunction.parent as? IrClass)?.thisReceiver?.symbol == irSymbol) {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
val dump = if (irSymbol.isBound) irSymbol.owner.dump() else irSymbol.descriptor.toString()
|
val dump = if (irSymbol.isBound) irSymbol.owner.dump() else irSymbol.descriptor.toString()
|
||||||
throw AssertionError("Non-mapped local declaration: $dump\n in ${irFunction.dump()}")
|
throw AssertionError("Non-mapped local declaration: $dump\n in ${irFunction.dump()}")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user