optimize(tool): optimize fastcodec->frugal replacement #1696
+27
−20
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.
What type of PR is this?
optimize
Check the PR title.
(Optional) Translate the PR title into Chinese.
optimize(tool): 优化了生成工具关于 frugal 替换参数的实现逻辑
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
Previously: gen-frugal was used to decide whether to replace the implementation of structs with frugal based on annotations, and -frugal-struct xxx was used to pass the struct name when executing a command.
Now: Only the -frugal-struct parameter is retained, with different inputs achieving different effects:
And also some template optimizations:
zh(optional):
把 -gen-frugal 和 -frugal-struct 合并了
之前:有 gen-frugal 来决定是否根据注解给结构体替换 frugal 实现,也有 -frugal-struct xxx 执行命令行时传入结构体名来替换
现在:只保留 -frugal-struct 参数,不同输入达到不同效果:
模板上也有一些改动:
(Optional) Which issue(s) this PR fixes:
(optional) The PR that updates user documentation: