Remove old IC: remove unnecessary caches

This commit is contained in:
Alexey Tsvetkov
2017-05-02 12:59:28 +03:00
parent aea5293288
commit 62fdd91947
8 changed files with 1 additions and 122 deletions
@@ -107,7 +107,6 @@ abstract class InlineCodegen<out T: BaseExpressionCodegen>(
isSameModule = sourceCompiler.isCallInsideSameModuleAsDeclared(functionDescriptor)
if (functionDescriptor !is FictitiousArrayConstructor) {
reportIncrementalInfo(functionDescriptor, sourceCompiler.compilationContextFunctionDescriptor.original, jvmSignature, state)
val functionOrAccessorName = typeMapper.mapAsmMethod(function).name
//track changes for property accessor and @JvmName inline functions/property accessors
if (functionOrAccessorName != functionDescriptor.name.asString()) {
@@ -561,19 +560,6 @@ abstract class InlineCodegen<out T: BaseExpressionCodegen>(
fun createNestedSourceMapper(nodeAndSmap: SMAPAndMethodNode, parent: SourceMapper): SourceMapper {
return NestedSourceMapper(parent, nodeAndSmap.sortedRanges, nodeAndSmap.classSMAP.sourceInfo)
}
internal fun reportIncrementalInfo(
sourceDescriptor: FunctionDescriptor,
targetDescriptor: FunctionDescriptor,
jvmSignature: JvmMethodSignature,
state: GenerationState
) {
val incrementalCache = state.incrementalCacheForThisTarget ?: return
val classFilePath = sourceDescriptor.getClassFilePath(state.typeMapper, incrementalCache)
val sourceFilePath = targetDescriptor.sourceFilePath
val method = jvmSignature.asmMethod
incrementalCache.registerInline(classFilePath, method.name + method.descriptor, sourceFilePath)
}
}
}
@@ -61,8 +61,6 @@ class InlineCodegenForDefaultBody(
sourceCompilerForInline.initializeInlineFunctionContext(functionDescriptor)
jvmSignature = state.typeMapper.mapSignatureWithGeneric(functionDescriptor, sourceCompilerForInline.contextKind)
InlineCodegen.reportIncrementalInfo(functionDescriptor, codegen.context.functionDescriptor.original, jvmSignature, state)
//InlineCodegenForDefaultBody created just after visitCode call
codegen.v.visitLabel(methodStartLabel)
}