React to review comments
This commit is contained in:
+1
-1
@@ -112,7 +112,7 @@ class JsDeclarationFactory : DeclarationFactory {
|
||||
val newValueParameters = mutableListOf(outerThisValueParameter)
|
||||
|
||||
for (p in oldConstructor.valueParameters) {
|
||||
newValueParameters += p.copyTo(newConstructor, 1)
|
||||
newValueParameters += p.copyTo(newConstructor, index = p.index + 1)
|
||||
}
|
||||
|
||||
newConstructor.valueParameters += newValueParameters
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ class ModuleIndex(val module: IrModuleFragment) {
|
||||
|
||||
override fun visitDeclaration(declaration: IrDeclaration) {
|
||||
super.visitDeclaration(declaration)
|
||||
declarationToFile[declaration.descriptor] = currentFile!!.name
|
||||
declarationToFile[declaration.descriptor] = currentFile!!.path
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,13 +7,13 @@ package org.jetbrains.kotlin.ir.backend.js.transformers.irToJs
|
||||
|
||||
import org.jetbrains.kotlin.ir.backend.js.utils.JsGenerationContext
|
||||
import org.jetbrains.kotlin.ir.declarations.IrFile
|
||||
import org.jetbrains.kotlin.ir.declarations.name
|
||||
import org.jetbrains.kotlin.ir.declarations.path
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsDeclarationScope
|
||||
import org.jetbrains.kotlin.js.backend.ast.JsStatement
|
||||
|
||||
class IrFileToJsTransformer : BaseIrElementToJsNodeTransformer<JsStatement, JsGenerationContext> {
|
||||
override fun visitFile(declaration: IrFile, context: JsGenerationContext): JsStatement {
|
||||
val fileContext = context.newDeclaration(JsDeclarationScope(context.currentScope, "scope for file ${declaration.name}"))
|
||||
val fileContext = context.newDeclaration(JsDeclarationScope(context.currentScope, "scope for file ${declaration.path}"))
|
||||
val block = fileContext.currentBlock
|
||||
|
||||
declaration.declarations.forEach {
|
||||
|
||||
Reference in New Issue
Block a user