ref: e6cf1fd25f02f11859ad5071ec51d5428cfee79a
parent: d67ec38ce3240abf440e6ba7b6aae7a1d28b3c5f
author: Ori Bernstein <[email protected]>
date: Tue Feb 25 19:12:46 EST 2014
Preserve 'istraitfn' in usefiles. Now we get an error if we don't have the things implemented on imported traits.
--- a/parse/use.c
+++ b/parse/use.c
@@ -259,10 +259,10 @@
typickle(fd, tr->param);
wrint(fd, tr->nmemb);
for (i = 0; i < tr->nmemb; i++)
- pickle(fd, tr->memb[i]);
+ wrsym(fd, tr->memb[i]);
wrint(fd, tr->nfuncs);
for (i = 0; i < tr->nfuncs; i++)
- pickle(fd, tr->funcs[i]);
+ wrsym(fd, tr->funcs[i]);
}
static void wrtype(FILE *fd, Type *ty)
@@ -380,10 +380,10 @@
tr->param = tyunpickle(fd);
n = rdint(fd);
for (i = 0; i < n; i++)
- lappend(&tr->memb, &tr->nmemb, unpickle(fd));
+ lappend(&tr->memb, &tr->nmemb, rdsym(fd));
n = rdint(fd);
for (i = 0; i < n; i++)
- lappend(&tr->funcs, &tr->nfuncs, unpickle(fd));
+ lappend(&tr->funcs, &tr->nfuncs, rdsym(fd));
htput(trmap, (void*)uid, tr);
return tr;
}
@@ -492,6 +492,7 @@
wrint(fd, n->decl.isconst);
wrint(fd, n->decl.isgeneric);
wrint(fd, n->decl.isextern);
+ wrint(fd, n->decl.istraitfn);
/* init */
pickle(fd, n->decl.init);
@@ -622,6 +623,7 @@
n->decl.isconst = rdint(fd);
n->decl.isgeneric = rdint(fd);
n->decl.isextern = rdint(fd);
+ n->decl.istraitfn = rdint(fd);
/* init */
n->decl.init = unpickle(fd);