Add basic FIR -> IR converter with a set of text tests

Tests duplicate IrTextTestCaseGenerated
#KT-24065 Fixed
This commit is contained in:
Mikhail Glukhikh
2019-04-05 13:37:48 +03:00
parent 92adfd8946
commit 881073b1c9
305 changed files with 22829 additions and 57 deletions
@@ -413,12 +413,15 @@ open class SymbolTable : ReferenceSymbolTable {
origin: IrDeclarationOrigin,
descriptor: ParameterDescriptor,
type: IrType,
varargElementType: IrType? = null
varargElementType: IrType? = null,
valueParameterFactory: (IrValueParameterSymbol) -> IrValueParameter = {
IrValueParameterImpl(startOffset, endOffset, origin, it, type, varargElementType)
}
): IrValueParameter =
valueParameterSymbolTable.declareLocal(
descriptor,
{ IrValueParameterSymbolImpl(descriptor) },
{ IrValueParameterImpl(startOffset, endOffset, origin, it, type, varargElementType) }
valueParameterFactory
)
fun introduceValueParameter(irValueParameter: IrValueParameter) {
@@ -442,12 +445,16 @@ open class SymbolTable : ReferenceSymbolTable {
endOffset: Int,
origin: IrDeclarationOrigin,
descriptor: VariableDescriptor,
type: IrType
type: IrType,
variableFactory: (IrVariableSymbol) -> IrVariable = {
IrVariableImpl(startOffset, endOffset, origin, it, type)
}
): IrVariable =
variableSymbolTable.declareLocal(
descriptor,
{ IrVariableSymbolImpl(descriptor) },
{ IrVariableImpl(startOffset, endOffset, origin, it, type) }
variableFactory
)
fun declareVariable(