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 up pretty printing and other small changes #311

Merged
merged 4 commits into from
Mar 7, 2021

Conversation

water111
Copy link
Collaborator

@water111 water111 commented Mar 6, 2021

This fixes most of the pretty printing problems. The remaining issues are:

  • Pretty printing's greedy algorithm may still be ugly in cases where many line breaks must be automatically inserted
  • If we have to split a form like (+ a (-> <something-huge>)), we will insert a line break in between + and a, when it is likely better to only break after a. We should define "sticky forms" that like to keep their first argument, if it is possible.

Minor tweaks

  • Recognize and eliminate extra temporaries inserted by GOAL abs macro.

@coveralls
Copy link

coveralls commented Mar 6, 2021

Pull Request Test Coverage Report for Build 628404450

  • 121 of 145 (83.45%) changed or added relevant lines in 11 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 68.717%

Changes Missing Coverage Covered Lines Changed/Added Lines %
decompiler/analysis/cfg_builder.cpp 2 3 66.67%
decompiler/analysis/inline_asm_rewrite.cpp 0 2 0.0%
decompiler/analysis/insert_lets.cpp 19 21 90.48%
decompiler/IR2/IR2_common.h 2 6 33.33%
decompiler/analysis/final_output.cpp 0 4 0.0%
decompiler/IR2/FormExpressionAnalysis.cpp 51 62 82.26%
Totals Coverage Status
Change from base Build 628336906: 0.04%
Covered Lines: 31767
Relevant Lines: 46229

💛 - Coveralls

@water111 water111 marked this pull request as ready for review March 7, 2021 00:49
@water111 water111 merged commit d8a82ee into master Mar 7, 2021
@water111 water111 deleted the w/clean-up-printing branch March 7, 2021 01:16
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