shithub: mc

Download patch

ref: 7c0b1067c6f67044cc25d5d4d4e5f1c4e7e98968
parent: 5d325b59af353ea90e4a6f974c50944e822148d5
author: Ori Bernstein <[email protected]>
date: Mon Jul 9 04:44:28 EDT 2012

Rename Larray to Lseq.

    We're moving on support for aggregate literals.

--- a/8/isel.c
+++ b/8/isel.c
@@ -763,7 +763,7 @@
                         fprintf(fd, "%s:\n", lbl);
                         writeblob(fd, v->lit.strval, strlen(v->lit.strval));
                         break;
-        case Larray:
+        case Lseq:
         case Lfunc:
                         die("Generating this shit ain't ready yet ");
     }
--- a/8/simp.c
+++ b/8/simp.c
@@ -847,7 +847,7 @@
                 case Lchr: case Lbool: case Lint:
                     r = n;
                     break;
-                case Lstr: case Larray: case Lflt:
+                case Lstr: case Lseq: case Lflt:
                     r = bloblit(s, n);
                     break;
                 case Lfunc:
--- a/parse/dump.c
+++ b/parse/dump.c
@@ -173,8 +173,8 @@
                     fprintf(fd, " Lfunc\n");
                     outnode(n->lit.fnval, fd, depth+1);
                     break;
-                case Larray:
-                    fprintf(fd, " Larray\n");
+                case Lseq:
+                    fprintf(fd, " Lseq\n");
                     outnode(n->lit.arrval, fd, depth+1);
                     break;
                 default: die("Bad literal type"); break;
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -173,7 +173,7 @@
         case Lflt:      return tylike(mktyvar(n->line), Tyfloat32);             break;
         case Lstr:      return mktyslice(n->line, mkty(n->line, Tychar));       break;
         case Lfunc:     return n->lit.fnval->func.type;                         break;
-        case Larray:    return NULL; break;
+        case Lseq:      return NULL; break;
     };
     return NULL;
 }
@@ -529,7 +529,7 @@
         case Olit:      /* <lit>:@a::tyclass -> @a */
             switch (args[0]->lit.littype) {
                 case Lfunc: infernode(args[0]->lit.fnval, NULL, NULL); break;
-                case Larray: die("array types not implemented yet"); break;
+                case Lseq: die("array types not implemented yet"); break;
                 default: break;
             }
             settype(n, type(args[0]));
@@ -897,7 +897,7 @@
             settype(n, tyfix(n, type(n)));
             switch (n->lit.littype) {
                 case Lfunc:     typesub(n->lit.fnval); break;
-                case Larray:    typesub(n->lit.arrval); break;
+                case Lseq:      typesub(n->lit.arrval); break;
                 default:        break;
             }
             break;
--- a/parse/lits.def
+++ b/parse/lits.def
@@ -4,4 +4,4 @@
 L(Lflt)
 L(Lstr)
 L(Lfunc)
-L(Larray)
+L(Lseq)
--- a/parse/pickle.c
+++ b/parse/pickle.c
@@ -311,7 +311,7 @@
                 case Lstr:      wrstr(fd, n->lit.strval);       break;
                 case Lbool:     wrbool(fd, n->lit.boolval);     break;
                 case Lfunc:     pickle(n->lit.fnval, fd);       break;
-                case Larray:    pickle(n->lit.arrval, fd);      break;
+                case Lseq:      pickle(n->lit.arrval, fd);      break;
             }
             break;
         case Nloopstmt:
@@ -424,7 +424,7 @@
                 case Lstr:      n->lit.strval = rdstr(fd);       break;
                 case Lbool:     n->lit.boolval = rdbool(fd);     break;
                 case Lfunc:     n->lit.fnval = unpickle(fd);       break;
-                case Larray:    n->lit.arrval = unpickle(fd);      break;
+                case Lseq:      n->lit.arrval = unpickle(fd);      break;
             }
             break;
         case Nloopstmt:
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -102,7 +102,7 @@
         case Nlit:
             switch (n->lit.littype) {
                 case Lfunc:     fixup(n->lit.fnval);          break;
-                case Larray:    fixup(n->lit.arrval);         break;
+                case Lseq:      fixup(n->lit.arrval);         break;
                 case Lchr: case Lint: case Lflt: case Lstr: case Lbool:
                     break;
             }
@@ -182,7 +182,7 @@
                 case Lstr:      r->lit.strval = n->lit.strval;       break;
                 case Lbool:     r->lit.boolval = n->lit.boolval;     break;
                 case Lfunc:     r->lit.fnval = specializenode(n->lit.fnval, tsmap);       break;
-                case Larray:    r->lit.arrval = specializenode(n->lit.arrval, tsmap);     break;
+                case Lseq:      r->lit.arrval = specializenode(n->lit.arrval, tsmap);     break;
             }
             break;
         case Nifstmt: