ref: 8535643bf09a88c6e83727ba0243772703171ca8
parent: 79b0e2e5efb8d17cefc6924752b97d499f3614e1
author: Ori Bernstein <[email protected]>
date: Mon May 19 20:43:26 EDT 2014
Export symbols with a stable-ish name. Drop the decl id, and just use the type hash for the unique identifier when specializing generics. Also, actually export trait functions so that when imported, they work.
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -1996,8 +1996,10 @@
nodetag(st, n->func.body, ingeneric);
break;
case Nimpl:
- for (i = 0; i < n->impl.ndecls; i++)
+ for (i = 0; i < n->impl.ndecls; i++) {
+ n->impl.decls[i]->decl.vis = Vishidden;
nodetag(st, n->impl.decls[i], 0);
+ }
break;
case Nuse: case Nname:
break;
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -364,7 +364,7 @@
end = buf + 1024;
s = tystr(t);
p += snprintf(p, end - p, "%s", n->decl.name->name.name);
- p += snprintf(p, end - p, "$%zd$%lu", n->decl.did, strhash(s));
+ p += snprintf(p, end - p, "$%lu", strhash(s));
free(s);
name = mkname(n->line, buf);
if (n->decl.name->name.ns)