Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFC] Make Generator class becomes ABC #336

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

jerryzj
Copy link
Collaborator

@jerryzj jerryzj commented Jun 5, 2024

  • The following member functions will return NotImplemented if not implemented in derived classes to let user aware that the function call is not functioning

    • write()
    • write_title()
    • gen_prologue()
    • inst_group_prologue()
    • inst_group_epilogue()
    • post_gen()
  • The func function is set as abstract method, all the derived classes shoule have their own implementation

  • The original func implementation is copied to DocGenerator and APITestGenerator and replace the call of base func() implementation

- The following member functions will return NotImplemented if not
  implemented in derived classes to let user aware that the function
  call is not functioning
  - write()
  - write_title()
  - gen_prologue()
  - inst_group_prologue()
  - inst_group_epilogue()
  - post_gen()

- The func function is set as abstract method, all the derived classes
  shoule have their own implementation

- The original func implementation is copied to DocGenerator and
  APITestGenerator and replace the call of base func() implementation

Signed-off-by: Jerry Zhang Jian <jerry.zhangjian@sifive.com>
Copy link
Collaborator

@kito-cheng kito-cheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, waiting CI run :)

@kito-cheng kito-cheng merged commit 910b3c8 into riscv-non-isa:main Jun 5, 2024
4 checks passed
@jerryzj jerryzj deleted the dev/jerryzj/generator-abc branch June 12, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants