remove useless sets (#252)

This commit is contained in:
water111
2021-02-11 14:35:28 -05:00
committed by GitHub
parent 43c1d223a6
commit d9a8f28e52
16 changed files with 423 additions and 266 deletions
@@ -1974,16 +1974,10 @@ TEST_F(FormRegressionTest, ExprValid) {
"(begin\n"
" (set!\n"
" v1-1\n"
" (begin\n"
" (set! arg0 arg0)\n"
" (set! arg1 arg1)\n"
" (set! arg2 arg2)\n"
" (set! arg4 arg4)\n"
" (and\n"
" (>= (the-as uint arg0) (the-as uint __START-OF-TABLE__))\n"
" (< (the-as uint arg0) (the-as uint 134217728))\n"
" )\n"
" )\n"
" )\n"
" (cond\n"
" ((not arg1)\n"
@@ -1991,30 +1985,24 @@ TEST_F(FormRegressionTest, ExprValid) {
" ((nonzero? (logand (the-as int arg0) 3))\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-4\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object (misaligned)~%\"\n"
" arg0\n"
" arg2\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
" ((not v1-1)\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-6\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object (bad address)~%\"\n"
" arg0\n"
" arg2\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
@@ -2029,8 +2017,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" ((nonzero? (logand (the-as int arg0) 15))\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-8\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (misaligned)~%\"\n"
@@ -2038,7 +2024,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg2\n"
" arg1\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
@@ -2052,8 +2037,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" )\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-13\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (bad address)~%\"\n"
@@ -2061,7 +2044,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg2\n"
" arg1\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
@@ -2073,8 +2055,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" ((!= (logand (the-as int arg0) 7) 2)\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-15\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (misaligned)~%\"\n"
@@ -2082,15 +2062,12 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg2\n"
" arg1\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
" ((not v1-1)\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-17\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (bad address)~%\"\n"
@@ -2098,7 +2075,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg2\n"
" arg1\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
@@ -2111,8 +2087,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" (else\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-20\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (misaligned)~%\"\n"
@@ -2120,7 +2094,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg2\n"
" arg1\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
@@ -2129,8 +2102,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" ((!= (logand (the-as int arg0) 7) 4)\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-22\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (misaligned)~%\"\n"
@@ -2138,15 +2109,12 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg2\n"
" arg1\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
" ((not v1-1)\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-24\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (bad address)~%\"\n"
@@ -2154,15 +2122,12 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg2\n"
" arg1\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
" ((and (= arg1 type) (!= (rtype-of arg0) type))\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-31\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (invalid type "
@@ -2172,11 +2137,11 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg1\n"
" (rtype-of arg0)\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
" (else\n"
// todo - why isn't this compacted?
" (set!\n"
" v1-33\n"
" (and\n"
@@ -2188,8 +2153,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" (v1-33\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-37\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (invalid type "
@@ -2199,15 +2162,12 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg1\n"
" (rtype-of arg0)\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
" ((not (type-type? (rtype-of arg0) arg1))\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-41\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (is type '~A' "
@@ -2217,7 +2177,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg1\n"
" (rtype-of arg0)\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
@@ -2228,8 +2187,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" ((>= (the-as uint arg0) (the-as uint v1-44))\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-46\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (not in symbol "
@@ -2238,7 +2195,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg2\n"
" arg1\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"
@@ -2252,8 +2208,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" )\n"
" (if\n"
" arg2\n"
" (set!\n"
" v1-50\n"
" (format\n"
" arg4\n"
" \"ERROR: object #x~X ~S is not a valid object of type '~A' (inside symbol "
@@ -2262,7 +2216,6 @@ TEST_F(FormRegressionTest, ExprValid) {
" arg2\n"
" arg1\n"
" )\n"
" )\n"
" )\n"
" (quote #f)\n"
" )\n"