Fix wrapped descriptors
This commit is contained in:
committed by
Igor Chevdar
parent
2b40ecfd29
commit
d363763420
+2
-2
@@ -6,7 +6,7 @@
|
||||
package org.jetbrains.kotlin.backend.js
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedClassConstructorDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedPropertyDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedFieldDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.ir.DeclarationFactory
|
||||
import org.jetbrains.kotlin.backend.common.ir.copyTo
|
||||
import org.jetbrains.kotlin.backend.common.ir.copyTypeParametersFrom
|
||||
@@ -51,7 +51,7 @@ class JsDeclarationFactory : DeclarationFactory {
|
||||
}
|
||||
|
||||
private fun createPropertyWithBackingField(name: Name, visibility: Visibility, parent: IrClass, fieldType: IrType, origin: IrDeclarationOrigin): IrField {
|
||||
val descriptor = WrappedPropertyDescriptor()
|
||||
val descriptor = WrappedFieldDescriptor()
|
||||
val symbol = IrFieldSymbolImpl(descriptor)
|
||||
|
||||
return IrFieldImpl(
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ package org.jetbrains.kotlin.ir.backend.js
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedClassConstructorDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedClassDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedPropertyDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedFieldDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedVariableDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.ir.DeclarationFactory
|
||||
import org.jetbrains.kotlin.backend.common.ir.SharedVariablesManager
|
||||
@@ -143,7 +143,7 @@ class JsSharedVariablesManager(val builtIns: IrBuiltIns, val implicitDeclaration
|
||||
}
|
||||
|
||||
private fun createClosureBoxPropertyDeclaration(): IrField {
|
||||
val descriptor = WrappedPropertyDescriptor()
|
||||
val descriptor = WrappedFieldDescriptor()
|
||||
val symbol = IrFieldSymbolImpl(descriptor)
|
||||
val fieldName = Name.identifier("v")
|
||||
return IrFieldImpl(
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.ir.backend.js.lower
|
||||
import org.jetbrains.kotlin.backend.common.DeclarationContainerLoweringPass
|
||||
import org.jetbrains.kotlin.backend.common.FileLoweringPass
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedClassConstructorDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedPropertyDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedFieldDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.ir.copyParameterDeclarationsFrom
|
||||
import org.jetbrains.kotlin.backend.common.lower.createIrBuilder
|
||||
import org.jetbrains.kotlin.backend.common.lower.irBlockBody
|
||||
@@ -60,7 +60,7 @@ class EnumUsageLowering(val context: JsIrBackendContext) : FileLoweringPass {
|
||||
}
|
||||
|
||||
private fun createFieldForEntry(entry: IrEnumEntry, irClass: IrClass): IrField {
|
||||
val descriptor = WrappedPropertyDescriptor()
|
||||
val descriptor = WrappedFieldDescriptor()
|
||||
val symbol = IrFieldSymbolImpl(descriptor)
|
||||
return entry.run {
|
||||
IrFieldImpl(startOffset, endOffset, origin, symbol, name, irClass.defaultType, Visibilities.PUBLIC, false, true, true).also {
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ package org.jetbrains.kotlin.ir.backend.js.lower
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.FileLoweringPass
|
||||
import org.jetbrains.kotlin.backend.common.atMostOne
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedPropertyDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.descriptors.WrappedFieldDescriptor
|
||||
import org.jetbrains.kotlin.backend.common.ir.copyTo
|
||||
import org.jetbrains.kotlin.descriptors.Visibilities
|
||||
import org.jetbrains.kotlin.ir.IrElement
|
||||
@@ -157,7 +157,7 @@ class ThrowableSuccessorsLowering(context: JsIrBackendContext) : FileLoweringPas
|
||||
}
|
||||
|
||||
private fun createBackingField(declaration: IrClass, name: Name, type: IrType): IrField {
|
||||
val fieldDescriptor = WrappedPropertyDescriptor()
|
||||
val fieldDescriptor = WrappedFieldDescriptor()
|
||||
val fieldSymbol = IrFieldSymbolImpl(fieldDescriptor)
|
||||
val fieldDeclaration = IrFieldImpl(
|
||||
UNDEFINED_OFFSET,
|
||||
|
||||
+1
-1
@@ -763,7 +763,7 @@ internal class SuspendFunctionsLowering(val context: JsIrBackendContext): FileLo
|
||||
}
|
||||
|
||||
private fun addField(name: Name, type: IrType, isMutable: Boolean): IrField {
|
||||
val descriptor = WrappedPropertyDescriptor()
|
||||
val descriptor = WrappedFieldDescriptor()
|
||||
val symbol = IrFieldSymbolImpl(descriptor)
|
||||
return IrFieldImpl(
|
||||
irFunction.startOffset,
|
||||
|
||||
+2
-2
@@ -90,7 +90,7 @@ internal class DeepCopyIrTreeWithSymbolsForInliner(val context: Context,
|
||||
}
|
||||
|
||||
override fun visitField(declaration: IrField) {
|
||||
(declaration.descriptor as WrappedPropertyDescriptor).bind(declaration)
|
||||
(declaration.descriptor as WrappedFieldDescriptor).bind(declaration)
|
||||
declaration.acceptChildrenVoid(this)
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ internal class DeepCopyIrTreeWithSymbolsForInliner(val context: Context,
|
||||
WrappedClassDescriptor(descriptor.annotations, descriptor.source)
|
||||
|
||||
override fun remapDeclaredField(descriptor: PropertyDescriptor) =
|
||||
WrappedPropertyDescriptor(descriptor.annotations, descriptor.source)
|
||||
WrappedFieldDescriptor(descriptor.annotations, descriptor.source)
|
||||
|
||||
override fun remapDeclaredSimpleFunction(descriptor: FunctionDescriptor) =
|
||||
WrappedSimpleFunctionDescriptor(descriptor.annotations, descriptor.source)
|
||||
|
||||
Reference in New Issue
Block a user