fix(KT-49225): remove unnecessery boxing.

This commit is contained in:
Artem Kobzar
2021-10-21 06:38:42 +00:00
committed by Space
parent 9515011365
commit 3dbf996ec6
6 changed files with 34 additions and 1 deletions
@@ -41,7 +41,7 @@ class ExportedDefaultParameterStub(val context: JsIrBackendContext) : Declaratio
irIfThenElse(
toParameter.type,
irEqeqeq(
irGet(toParameter),
irGet(toParameter, context.irBuiltIns.anyNType),
irCall(this@ExportedDefaultParameterStub.context.intrinsics.jsUndefined)
),
defaultValue.expression,
@@ -128,6 +128,8 @@ fun IrBuilderWithScope.irGet(type: IrType, variable: IrValueSymbol) =
fun IrBuilderWithScope.irGet(variable: IrValueDeclaration) = irGet(variable.type, variable.symbol)
fun IrBuilderWithScope.irGet(variable: IrValueDeclaration, type: IrType) = irGet(type, variable.symbol)
fun IrBuilderWithScope.irSet(variable: IrValueSymbol, value: IrExpression, origin: IrStatementOrigin = IrStatementOrigin.EQ) =
IrSetValueImpl(startOffset, endOffset, context.irBuiltIns.unitType, variable, value, origin)