[core] gc engine: code simplification