Devirtualize calls to PackageFragmentDescriptorImpl.fqName

1. Replace INVOKEINTERFACE with INVOKEVIRTUAL
2. Make callee function final

It helps to decrease one module compilation time by 1-2 seconds
This commit is contained in:
Denis Zharkov
2016-02-23 12:20:13 +03:00
parent 3cc3b3fce2
commit beb24af5ef
2 changed files with 2 additions and 2 deletions
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.types.TypeSubstitutor
abstract class PackageFragmentDescriptorImpl(
module: ModuleDescriptor,
override val fqName: FqName
final override val fqName: FqName
) : DeclarationDescriptorNonRootImpl(module, Annotations.EMPTY, fqName.shortNameOrSpecial(), SourceElement.NO_SOURCE),
PackageFragmentDescriptor {
override fun substitute(substitutor: TypeSubstitutor): DeclarationDescriptor? = this
@@ -34,7 +34,7 @@ import org.jetbrains.kotlin.types.TypeSubstitutor
import org.jetbrains.kotlin.types.error.MissingDependencyErrorClass
import org.jetbrains.kotlin.utils.Printer
private class PackageFragmentWithMissingDependencies(override val fqName: FqName, moduleDescriptor: ModuleDescriptor) :
private class PackageFragmentWithMissingDependencies(fqName: FqName, moduleDescriptor: ModuleDescriptor) :
PackageFragmentDescriptorImpl(moduleDescriptor, fqName) {
override fun getMemberScope(): MemberScope {
return ScopeWithMissingDependencies(fqName, this)