transpile: Factor out more pointer-related functions#1521
transpile: Factor out more pointer-related functions#1521kkysen merged 9 commits intoimmunant:masterfrom
Conversation
ff423e5 to
3a55413
Compare
kkysen
left a comment
There was a problem hiding this comment.
By the way, when you do refactoring PRs like this, can you try to split out the pure moves vs. the semantic changes more carefully/fine-grained? It makes it much harder to review when mostly moves are mixed with some other changes (although I'm not sure if there are better ways of viewing the diffs; I tried --color-moved but it doesn't really work usually).
How is this now? |
|
Does anything else need to be done here? |
5e409dd to
750fb81
Compare
a72208c to
133b195
Compare
|
@Rua, I'm going to force push. I need to untangle some commis. The follow-ups I suggested last time need to go in separate commits because they are separate changes, and they're much harder to review when combined into the same commits that are repeatedly rebased. |
b6c3f64 to
464371e
Compare
|
Yes, looks good. |
… in `fn convert_binary_operator`
…match` arm in `fn convert_binary_operator`
…ointer_is_null` Co-authored-by: Rua <ruawhitepaw@gmail.com>
Co-authored-by: Rua <ruawhitepaw@gmail.com>
Co-authored-by: Rua <ruawhitepaw@gmail.com>
This factors out functions for two things: casts involving pointers, and null checking. In the case of
==and!=operators in a non-conditional context (in operators.rs), this also adds special handling for regular pointers, where only function pointers were specially handled previously. This means thatis now translated with the
is_nullmethod as well, instead of with the==operator andcore::ptr::null.