[JS IR] Enable directives for IR box tests
This commit is contained in:
@@ -20,6 +20,7 @@ import org.jetbrains.kotlin.ir.declarations.StageController
|
||||
import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFactory
|
||||
import org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator
|
||||
import org.jetbrains.kotlin.ir.util.noUnboundLeft
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsProgram
|
||||
import org.jetbrains.kotlin.js.config.RuntimeDiagnostic
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
|
||||
@@ -31,6 +32,7 @@ class CompilerResult(
|
||||
|
||||
class CompilationOutputs(
|
||||
val jsCode: String,
|
||||
val jsProgram: JsProgram? = null,
|
||||
val sourceMap: String? = null,
|
||||
val dependencies: Iterable<Pair<String, CompilationOutputs>> = emptyList()
|
||||
)
|
||||
|
||||
+2
-1
@@ -113,7 +113,7 @@ class IrModuleToJsTransformer(
|
||||
)
|
||||
}.reversed()
|
||||
|
||||
return CompilationOutputs(mainModule.jsCode, mainModule.sourceMap, dependencies)
|
||||
return CompilationOutputs(mainModule.jsCode, mainModule.jsProgram, mainModule.sourceMap, dependencies)
|
||||
} else {
|
||||
return generateWrappedModuleBody2(
|
||||
modules,
|
||||
@@ -228,6 +228,7 @@ class IrModuleToJsTransformer(
|
||||
|
||||
return CompilationOutputs(
|
||||
jsCode.toString(),
|
||||
program,
|
||||
if(sourceMapsEnabled) sourceMapBuilder.build() else null
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user