[JS IR] Replace canonicalPath with absolutePath
Since canonicalPath is slow, replace it with absolutePath in SourceMaps and CompilationOutputs. ^KT-58187 Fixed
This commit is contained in:
committed by
Space Team
parent
1d9db1b9f8
commit
97024edf8a
+6
-3
@@ -35,7 +35,7 @@ abstract class CompilationOutputs {
|
||||
fun File.writeAsJsFile(out: CompilationOutputs) {
|
||||
parentFile.mkdirs()
|
||||
val jsMapFile = mapForJsFile
|
||||
val jsFile = canonicalFile
|
||||
val jsFile = normalizedAbsoluteFile
|
||||
out.writeJsCode(jsFile, jsMapFile)
|
||||
|
||||
writtenFiles += jsFile
|
||||
@@ -65,11 +65,14 @@ abstract class CompilationOutputs {
|
||||
return allTsDefinitions.toTypeScript(moduleName, moduleKind)
|
||||
}
|
||||
|
||||
private val File.normalizedAbsoluteFile
|
||||
get() = absoluteFile.normalize()
|
||||
|
||||
private val File.mapForJsFile
|
||||
get() = resolveSibling("$name.map").canonicalFile
|
||||
get() = resolveSibling("$name.map").normalizedAbsoluteFile
|
||||
|
||||
private val File.dtsForJsFile
|
||||
get() = resolveSibling("$nameWithoutExtension.d.ts").canonicalFile
|
||||
get() = resolveSibling("$nameWithoutExtension.d.ts").normalizedAbsoluteFile
|
||||
}
|
||||
|
||||
private fun File.copyModificationTimeFrom(from: File) {
|
||||
|
||||
Reference in New Issue
Block a user