IR util: IrExpression.isSafeToUseWithoutCopying

This commit is contained in:
Jinseong Jeon
2020-08-04 23:06:56 -07:00
committed by Mikhail Glukhikh
parent 7ef1c74bbf
commit b57794d96e
3 changed files with 8 additions and 18 deletions
@@ -192,13 +192,6 @@ class CallAndReferenceGenerator(
}
}
// TODO: refactor/reuse the same logic in ReflectionReferencesGenerator
private fun IrExpression.isSafeToUseWithoutCopying() =
this is IrGetObjectValue ||
this is IrGetEnumValue ||
this is IrConst<*> ||
this is IrGetValue && symbol.isBound && symbol.owner.isImmutable
private fun createAdapterFunction(
callableReferenceAccess: FirCallableReferenceAccess,
startOffset: Int,