[Dy2St] Move more transformer specific utilities to transformers dir #61242
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Description
同 #61193,将剩余的仅转写相关的 utilities 移动到
transformers/utils
至此,
utils
和transformers/utils
都控制在了可接受的 600 行左右,且各自职责清晰utils
处于底层,任何位置皆可引用transformers/utils
仅用于 transformers 目录,不应该在其他位置引用(除了单测),如果想要用于其它模块,需要放置在utils
而不是transformers/utils
,utils
保留的少数针对于 AST Node 的函数就是由于此原因由于短期内动转静不会有较大的迭代,utils 控制在 600 行左右应该不会继续膨胀(老 IR 退场后甚至能清更多代码),如果后续迭代超过 1000 行,则应继续考虑拆分 utils 了
PCard-66972