[decomp] Small fixes (#541)

* fix a few bugs

* fix local vars missing in top level

* more small fixes

* support missing inline array access case

* one more fix
This commit is contained in:
water111
2021-05-30 19:57:11 -04:00
committed by GitHub
parent c910a22c1b
commit b1a76b2291
32 changed files with 298 additions and 117 deletions
+2 -2
View File
@@ -1739,7 +1739,7 @@ TEST_F(FormRegressionTest, ExprArrayMethod0) {
" int\n"
" (+\n"
" (-> arg1 size)\n"
" (the-as uint (* arg3 (if (type-type? arg2 number) (-> arg2 size) 4)))\n"
" (the-as uint (* arg3 (if (type-type? arg2 number) (the-as int (-> arg2 size)) 4)))\n"
" )\n"
" )\n"
" )\n"
@@ -1817,7 +1817,7 @@ TEST_F(FormRegressionTest, ExprArrayMethod5) {
" (-> arg0 allocated-length)\n"
" (if\n"
" (type-type? (-> arg0 content-type) number)\n"
" (-> arg0 content-type size)\n"
" (the-as int (-> arg0 content-type size))\n"
" 4\n"
" )\n"
" )\n"