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: unary operators #136

Merged
merged 1 commit into from
Apr 19, 2020
Merged

feat: unary operators #136

merged 1 commit into from
Apr 19, 2020

Conversation

wackbyte
Copy link
Contributor

I think I've gotten codegen done, but it seems that the type of expressions with unary operators is, for whatever reason, unknown.

@codecov
Copy link

codecov bot commented Apr 15, 2020

Codecov Report

Merging #136 into master will increase coverage by 0.20%.
The diff coverage is 82.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   83.39%   83.59%   +0.20%     
==========================================
  Files         158      158              
  Lines       10646    10713      +67     
==========================================
+ Hits         8878     8956      +78     
+ Misses       1768     1757      -11     
Impacted Files Coverage Δ
crates/mun_hir/src/diagnostics.rs 70.38% <66.66%> (-0.12%) ⬇️
crates/mun_hir/src/ty/infer.rs 79.17% <74.19%> (-0.13%) ⬇️
crates/mun_codegen/src/ir/body.rs 84.34% <92.85%> (+0.44%) ⬆️
crates/mun_codegen/src/test.rs 97.59% <100.00%> (+0.02%) ⬆️
crates/mun_hir/src/ty/tests.rs 96.20% <100.00%> (+0.09%) ⬆️
crates/mun_hir/src/expr.rs 90.70% <0.00%> (+0.64%) ⬆️
...mun_hir/src/expr/validator/uninitialized_access.rs 86.23% <0.00%> (+1.44%) ⬆️
crates/mun_syntax/src/ast/generated.rs 78.78% <0.00%> (+1.64%) ⬆️
crates/mun_syntax/src/ast/expr_extensions.rs 92.07% <0.00%> (+3.65%) ⬆️

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 c17448d...cc6ac75. Read the comment docs.

@baszalmstra
Copy link
Collaborator

Seems to be because this is left unimplemented:

Expr::UnaryOp { .. } => Ty::Unknown,

@wackbyte
Copy link
Contributor Author

wackbyte commented Apr 15, 2020

Looks like CI failed due to a network error.

crates/mun_codegen/src/ir/body.rs Show resolved Hide resolved
crates/mun_codegen/src/ir/body.rs Show resolved Hide resolved
crates/mun_hir/src/ty/infer.rs Outdated Show resolved Hide resolved
@wackbyte
Copy link
Contributor Author

It looks like not is actually implemented for integers in Rust, so I'll go ahead and add that.

@Wodann
Copy link
Collaborator

Wodann commented Apr 16, 2020

I checked master, but the mun_abi/c submodule is currently set to b437e21. You updated it to the commit of @baszalmstra's WIP array support, but since that is not in master yet, the abi should not be updated to that commit yet.

crates/mun_hir/src/ty/infer.rs Outdated Show resolved Hide resolved
crates/mun_codegen/src/ir/body.rs Show resolved Hide resolved
crates/mun_hir/src/ty/infer.rs Outdated Show resolved Hide resolved
crates/mun_hir/src/ty/infer.rs Outdated Show resolved Hide resolved
@baszalmstra baszalmstra self-assigned this Apr 18, 2020
crates/mun_codegen/src/ir/body.rs Show resolved Hide resolved
crates/mun_codegen/src/test.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

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

Yes! I approved it!

However, there appears to be a merge conflict. Can you rebase this branch on master?

@wackbyte
Copy link
Contributor Author

Sorry about this, but I (still) don't know how to rebase. Can you give me some steps on doing that?

@baszalmstra
Copy link
Collaborator

Sure, does this help: https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request

Squashing your changes is not necessary.

@baszalmstra baszalmstra merged commit 134bc5a into mun-lang:master Apr 19, 2020
@wackbyte wackbyte deleted the unary-ops branch April 19, 2020 16:43
@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.

3 participants