-
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: Add imported globals to instantiate #624
Conversation
aea94af
to
9f85c86
Compare
Codecov Report
@@ Coverage Diff @@
## master #624 +/- ##
=======================================
Coverage 98.32% 98.32%
=======================================
Files 67 67
Lines 9429 9493 +64
=======================================
+ Hits 9271 9334 +63
- Misses 158 159 +1 |
d86e365
to
496cbcf
Compare
496cbcf
to
4a9d97e
Compare
/// @returns non-NULL pointer to instance in case of success, NULL otherwise. | ||
/// | ||
/// @note | ||
/// Functions in @a imported_functions are allowed to be in any order and allowed to include some | ||
/// functions not required by the module. | ||
/// Functions are matched to module's imports based on their module and name strings. | ||
/// @note | ||
/// Function expects @a imported_globals to be in the order of imports 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.
It's weird how fizzy_resolve_instantiate
currently doesn't resolve globals the way it resolves functions. C++ backend doesn't allow this currently, and I don't know how important it is.
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 agree there should be a function similar to functions to resolve globals in the C++ API. That could be used here.
Probably at that point I'd rename the to instantiates as fizzy_instantiate
(which does resolution) and fizzy_unsafe_instantiate
(which doesn't).
@@ -20,12 +20,12 @@ typedef struct FizzyInstance FizzyInstance; | |||
/// The data type representing numeric values. | |||
/// | |||
/// i64 member is used to represent values of both i32 and i64 type. | |||
union FizzyValue | |||
typedef union FizzyValue |
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.
Hmm, wonder how the Rust binding will act with this, will check.
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.
Seems to be working well.
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.
Haven't done a very thorough review of the last two commits, but in general it looks good to me.
4a9d97e
to
d637e86
Compare
No description provided.