refactor: stat
declarative macros to functions
#3923
Merged
stat
declarative macros to functions
#3923