[Decompiler] Clean Up (#271)

* clean up

* fix up until generic ops

* finish kernel

* documentation

* types

* add missing file
This commit is contained in:
water111
2021-02-18 11:35:45 -05:00
committed by GitHub
parent 1b5b9a2469
commit db48d94270
15 changed files with 1230 additions and 784 deletions
@@ -640,10 +640,8 @@ TEST_F(FormRegressionTest, ExprArrayMethod2) {
" )\n"
" )\n"
" (else\n"
// todo - why doesn't this merge?
" (set! v1-40 (or (= v1-1 (quote uint128)) (= v1-1 (quote int128))))\n"
" (cond\n"
" (v1-40\n"
" ((or (= v1-1 (quote uint128)) (= v1-1 (quote int128)))\n"
" (set! s5-8 0)\n"
" (while\n"
" (< s5-8 (-> arg0 length))\n"
@@ -1309,9 +1307,8 @@ TEST_F(FormRegressionTest, ExprArrayMethod3) {
" )\n"
" )\n"
" (else\n"
" (set! v1-40 (or (= v1-1 (quote int128)) (= v1-1 (quote uint128))))\n"
" (cond\n"
" (v1-40\n"
" ((or (= v1-1 (quote int128)) (= v1-1 (quote uint128)))\n"
" (set! s5-8 0)\n"
" (while\n"
" (< s5-8 (-> arg0 length))\n"
@@ -2092,16 +2089,11 @@ TEST_F(FormRegressionTest, ExprValid) {
" (quote #f)\n"
" )\n"
" (else\n"
// todo - why isn't this compacted?
" (set!\n"
" v1-33\n"
" (and\n"
" (!= arg1 type)\n"
" (not (valid? (rtype-of arg0) type (quote #f) (quote #t) 0))\n"
" )\n"
" )\n"
" (cond\n"
" (v1-33\n"
" ((and\t\n"
" (!= arg1 type)\t\n"
" (not (valid? (rtype-of arg0) type (quote #f) (quote #t) 0))\t\n"
" )\n"
" (if\n"
" arg2\n"
" (format\n"
@@ -2483,7 +2475,6 @@ TEST_F(FormRegressionTest, ExprStringToInt) {
" (a0-5 symbol)\n"
" (a1-8 (pointer uint8))\n"
" (a1-14 uint)\n"
" (a1-16 symbol)\n"
" (a1-20 uint)\n"
" (a1-23 uint)\n"
" (a1-33 symbol)\n"
@@ -2529,15 +2520,11 @@ TEST_F(FormRegressionTest, ExprStringToInt) {
" (set! a1-14 v0-0)\n"
" )\n"
" (else\n"
" (set!\n"
" a1-16\n"
" (and\n"
" (>= (-> a0-3 0) (the-as uint 97))\n"
" (>= (the-as uint 102) (-> a0-3 0))\n"
" )\n"
" )\n"
" (cond\n"
" (a1-16\n"
" ((and\t\n"
" (>= (-> a0-3 0) (the-as uint 97))\t\n"
" (>= (the-as uint 102) (-> a0-3 0))\t\n"
" )\n"
" (set! v0-0 (+ (+ (-> a0-3 0) -87) (the-as uint (shl v0-0 4))))\n"
" (set! a1-20 v0-0)\n"
" )\n"