a little warning cleanup
This commit is contained in:
committed by
alexander-gorshenev
parent
ce85975fac
commit
f959c4e43c
+1
-1
@@ -92,7 +92,7 @@ public fun runTopLevelPhases(konanConfig: KonanConfig, environment: KotlinCoreEn
|
||||
markBackingFields(context)
|
||||
val serializer = KonanSerializationUtil(context)
|
||||
context.serializedLinkData =
|
||||
serializer.serializeModule(context.moduleDescriptor!!)
|
||||
serializer.serializeModule(context.moduleDescriptor)
|
||||
DeserializerDriver(context).dumpAllInlineBodies()
|
||||
}
|
||||
phaser.phase(KonanPhase.BACKEND) {
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ open class DeepVisitor<D>(val worker: DeclarationDescriptorVisitor<Boolean, D>)
|
||||
open fun visitChildren(descriptor: DeclarationDescriptor?, data: D): Boolean {
|
||||
if (descriptor == null) return true
|
||||
|
||||
return descriptor!!.accept(this, data)
|
||||
return descriptor.accept(this, data)
|
||||
}
|
||||
|
||||
fun applyWorker(descriptor: DeclarationDescriptor, data: D): Boolean {
|
||||
|
||||
+1
-2
@@ -31,7 +31,6 @@ fun loadMetadata(configuration: CompilerConfiguration, file: File): ModuleDescri
|
||||
|
||||
val reader = MetadataReader(file)
|
||||
|
||||
var metadataAsString: String? = null
|
||||
var moduleName: String? = null
|
||||
val currentAbiVersion = configuration.get(KonanConfigKeys.ABI_VERSION)
|
||||
|
||||
@@ -57,7 +56,7 @@ fun loadMetadata(configuration: CompilerConfiguration, file: File): ModuleDescri
|
||||
val tableOfContentsAsString = reader.string(dataNode)
|
||||
|
||||
val moduleDescriptor =
|
||||
deserializeModule(configuration, {it->loadPackageFragment(reader, it)}, tableOfContentsAsString!!, moduleName!!)
|
||||
deserializeModule(configuration, {it->loadPackageFragment(reader, it)}, tableOfContentsAsString, moduleName)
|
||||
|
||||
return moduleDescriptor
|
||||
}
|
||||
|
||||
+1
-1
@@ -414,7 +414,7 @@ internal class IrDescriptorDeserializer(val context: Context,
|
||||
// Special case: for invoke we need to re-synthesize
|
||||
// the invoke() descriptor.
|
||||
val invoke = functions.singleOrNull {
|
||||
(it as FunctionDescriptor).isFunctionInvoke ?: false
|
||||
(it as FunctionDescriptor).isFunctionInvoke
|
||||
}
|
||||
|
||||
if (invoke != null)
|
||||
|
||||
+3
-3
@@ -772,7 +772,7 @@ internal class IrDeserializer(val context: Context,
|
||||
val arguments = mutableListOf<IrExpression>()
|
||||
|
||||
argumentProtos.forEach {
|
||||
arguments.add(deserializeExpression(it) as IrExpression)
|
||||
arguments.add(deserializeExpression(it))
|
||||
}
|
||||
return IrStringConcatenationImpl(start, end, type, arguments)
|
||||
}
|
||||
@@ -974,7 +974,7 @@ internal class IrDeserializer(val context: Context,
|
||||
|
||||
val body = deserializeStatement(proto.getBody())
|
||||
val function = IrFunctionImpl(start, end, origin,
|
||||
descriptor as FunctionDescriptor, body as IrBody)
|
||||
descriptor, body as IrBody)
|
||||
|
||||
proto.defaultArgumentList.forEach {
|
||||
val expr = deserializeExpression(it.value)
|
||||
@@ -1068,7 +1068,7 @@ internal class IrDeserializer(val context: Context,
|
||||
}
|
||||
|
||||
fun decodeDeclaration(): IrDeclaration {
|
||||
val proto = (rootFunction as DeserializedSimpleFunctionDescriptor).proto
|
||||
val proto = rootFunction.proto
|
||||
|
||||
if (!proto.hasExtension(KonanLinkData.inlineIrBody)) {
|
||||
throw KonanIrDeserializationException("$rootFunction doesn't have ir serialized.")
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ internal class DeserializerDriver(val context: Context) {
|
||||
internal fun dumpAllInlineBodies() {
|
||||
if (! context.phase!!.verbose) return
|
||||
context.log("Now deserializing all inlines for debugging purpose.")
|
||||
context.moduleDescriptor!!.accept(
|
||||
context.moduleDescriptor.accept(
|
||||
InlineBodiesPrinterVisitor(InlineBodyPrinter()), Unit)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user