refactoring: split huge code generation method into several smaller methods
refactoring: split huge code generation method into several smaller methods

bhy/cython-haoyu,bhy/cython-haoyu,bhy/cython-haoyu,bhy/cython-haoyu