-
Notifications
You must be signed in to change notification settings - Fork 34
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
capi: Type and global inspection functions #675
Conversation
Codecov Report
@@ Coverage Diff @@
## master #675 +/- ##
========================================
Coverage 99.31% 99.31%
========================================
Files 72 72
Lines 10148 10257 +109
========================================
+ Hits 10078 10187 +109
Misses 70 70
Flags with carried forward coverage won't be shown. Click here to find out more.
|
7ffaf26
to
761bf6e
Compare
include/fizzy/fizzy.h
Outdated
/// @param module Pointer to module. Cannot be NULL. | ||
uint32_t fizzy_get_global_count(const FizzyModule* module); | ||
|
||
/// Get type of the global defined in the module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Get type of the global defined in the module. | |
/// Get type of a given global defined in the module. |
include/fizzy/fizzy.h
Outdated
|
||
/// Import definition. | ||
/// | ||
/// @note Only one member of desc union corresponding to kind is defined for each import. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// @note Only one member of desc union corresponding to kind is defined for each import. | |
/// @note Only one member of `desc` union corresponding to kind is defined for each import. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this helps in doxygen.
include/fizzy/fizzy.h
Outdated
/// Import definition. | ||
/// | ||
/// @note Only one member of desc union corresponding to kind is defined for each import. | ||
typedef struct FizzyImport |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is only used for inspection, perhaps I would call this something like FizzyImportDetails
. The idea is to distinguish this from the regular API used for linking/execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FizzyImportType
perhaps?
26eaea1
to
1763c1d
Compare
include/fizzy/fizzy.h
Outdated
/// Import definition. | ||
/// | ||
/// @note Only one member of `desc` union corresponding to `kind` is defined for each import. | ||
typedef struct FizzyImportType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is type, but perhaps "description" is a better term?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the spec it is called just import
, and importdesc
is functype | tabletype | memtype | globaltype
(i.e. everything in import
except module
and name
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In wasm-c-api it is importtype
, consisting of module
, name
and externtype
https://github.com/WebAssembly/wasm-c-api/blob/fd09246781d8dbf6e9491c90924667f78e9dc6e7/include/wasm.h#L285-L294
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also FizzyImportType
can be seen as consistent with other module definition types: FizzyFunctionType
, FizzyGlobalType
(memory and table don't define *Type
beacuse they use FizzyLimits
directly as a type)
1763c1d
to
251f2cf
Compare
251f2cf
to
aafdc6f
Compare
aafdc6f
to
76e7db1
Compare
Import inspection moved to #683 |
76e7db1
to
8f7ff15
Compare
No description provided.