[IR] Add IR support for setting parameters.

Use it in the JVM_IR backend for default values code. The parameter
local has to be overwritten for the inliner to work.
This commit is contained in:
Mads Ager
2020-09-01 14:28:07 +02:00
committed by Alexander Udalov
parent db23460fd5
commit 9a93bb3f09
46 changed files with 107 additions and 144 deletions
@@ -76,7 +76,7 @@ class ExpressionTransformer : BaseTransformer<WasmInstruction, WasmCodegenContex
return WasmSetGlobal(fieldName, value)
}
override fun visitSetVariable(expression: IrSetVariable, data: WasmCodegenContext): WasmInstruction {
override fun visitSetValue(expression: IrSetValue, data: WasmCodegenContext): WasmInstruction {
val fieldName = data.getLocalName(expression.symbol.owner)
val value = expression.value.accept(this, data)
return WasmSetLocal(fieldName, value)