JVM: do not write trivial SMAPs to classes outside inline funs
where trivial == those that map the file to itself.
This commit is contained in:
+1
-3
@@ -89,8 +89,6 @@ abstract class ClassCodegen protected constructor(
|
||||
)
|
||||
}
|
||||
|
||||
internal var writeSourceMap: Boolean = withinInline
|
||||
|
||||
private var regeneratedObjectNameGenerators = mutableMapOf<String, NameGenerator>()
|
||||
|
||||
fun getRegeneratedObjectNameGenerator(function: IrFunction): NameGenerator {
|
||||
@@ -145,7 +143,7 @@ abstract class ClassCodegen protected constructor(
|
||||
|
||||
generateInnerAndOuterClasses()
|
||||
|
||||
if (writeSourceMap) {
|
||||
if (withinInline || !smap.isTrivial) {
|
||||
visitor.visitSMAP(smap, !context.state.languageVersionSettings.supportsFeature(LanguageFeature.CorrectSourceMappingSyntax))
|
||||
} else {
|
||||
visitor.visitSource(smap.sourceInfo!!.source, null)
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ class IrSourceCompilerForInline(
|
||||
}
|
||||
|
||||
override val lazySourceMapper: SourceMapper
|
||||
get() = codegen.smap.also { codegen.classCodegen.writeSourceMap = true }
|
||||
get() = codegen.smap
|
||||
|
||||
override fun generateLambdaBody(lambdaInfo: ExpressionLambda): SMAPAndMethodNode =
|
||||
FunctionCodegen((lambdaInfo as IrExpressionLambdaImpl).function, codegen.classCodegen, codegen).generate()
|
||||
|
||||
Reference in New Issue
Block a user