Introduce infrastructure to separate string table from metadata on JVM

Nothing especially helpful happens here, this is only a big refactoring
introducing a separate string array for the string table, which is currently
always empty, but will contain actual strings soon
This commit is contained in:
Alexander Udalov
2015-09-21 18:22:14 +03:00
parent 5fe958f034
commit 6a8d0fbd75
32 changed files with 177 additions and 113 deletions
@@ -17,12 +17,12 @@
package org.jetbrains.kotlin.rmi.kotlinr
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
import org.jetbrains.kotlin.load.kotlin.incremental.components.JvmPackagePartProto
import org.jetbrains.kotlin.rmi.CompileService
import org.jetbrains.kotlin.rmi.LoopbackNetworkInterface
import org.jetbrains.kotlin.rmi.SOCKET_ANY_FREE_PORT
import java.rmi.server.UnicastRemoteObject
public class RemoteIncrementalCacheServer(val cache: IncrementalCache, port: Int = SOCKET_ANY_FREE_PORT) : CompileService.RemoteIncrementalCache {
init {
@@ -31,7 +31,7 @@ public class RemoteIncrementalCacheServer(val cache: IncrementalCache, port: Int
override fun getObsoletePackageParts(): Collection<String> = cache.getObsoletePackageParts()
override fun getPackagePartData(fqName: String): ByteArray? = cache.getPackagePartData(fqName)
override fun getPackagePartData(fqName: String): JvmPackagePartProto? = cache.getPackagePartData(fqName)
override fun getModuleMappingData(): ByteArray? = cache.getModuleMappingData()
@@ -17,6 +17,7 @@
package org.jetbrains.kotlin.rmi
import org.jetbrains.kotlin.incremental.components.ScopeKind
import org.jetbrains.kotlin.load.kotlin.incremental.components.JvmPackagePartProto
import org.jetbrains.kotlin.modules.TargetId
import java.io.Serializable
import java.rmi.Remote
@@ -34,7 +35,7 @@ public interface CompileService : Remote {
public fun getObsoletePackageParts(): Collection<String>
@Throws(RemoteException::class)
public fun getPackagePartData(fqName: String): ByteArray?
public fun getPackagePartData(fqName: String): JvmPackagePartProto?
@Throws(RemoteException::class)
public fun getModuleMappingData(): ByteArray?
@@ -17,12 +17,13 @@
package org.jetbrains.kotlin.rmi.service
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
import org.jetbrains.kotlin.load.kotlin.incremental.components.JvmPackagePartProto
import org.jetbrains.kotlin.rmi.CompileService
public class RemoteIncrementalCacheClient(val cache: CompileService.RemoteIncrementalCache): IncrementalCache {
override fun getObsoletePackageParts(): Collection<String> = cache.getObsoletePackageParts()
override fun getPackagePartData(fqName: String): ByteArray? = cache.getPackagePartData(fqName)
override fun getPackagePartData(fqName: String): JvmPackagePartProto? = cache.getPackagePartData(fqName)
override fun getModuleMappingData(): ByteArray? = cache.getModuleMappingData()