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

Enhance documents #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TianlongLiang
Copy link
Collaborator

No description provided.

/* from the export_func->signature, parse and prepare the arguments array(argv1) */
...

/* lookup the quick aot entry, basically it will reinterpret the function ptr type that will match export_func->signature */
Copy link
Contributor

Choose a reason for hiding this comment

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

lookup_quick_aot_entry is provided by wasm_application.c and is static. Developer must link the libcvmlib.a, but we suppose that he doesn't have to link it.

Suggest to just convert the func_ptr to an function according the prototype, and call it directly, like:

    typedef int32 (*AOTFunc)(int32);
    AOTFunc aot_func = (AOTFunc)export_func->func_ptr;
    int32 result = aot_func(..);


...

if (!app_instance_func(func_name))
Copy link
Contributor

Choose a reason for hiding this comment

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

don't call app_instance_func, it is also provided in wasm_application.c and suppose not to be linked in some scenarios.

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