Fix code review
Minor fixes Fix JVM IR BE Fix NATIVE
This commit is contained in:
@@ -55,24 +55,6 @@ class IrVariableImpl(
|
||||
isLateinit = symbol.descriptor.isLateInit
|
||||
)
|
||||
|
||||
constructor(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
origin: IrDeclarationOrigin,
|
||||
symbol: IrVariableSymbol,
|
||||
type: IrType,
|
||||
initializer: IrExpression?
|
||||
) : this(
|
||||
startOffset, endOffset, origin, symbol,
|
||||
symbol.descriptor.name, type,
|
||||
isVar = symbol.descriptor.isVar,
|
||||
isConst = symbol.descriptor.isConst,
|
||||
isLateinit = symbol.descriptor.isLateInit
|
||||
) {
|
||||
this.initializer = initializer
|
||||
}
|
||||
|
||||
@Deprecated("Use constructor which takes symbol instead of descriptor")
|
||||
constructor(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
@@ -81,7 +63,6 @@ class IrVariableImpl(
|
||||
type: IrType
|
||||
) : this(startOffset, endOffset, origin, IrVariableSymbolImpl(descriptor), type)
|
||||
|
||||
@Deprecated("Use constructor which takes symbol instead of descriptor")
|
||||
constructor(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
|
||||
+2
-7
@@ -5,14 +5,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.declarations.lazy
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.ir.symbols.*
|
||||
import org.jetbrains.kotlin.ir.util.DeclarationStubGenerator
|
||||
import org.jetbrains.kotlin.ir.util.ReferenceSymbolTable
|
||||
import org.jetbrains.kotlin.ir.util.SymbolTable
|
||||
import org.jetbrains.kotlin.ir.util.*
|
||||
|
||||
|
||||
class IrLazySymbolTable(private val originalTable: SymbolTable) : ReferenceSymbolTable by originalTable {
|
||||
|
||||
@@ -158,7 +158,6 @@ fun IrFunction.createParameterDeclarations() {
|
||||
|
||||
assert(valueParameters.isEmpty())
|
||||
descriptor.valueParameters.mapTo(valueParameters) { it.irValueParameter() }
|
||||
// valueParameters.mapTo(valueParameters) { it.descriptor.irValueParameter() }
|
||||
|
||||
assert(typeParameters.isEmpty())
|
||||
descriptor.typeParameters.mapTo(typeParameters) {
|
||||
@@ -331,7 +330,6 @@ fun IrCall.isSuperToAny() = superQualifier?.let { this.symbol.owner.isFakeOverri
|
||||
|
||||
fun IrDeclaration.isEffectivelyExternal(): Boolean {
|
||||
return when (this) {
|
||||
is IrConstructor -> isExternal || parent is IrDeclaration && parent.isEffectivelyExternal()
|
||||
is IrFunction -> isExternal || parent is IrDeclaration && parent.isEffectivelyExternal()
|
||||
is IrField -> isExternal || parent is IrDeclaration && parent.isEffectivelyExternal()
|
||||
is IrClass -> isExternal || parent is IrDeclaration && parent.isEffectivelyExternal()
|
||||
@@ -339,7 +337,7 @@ fun IrDeclaration.isEffectivelyExternal(): Boolean {
|
||||
}
|
||||
}
|
||||
|
||||
val IrDeclaration.isDynamic get() = this is IrFunction && dispatchReceiverParameter?.type is IrDynamicType
|
||||
fun IrDeclaration.isDynamic() = this is IrFunction && dispatchReceiverParameter?.type is IrDynamicType
|
||||
|
||||
fun IrValueParameter.copy(newDescriptor: ParameterDescriptor): IrValueParameter {
|
||||
assert(this.descriptor.type == newDescriptor.type)
|
||||
|
||||
Reference in New Issue
Block a user