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

Generic constructor for ExecuteFunction #740

Closed
wants to merge 4 commits into from

Conversation

gumb0
Copy link
Collaborator

@gumb0 gumb0 commented Feb 24, 2021

This is one way to simplify host function definitions, allowing to skip host_context parameter and using lambdas with captures.

Another way could be having another host function pointer type like HostFunctionWithoutContextPtr suggested in #716 (review) (it would not allow lambdas with captures.)

But I think leaving C++ API with none of these might be the least confusing, and most consistent with C API.

@codecov
Copy link

codecov bot commented Feb 24, 2021

Codecov Report

Merging #740 (fbdb105) into master (a83bfb3) will increase coverage by 0.00%.
The diff coverage is 91.37%.

@@           Coverage Diff           @@
##           master     #740   +/-   ##
=======================================
  Coverage   99.25%   99.25%           
=======================================
  Files          76       75    -1     
  Lines       11574    11593   +19     
=======================================
+ Hits        11488    11507   +19     
  Misses         86       86           
Flag Coverage Δ
rust 99.86% <ø> (ø)
spectests 90.54% <100.00%> (ø)
unittests 99.21% <91.37%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
test/utils/fizzy_engine.cpp 100.00% <ø> (ø)
tools/wasi/wasi.cpp 59.57% <16.66%> (ø)
lib/fizzy/instantiate.hpp 100.00% <100.00%> (ø)
test/unittests/api_test.cpp 100.00% <100.00%> (ø)
test/unittests/execute_call_test.cpp 100.00% <100.00%> (ø)
test/unittests/execute_control_test.cpp 99.46% <100.00%> (ø)
test/unittests/execute_test.cpp 100.00% <100.00%> (ø)
test/unittests/instantiate_test.cpp 100.00% <100.00%> (ø)

@gumb0 gumb0 force-pushed the execute-function-generic branch 3 times, most recently from fcbb5ca to 152ca15 Compare February 25, 2021 11:55
@gumb0 gumb0 force-pushed the execute-function-noexcept branch from ce0536c to 1996489 Compare March 1, 2021 13:36
@gumb0 gumb0 force-pushed the execute-function-noexcept branch 3 times, most recently from 16e12bc to 0ad804f Compare March 11, 2021 11:21
Base automatically changed from execute-function-noexcept to master March 11, 2021 12:13
@gumb0 gumb0 force-pushed the execute-function-generic branch from 152ca15 to fbdb105 Compare March 11, 2021 15:15
@axic
Copy link
Member

axic commented Apr 19, 2021

@gumb0 do we still want this? It is mostly an improvement for testing since the C++ API is not public.

@gumb0
Copy link
Collaborator Author

gumb0 commented Apr 20, 2021

@gumb0 do we still want this? It is mostly an improvement for testing since the C++ API is not public.

I don't see much benefit, will close it.

@gumb0 gumb0 closed this Apr 20, 2021
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