You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously the property implementation would have a backing field with each property declaration in a POU.
For example two properties `foo` and `bar` would insert two variables inside the POU. This would as a side
effect affect the ffi of POUs using properties. Another consideration was duplication of used memory if the backing field ends up not being used in the getter/setter.
Additionally, using different properties to represent the same state/value in different units was not achievable without major drawbacks (i.e. having a temperature field in the POU with 3 separate getters for Celsius, Fahrenheit and Kelvin).
To mitigate that side-effect the backing field has been removed. As a result the resolver has been updated
to identify property references. The already existing lowering logic will then make use of these annotations
and simply lower GET and SET property annotations into concrete method calls.
This implementation also significantly simplifies the implementation of further OOP features regarding properties, e.g. inheriting/extending properties, which would previously result in duplicate/unused backing fields in derived POUs.
---------
Co-authored-by: Volkan <volkanxvs@gmail.com>
Co-authored-by: Volkan Sagcan <volkan.sagcan@bachmann.info>
0 commit comments