Partially Implement Decompiler Type Analysis (#90)

* implement basic framework for decompiler type analysis

* before type system changes

* add some decompiler stuff to the type system

* try algorithm on a few functions
This commit is contained in:
water111
2020-10-18 15:44:19 -04:00
committed by GitHub
parent 3e798cd3aa
commit fc1a8f37c6
19 changed files with 1064 additions and 36 deletions
+10
View File
@@ -26,6 +26,13 @@ std::string IR::print(const LinkedObjectFile& file) const {
return pretty_print::to_string(to_form(file));
}
bool IR::update_types(TypeMap& reg_types, DecompilerTypeSystem& dts, LinkedObjectFile& file) const {
(void)reg_types;
(void)dts;
(void)file;
return false;
}
goos::Object IR_Failed::to_form(const LinkedObjectFile& file) const {
(void)file;
return pretty_print::build_list("INVALID-OPERATION");
@@ -283,6 +290,9 @@ goos::Object IR_IntMath1::to_form(const LinkedObjectFile& file) const {
case ABS:
math_operator = "abs.si";
break;
case NEG:
math_operator = "-.i";
break;
default:
assert(false);
}