-
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
Drop default depth param from execute() #756
Conversation
Codecov Report
@@ Coverage Diff @@
## master #756 +/- ##
==========================================
- Coverage 99.25% 99.25% -0.01%
==========================================
Files 76 76
Lines 11574 11567 -7
==========================================
- Hits 11488 11481 -7
Misses 86 86
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Instance& instance, FuncIdx func_idx, const Value* args, int depth = 0) noexcept; | ||
Instance& instance, FuncIdx func_idx, const Value* args, int depth) noexcept; | ||
|
||
/// Execute a function from an instance starting at default depth of 0. |
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'd add "Arguments and behaviour is the same as execute
."
lib/fizzy/execute.hpp
Outdated
/// Execute a function from an instance starting at default depth of 0. | ||
inline ExecutionResult execute(Instance& instance, FuncIdx func_idx, const Value* args) noexcept | ||
{ | ||
const int depth = 0; |
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.
Not sure it makes a difference, but constexpr?
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.
Looks good to me, but the doxygen improvement should be applied.
In preparation for landing
ExecutionContext
, the default value for depth param is dropped in C++ and the param is completely removed from C and Rust (therefore C and Rust are not able to legally call wasm functions from host functions temporarily).