Remove InlineRegistering interface
This commit is contained in:
@@ -32,7 +32,6 @@ import org.jetbrains.kotlin.codegen.state.JetTypeMapper;
|
||||
import org.jetbrains.kotlin.descriptors.*;
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache;
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCompilationComponents;
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.InlineRegistering;
|
||||
import org.jetbrains.kotlin.modules.TargetId;
|
||||
import org.jetbrains.kotlin.name.ClassId;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
@@ -754,7 +753,6 @@ public class InlineCodegen extends CallGenerator {
|
||||
IncrementalCache incrementalCache = incrementalCompilationComponents.getIncrementalCache(targetId);
|
||||
String sourceFile = getClassFilePath(sourceDescriptor, incrementalCache);
|
||||
String targetFile = getSourceFilePath(targetDescriptor);
|
||||
InlineRegistering inlineRegistering = incrementalCache.getInlineRegistering();
|
||||
inlineRegistering.registerInline(sourceFile, jvmSignature.toString(), targetFile);
|
||||
incrementalCache.registerInline(sourceFile, jvmSignature.toString(), targetFile);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -17,14 +17,14 @@
|
||||
package org.jetbrains.kotlin.load.kotlin.incremental.components
|
||||
|
||||
public interface IncrementalCache {
|
||||
public fun getInlineRegistering(): InlineRegistering
|
||||
|
||||
public fun getObsoletePackageParts(): Collection<String>
|
||||
|
||||
public fun getPackagePartData(fqName: String): ByteArray?
|
||||
|
||||
public fun getModuleMappingData(): ByteArray?
|
||||
|
||||
public fun registerInline(fromPath: String, jvmSignature: String, toPath: String)
|
||||
|
||||
public fun getClassFilePath(internalClassName: String): String
|
||||
|
||||
public fun close()
|
||||
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.load.kotlin.incremental.components
|
||||
|
||||
interface InlineRegistering {
|
||||
fun registerInline(fromPath: String, jvmSignature: String, toPath: String)
|
||||
}
|
||||
+3
-2
@@ -17,7 +17,6 @@
|
||||
package org.jetbrains.kotlin.rmi.kotlinr
|
||||
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.InlineRegistering
|
||||
import org.jetbrains.kotlin.rmi.CompileService
|
||||
import java.rmi.server.UnicastRemoteObject
|
||||
|
||||
@@ -34,7 +33,9 @@ public class RemoteIncrementalCacheServer(val cache: IncrementalCache) : Compile
|
||||
|
||||
override fun getModuleMappingData(): ByteArray? = cache.getModuleMappingData()
|
||||
|
||||
override fun getInlineRegistering(): InlineRegistering = cache.getInlineRegistering()
|
||||
override fun registerInline(fromPath: String, jvmSignature: String, toPath: String) {
|
||||
cache.registerInline(fromPath, jvmSignature, toPath)
|
||||
}
|
||||
|
||||
override fun getClassFilePath(internalClassName: String): String = cache.getClassFilePath(internalClassName)
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.rmi
|
||||
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.InlineRegistering
|
||||
import org.jetbrains.kotlin.modules.TargetId
|
||||
import java.rmi.Remote
|
||||
import java.rmi.RemoteException
|
||||
@@ -39,7 +38,7 @@ public interface CompileService : Remote {
|
||||
public fun getModuleMappingData(): ByteArray?
|
||||
|
||||
throws(RemoteException::class)
|
||||
public fun getInlineRegistering(): InlineRegistering
|
||||
public fun registerInline(fromPath: String, jvmSignature: String, toPath: String)
|
||||
|
||||
throws(RemoteException::class)
|
||||
fun getClassFilePath(internalClassName: String): String
|
||||
|
||||
+4
-3
@@ -17,18 +17,19 @@
|
||||
package org.jetbrains.kotlin.rmi.service
|
||||
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.InlineRegistering
|
||||
import org.jetbrains.kotlin.rmi.CompileService
|
||||
|
||||
public class RemoteIncrementalCacheClient(val cache: CompileService.RemoteIncrementalCache): IncrementalCache {
|
||||
override fun getInlineRegistering(): InlineRegistering = cache.getInlineRegistering()
|
||||
|
||||
override fun getObsoletePackageParts(): Collection<String> = cache.getObsoletePackageParts()
|
||||
|
||||
override fun getPackagePartData(fqName: String): ByteArray? = cache.getPackagePartData(fqName)
|
||||
|
||||
override fun getModuleMappingData(): ByteArray? = cache.getModuleMappingData()
|
||||
|
||||
override fun registerInline(fromPath: String, jvmSignature: String, toPath: String) {
|
||||
cache.registerInline(fromPath, jvmSignature, toPath)
|
||||
}
|
||||
|
||||
override fun getClassFilePath(internalClassName: String): String = cache.getClassFilePath(internalClassName)
|
||||
|
||||
override fun close(): Unit = cache.close()
|
||||
|
||||
@@ -44,7 +44,6 @@ import org.jetbrains.kotlin.load.kotlin.header.isCompatibleClassKind
|
||||
import org.jetbrains.kotlin.load.kotlin.header.isCompatibleFileFacadeKind
|
||||
import org.jetbrains.kotlin.load.kotlin.header.isCompatiblePackageFacadeKind
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.InlineRegistering
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmClassName
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmClassName.byInternalName
|
||||
import org.jetbrains.kotlin.serialization.Flags
|
||||
@@ -149,14 +148,10 @@ public class IncrementalCacheImpl(
|
||||
private val dependents = arrayListOf<IncrementalCacheImpl>()
|
||||
private val outputDir = requireNotNull(target.outputDir) { "Target is expected to have output directory: $target" }
|
||||
|
||||
private val inlineRegistering = object : InlineRegistering {
|
||||
override fun registerInline(fromPath: String, jvmSignature: String, toPath: String) {
|
||||
inlinedTo.add(fromPath, jvmSignature, toPath)
|
||||
}
|
||||
override fun registerInline(fromPath: String, jvmSignature: String, toPath: String) {
|
||||
inlinedTo.add(fromPath, jvmSignature, toPath)
|
||||
}
|
||||
|
||||
override fun getInlineRegistering(): InlineRegistering = inlineRegistering
|
||||
|
||||
public fun addDependentCache(cache: IncrementalCacheImpl) {
|
||||
dependents.add(cache)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user