[K/N] Remove some unused code from Context
This commit is contained in:
committed by
Space Team
parent
2437e8a06c
commit
60ee30a28d
-34
@@ -212,24 +212,6 @@ internal class Context(config: KonanConfig) : KonanBackendContext(config) {
|
|||||||
println("\n\n--- ${title} ----------------------\n")
|
println("\n\n--- ${title} ----------------------\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun verifyDescriptors() {
|
|
||||||
// TODO: Nothing here for now.
|
|
||||||
}
|
|
||||||
|
|
||||||
fun printDescriptors() {
|
|
||||||
if (!::moduleDescriptor.isInitialized)
|
|
||||||
return
|
|
||||||
|
|
||||||
separator("Descriptors:")
|
|
||||||
moduleDescriptor.deepPrint()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun printIr() {
|
|
||||||
if (irModule == null) return
|
|
||||||
separator("IR:")
|
|
||||||
irModule!!.accept(DumpIrTreeVisitor(out), "")
|
|
||||||
}
|
|
||||||
|
|
||||||
fun verifyBitCode() {
|
fun verifyBitCode() {
|
||||||
if (::generationState.isInitialized)
|
if (::generationState.isInitialized)
|
||||||
generationState.verifyBitCode()
|
generationState.verifyBitCode()
|
||||||
@@ -240,29 +222,14 @@ internal class Context(config: KonanConfig) : KonanBackendContext(config) {
|
|||||||
generationState.printBitCode()
|
generationState.printBitCode()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun verify() {
|
|
||||||
verifyDescriptors()
|
|
||||||
verifyBitCode()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun print() {
|
|
||||||
printDescriptors()
|
|
||||||
printIr()
|
|
||||||
printBitCode()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun shouldExportKDoc() = config.configuration.getBoolean(KonanConfigKeys.EXPORT_KDOC)
|
fun shouldExportKDoc() = config.configuration.getBoolean(KonanConfigKeys.EXPORT_KDOC)
|
||||||
|
|
||||||
fun shouldVerifyBitCode() = config.configuration.getBoolean(KonanConfigKeys.VERIFY_BITCODE)
|
fun shouldVerifyBitCode() = config.configuration.getBoolean(KonanConfigKeys.VERIFY_BITCODE)
|
||||||
|
|
||||||
fun shouldPrintBitCode() = config.configuration.getBoolean(KonanConfigKeys.PRINT_BITCODE)
|
fun shouldPrintBitCode() = config.configuration.getBoolean(KonanConfigKeys.PRINT_BITCODE)
|
||||||
|
|
||||||
fun shouldPrintLocations() = config.configuration.getBoolean(KonanConfigKeys.PRINT_LOCATIONS)
|
|
||||||
|
|
||||||
fun shouldPrintFiles() = config.configuration.getBoolean(KonanConfigKeys.PRINT_FILES)
|
fun shouldPrintFiles() = config.configuration.getBoolean(KonanConfigKeys.PRINT_FILES)
|
||||||
|
|
||||||
fun shouldProfilePhases() = config.phaseConfig.needProfiling
|
|
||||||
|
|
||||||
fun shouldContainDebugInfo() = config.debug
|
fun shouldContainDebugInfo() = config.debug
|
||||||
fun shouldContainLocationDebugInfo() = shouldContainDebugInfo() || config.lightDebug
|
fun shouldContainLocationDebugInfo() = shouldContainDebugInfo() || config.lightDebug
|
||||||
fun shouldContainAnyDebugInfo() = shouldContainDebugInfo() || shouldContainLocationDebugInfo()
|
fun shouldContainAnyDebugInfo() = shouldContainDebugInfo() || shouldContainLocationDebugInfo()
|
||||||
@@ -283,7 +250,6 @@ internal class Context(config: KonanConfig) : KonanBackendContext(config) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var moduleDFG: ModuleDFG? = null
|
var moduleDFG: ModuleDFG? = null
|
||||||
var externalModulesDFG: ExternalModulesDFG? = null
|
|
||||||
val lifetimes = mutableMapOf<IrElement, Lifetime>()
|
val lifetimes = mutableMapOf<IrElement, Lifetime>()
|
||||||
var devirtualizationAnalysisResult: DevirtualizationAnalysis.AnalysisResult? = null
|
var devirtualizationAnalysisResult: DevirtualizationAnalysis.AnalysisResult? = null
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user