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

feat: use extern functions in dispatch table #90

Merged

Conversation

baszalmstra
Copy link
Collaborator

This adds dynamic linking of malloc through the dispatch table. The use of malloc is still hacked in the runtime but this allows us to integrate all PRs that require it.

@baszalmstra baszalmstra self-assigned this Jan 24, 2020
@codecov
Copy link

codecov bot commented Jan 24, 2020

Codecov Report

Merging #90 into master will decrease coverage by 0.29%.
The diff coverage is 80.74%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #90     +/-   ##
=========================================
- Coverage   74.63%   74.33%   -0.3%     
=========================================
  Files         117      119      +2     
  Lines        8893     9199    +306     
=========================================
+ Hits         6637     6838    +201     
- Misses       2256     2361    +105
Impacted Files Coverage Δ
crates/mun_codegen/src/db.rs 100% <ø> (ø) ⬆️
crates/mun_runtime/src/test.rs 96.29% <ø> (-0.6%) ⬇️
crates/mun_runtime/src/assembly.rs 73.8% <0%> (+1.71%) ⬆️
crates/mun_runtime/src/macros.rs 25.64% <100%> (-0.68%) ⬇️
crates/mun_runtime/src/lib.rs 82.75% <100%> (+5.65%) ⬆️
crates/mun_codegen/src/ir/body.rs 90.02% <100%> (-0.18%) ⬇️
crates/mun_codegen/src/intrinsics/macros.rs 100% <100%> (ø)
crates/mun_codegen/src/ir.rs 50% <42.85%> (-30%) ⬇️
crates/mun_codegen/src/type_info.rs 56.09% <56.09%> (ø)
crates/mun_codegen/src/ir/dispatch_table.rs 90.97% <89.74%> (-1.63%) ⬇️
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a204e63...2307791. Read the comment docs.

Copy link
Collaborator

@Wodann Wodann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! A very clean and minimal implementation.

It might be good to add unit tests for all of the different types that can be input as intrinsic arguments and return types.

crates/mun_codegen/src/intrinsics.rs Outdated Show resolved Hide resolved
crates/mun_codegen/src/type_info.rs Outdated Show resolved Hide resolved
crates/mun_codegen/src/type_info.rs Show resolved Hide resolved
crates/mun_codegen/src/type_info.rs Outdated Show resolved Hide resolved
crates/mun_codegen/src/type_info.rs Outdated Show resolved Hide resolved
crates/mun_codegen/src/ir/body.rs Outdated Show resolved Hide resolved
crates/mun_codegen/src/ir/dispatch_table.rs Outdated Show resolved Hide resolved
crates/mun_codegen/src/ir/dispatch_table.rs Outdated Show resolved Hide resolved
@Wodann
Copy link
Collaborator

Wodann commented Jan 26, 2020

@Wodann Wodann added this to the Mun v0.2 milestone May 14, 2020
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