[JVM_IR] Move all stickyPostconditions into single lowering

`stickyPostconditions` are such conditions that are checked
every time after applying when a new lowering finishes its execution.
Right now we are using them only in JVM, and this is a blocker
for adopting Native approach for lowering execution.

In Native we are using
`SimpleNamedCompilerPhase<in Context : LoggingContext, Input, Output>`
as the common super type for all lowerings. Here we have `Input` and
`Output` that can potentially be different and `stickyPostconditions`
don't have much sense in that case.
This commit is contained in:
Ivan Kylchik
2023-09-20 20:32:34 +02:00
committed by Space Team
parent 6a02a26db8
commit f5bb477459
4 changed files with 39 additions and 34 deletions
@@ -43,20 +43,6 @@ class PropertiesLowering : DeclarationTransformer {
return null
}
companion object {
fun checkNoProperties(irFile: IrFile) {
irFile.acceptVoid(object : IrElementVisitorVoid {
override fun visitElement(element: IrElement) {
element.acceptChildrenVoid(this)
}
override fun visitProperty(declaration: IrProperty) {
error("No properties should remain at this stage")
}
})
}
}
}
class LocalDelegatedPropertiesLowering : IrElementTransformerVoid(), BodyLoweringPass {