Skip to content

Drop default depth param from execute()#756

Merged
chfast merged 3 commits intomasterfrom
depth_param
Mar 19, 2021
Merged

Drop default depth param from execute()#756
chfast merged 3 commits intomasterfrom
depth_param

Conversation

@chfast
Copy link
Copy Markdown
Collaborator

@chfast chfast commented Mar 12, 2021

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).

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 12, 2021

Codecov Report

Merging #756 (02afded) into master (5d09b85) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            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              
Flag Coverage Δ
rust 99.86% <100.00%> (-0.01%) ⬇️
spectests 90.55% <100.00%> (+0.01%) ⬆️
unittests 99.21% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
bindings/rust/src/lib.rs 99.86% <100.00%> (-0.01%) ⬇️
lib/fizzy/capi.cpp 99.27% <100.00%> (ø)
lib/fizzy/execute.hpp 100.00% <100.00%> (ø)
test/unittests/capi_test.cpp 99.87% <100.00%> (ø)
test/utils/fizzy_c_engine.cpp 100.00% <100.00%> (ø)

@chfast chfast requested review from axic and gumb0 March 12, 2021 09:44
Comment thread bindings/rust/src/lib.rs Outdated
Comment thread bindings/rust/src/lib.rs Outdated
Comment thread bindings/rust/src/lib.rs Outdated
Comment thread lib/fizzy/execute.hpp
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.
Copy link
Copy Markdown
Member

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."

Comment thread 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;
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Member

@axic axic left a 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.

@chfast chfast merged commit e9b24a7 into master Mar 19, 2021
@chfast chfast deleted the depth_param branch March 19, 2021 16:43
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