[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:
committed by
Alexander Udalov
parent
db23460fd5
commit
9a93bb3f09
+1
-1
@@ -162,7 +162,7 @@ class IrCompileTimeChecker(
|
||||
return visitedStack.contains(parent) || isObject
|
||||
}
|
||||
|
||||
override fun visitSetVariable(expression: IrSetVariable, data: Nothing?): Boolean {
|
||||
override fun visitSetValue(expression: IrSetValue, data: Nothing?): Boolean {
|
||||
return expression.value.accept(this, data)
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ class IrInterpreter(private val irBuiltIns: IrBuiltIns, private val bodyMap: Map
|
||||
is IrEnumEntry -> interpretEnumEntry(this)
|
||||
is IrConst<*> -> interpretConst(this)
|
||||
is IrVariable -> interpretVariable(this)
|
||||
is IrSetVariable -> interpretSetVariable(this)
|
||||
is IrSetValue -> interpretSetVariable(this)
|
||||
is IrTypeOperatorCall -> interpretTypeOperatorCall(this)
|
||||
is IrBranch -> interpretBranch(this)
|
||||
is IrWhileLoop -> interpretWhile(this)
|
||||
@@ -561,7 +561,7 @@ class IrInterpreter(private val irBuiltIns: IrBuiltIns, private val bodyMap: Map
|
||||
return Next
|
||||
}
|
||||
|
||||
private fun interpretSetVariable(expression: IrSetVariable): ExecutionResult {
|
||||
private fun interpretSetVariable(expression: IrSetValue): ExecutionResult {
|
||||
expression.value.interpret().check { return it }
|
||||
|
||||
if (stack.contains(expression.symbol)) {
|
||||
|
||||
Reference in New Issue
Block a user