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

[Decompiler] Fix coloring moves #281

Merged
merged 2 commits into from
Feb 25, 2021
Merged

[Decompiler] Fix coloring moves #281

merged 2 commits into from
Feb 25, 2021

Conversation

water111
Copy link
Collaborator

@water111 water111 commented Feb 24, 2021

The expression propagator doesn't attempt to run on reg-to-reg consuming moves and instead lets the FormStack deal with this. The FormStack already did the right thing for pop_reg, with the recursive call to pop_reg, but it did not totally handle two cases, which were added:

  1. The case where there is a coloring move result to get the return value. Now we can loop up the expression stack following consecutive coloring sets.
  2. Just eliminating these.
    TODO - there is an issue with this:
(set! x (if a (set! y z)))

will probably be decompiled as (set! x (if a z)) and eliminate the set! y.

@coveralls
Copy link

coveralls commented Feb 24, 2021

Pull Request Test Coverage Report for Build 597772893

  • 56 of 73 (76.71%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.01%) to 68.827%

Changes Missing Coverage Covered Lines Changed/Added Lines %
decompiler/IR2/FormStack.cpp 37 54 68.52%
Files with Coverage Reduction New Missed Lines %
decompiler/IR2/Form.h 1 94.92%
decompiler/IR2/FormStack.cpp 1 77.23%
Totals Coverage Status
Change from base Build 589473161: 0.01%
Covered Lines: 30209
Relevant Lines: 43891

💛 - Coveralls

@water111 water111 merged commit f6a6b4c into master Feb 25, 2021
@water111 water111 deleted the w/fix-coloring-moves branch February 25, 2021 00:08
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