ref: 8b5f4d4fdea2570a444dec28569f65c43dcd0484
parent: 09e35ed8df87549a9929645dfc378a84a5680d82
author: Ori Bernstein <[email protected]>
date: Fri Aug 9 12:25:30 EDT 2013
Add maybe type to libstd
--- a/libstd/Makefile
+++ b/libstd/Makefile
@@ -7,6 +7,7 @@
extremum.myr \
fmt.myr \
intparse.myr \
+ maybe.myr \
optparse.myr \
rand.myr \
slappend.myr \
@@ -18,9 +19,6 @@
types.myr \
utf.myr \
varargs.myr \
-
-# TEMPORARILY DISABLED: Broken.
- # maybe.myr \
ASMSRC= \
start.s \
--- a/parse/use.c
+++ b/parse/use.c
@@ -176,7 +176,6 @@
die("trying to pickle null type\n");
return;
}
- printf("Pickling %s\n", tystr(ty));
wrbyte(fd, ty->type);
/* tid is generated; don't write */
/* cstrs are left out for now: FIXME */
@@ -700,9 +699,10 @@
if (t->vis != Visintern)
return;
t->vis = Vishidden;
- for (i = 0; i < t->nsub; i++) {
+ for (i = 0; i < t->nsub; i++)
taghidden(t->sub[i]);
- }
+ for (i = 0; i < t->nparam; i++)
+ taghidden(t->param[i]);
if (t->type == Tystruct) {
for (i = 0; i < t->nmemb; i++)
taghidden(decltype(t->sdecls[i]));
@@ -791,6 +791,8 @@
t->vis = Visexport;
for (j = 0; j < t->nsub; j++)
taghidden(t->sub[j]);
+ for (j = 0; j < t->nparam; j++)
+ taghidden(t->param[j]);
}
free(k);
@@ -823,6 +825,7 @@
else
wrstr(f, NULL);
+ printf("type 32 = %s\n", tystr(types[32]));
tagexports(st);
for (i = 0; i < ntypes; i++) {
if (types[i]->vis == Visexport || types[i]->vis == Vishidden) {