[Decompiler] Replace type hint system and improve variable types. (#320)

* get gkernel and gkernel-h at least somewhat working in the offline tests

* strip comments from json

* switch hints to casts. online tests passing, offline passing up to gkernel

* variable retyping is added

* fix up casts in lets

* update
This commit is contained in:
water111
2021-03-13 16:10:39 -05:00
committed by GitHub
parent fe336b7b5f
commit 814480f9e5
61 changed files with 1652 additions and 497 deletions
+6 -4
View File
@@ -2273,15 +2273,17 @@ TEST_F(FormRegressionTest, ExprPrintName) {
" (string= (the-as string arg0) (the-as string arg1))\n"
" )\n"
" ((and (= (-> arg0 type) string) (= (-> arg1 type) symbol))\n"
" (string= (the-as string arg0) (-> (+ 65336 (the-as int arg1)) 0))\n"
" (string= (the-as string arg0) (the-as string (-> (the-as (pointer uint32) (+ 65336 "
"(the-as int arg1))))))\n"
" )\n"
" ((and (= (-> arg1 type) string) (= (-> arg0 type) symbol))\n"
" (string= (the-as string arg1) (-> (+ 65336 (the-as int arg0)) 0))\n"
" (string= (the-as string arg1) (the-as string (-> (the-as (pointer uint32) (+ 65336 "
"(the-as int arg0))))))\n"
" )\n"
" )";
test_with_expr(func, type, expected, false, "", {},
parse_hint_json("[\t\t[24, [\"a1\", \"symbol\"]],\n"
"\t\t[39, [\"a0\", \"symbol\"]]]"));
parse_cast_json("[\t\t[24, \"a1\", \"symbol\"],\n"
"\t\t[39, \"a0\", \"symbol\"]]"));
}
TEST_F(FormRegressionTest, ExprProfileBarMethod9) {