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

Break aot_create_comp_data into small functions #3

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

no1wudi
Copy link
Collaborator

@no1wudi no1wudi commented Feb 19, 2025

Summary

  • Refactored aot_create_comp_data into smaller, more specialized functions to improve code readability and maintainability.
  • Added helper functions to separately handle the initialization of memories, memory segments, tables, table segments, globals, types, and functions.
  • Each function now has a clear responsibility and returns a boolean indicating success or failure.
  • The main aot_create_comp_data function now logically groups these initialization steps and handles errors more gracefully.

Impact

  • No functional changes - the behavior of the aot_create_comp_data function remains the same.
  • The code is now more modular, making it easier to understand, test, and maintain.
  • Error handling is more consistent, with each step clearly indicating whether it succeeded or failed.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
@buddyliao buddyliao self-requested a review February 25, 2025 05:55
@xiaoxiang781216 xiaoxiang781216 merged commit ec580c6 into open-vela:dev Feb 25, 2025
3 checks passed
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.

3 participants