Skip to content

fix: fixes a lot of llvm assertions#233

Merged
baszalmstra merged 1 commit intomun-lang:masterfrom
baszalmstra:fix/issue_227
Jun 23, 2020
Merged

fix: fixes a lot of llvm assertions#233
baszalmstra merged 1 commit intomun-lang:masterfrom
baszalmstra:fix/issue_227

Conversation

@baszalmstra
Copy link
Collaborator

Fixes a lot of LLVM assertions that were caused by invalid struct assignments due to casts being invalid. I introduced the Value::with_cast method to introduce an explicit cast.

Fixes these issues was a pain because the test just crashed. I had to insert a lot of print statements. I left some of them in (commented out) so in the future, it will be easier to fix these issues.

Closes #227

@codecov
Copy link

codecov bot commented Jun 20, 2020

Codecov Report

Merging #233 into master will decrease coverage by 0.03%.
The diff coverage is 80.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #233      +/-   ##
==========================================
- Coverage   81.14%   81.11%   -0.04%     
==========================================
  Files         182      182              
  Lines       11968    11996      +28     
==========================================
+ Hits         9711     9730      +19     
- Misses       2257     2266       +9     
Impacted Files Coverage Δ
crates/mun_codegen/src/value/string.rs 21.42% <ø> (ø)
crates/mun_codegen_macros/src/lib.rs 0.00% <ø> (ø)
crates/mun_codegen/src/value/mod.rs 53.06% <50.00%> (-1.78%) ⬇️
crates/mun_codegen/src/code_gen/symbols.rs 94.73% <87.50%> (-0.04%) ⬇️
crates/mun_codegen/src/code_gen.rs 89.88% <100.00%> (+0.47%) ⬆️
crates/mun_codegen/src/db.rs 100.00% <100.00%> (ø)
crates/mun_codegen/src/ir/file_group.rs 100.00% <100.00%> (ø)
crates/mun_codegen/src/ir/type_table.rs 92.53% <100.00%> (+0.05%) ⬆️
crates/mun_codegen/src/value/array_value.rs 81.39% <100.00%> (+1.90%) ⬆️
crates/mun_codegen/src/value/global.rs 70.58% <100.00%> (ø)

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 e2a25f2...c173381. Read the comment docs.

@Wodann Wodann self-requested a review June 21, 2020 18:24
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 fixes. I have one remark and one question

@baszalmstra baszalmstra merged commit 72d2dd8 into mun-lang:master Jun 23, 2020
@Wodann Wodann added this to the Mun v0.3.0 milestone Jun 23, 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.

Generated llvm ir triggers llvm assertions

2 participants