shithub: mc

Download patch

ref: 129d74197a3de99fab0a386ebf152a06b3d4bf17
parent: 6d31b85ba1113ff9752849a39684e1b40fffa50a
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Aug 22 18:39:47 EDT 2017

Remove dead code/comments.

--- a/parse/export.c
+++ b/parse/export.c
@@ -74,10 +74,6 @@
 	if (t->vis != Visintern)
 		return;
 	t->vis = Vishidden;
-	/* export the user defined traits */
-	//if (t->traits)
-	//	for (i = Ntraits; bsiter(t->traits, &i); i++)
-	//		tagtrait(st, traittab[i], ingeneric, hidelocal);
 	for (i = 0; i < t->nsub; i++)
 		tagtype(st, t->sub[i], ingeneric, hidelocal);
 	switch (t->type) {
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -272,8 +272,6 @@
 
 	tr = traittab[Tciter];
 	ty = exprtype(n->iterstmt.seq);
-	//if (!ty->traits || !bshas(ty->traits, Tciter))
-	//	return;
 	if (ty->type == Tyslice || ty->type == Tyarray || ty->type == Typtr)
 		return;
 	for (i = 0; i < tr->nproto; i++) {
@@ -880,7 +878,6 @@
 static void
 mergetraits(Node *ctx, Type *a, Type *b)
 {
-// TRFIX
 	if (b->type == Tyvar) {
 		/* make sure that if a = b, both have same traits */
 		if (a->trneed && b->trneed)