OLD | NEW |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 #include <u.h> | 5 #include <u.h> |
6 #include <libc.h> | 6 #include <libc.h> |
7 #include "go.h" | 7 #include "go.h" |
8 #include "y.tab.h" | 8 #include "y.tab.h" |
9 | 9 |
10 static void funcargs(Node*); | 10 static void funcargs(Node*); |
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 if (t->type->broke || t->type->down->broke || t->type->down->down->broke
) | 1208 if (t->type->broke || t->type->down->broke || t->type->down->down->broke
) |
1209 t->broke = 1; | 1209 t->broke = 1; |
1210 | 1210 |
1211 if(this) | 1211 if(this) |
1212 t->thistuple = 1; | 1212 t->thistuple = 1; |
1213 t->outtuple = count(out); | 1213 t->outtuple = count(out); |
1214 t->intuple = count(in); | 1214 t->intuple = count(in); |
1215 t->outnamed = 0; | 1215 t->outnamed = 0; |
1216 if(t->outtuple > 0 && out->n->left != N && out->n->left->orig != N) { | 1216 if(t->outtuple > 0 && out->n->left != N && out->n->left->orig != N) { |
1217 s = out->n->left->orig->sym; | 1217 s = out->n->left->orig->sym; |
1218 » » if(s != S && s->name[0] != '~' || s->name[1] != 'r') // ~r%d is
the name invented for an unnamed result | 1218 » » if(s != S && (s->name[0] != '~' || s->name[1] != 'r')) // ~r%d i
s the name invented for an unnamed result |
1219 t->outnamed = 1; | 1219 t->outnamed = 1; |
1220 } | 1220 } |
1221 | 1221 |
1222 return t; | 1222 return t; |
1223 } | 1223 } |
1224 | 1224 |
1225 Sym* | 1225 Sym* |
1226 methodsym(Sym *nsym, Type *t0, int iface) | 1226 methodsym(Sym *nsym, Type *t0, int iface) |
1227 { | 1227 { |
1228 Sym *s; | 1228 Sym *s; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1469 p = smprint("%s·f", s->name); | 1469 p = smprint("%s·f", s->name); |
1470 s1 = pkglookup(p, s->pkg); | 1470 s1 = pkglookup(p, s->pkg); |
1471 free(p); | 1471 free(p); |
1472 if(s1->def == N) { | 1472 if(s1->def == N) { |
1473 s1->def = newname(s1); | 1473 s1->def = newname(s1); |
1474 s1->def->shortname = newname(s); | 1474 s1->def->shortname = newname(s); |
1475 funcsyms = list(funcsyms, s1->def); | 1475 funcsyms = list(funcsyms, s1->def); |
1476 } | 1476 } |
1477 return s1; | 1477 return s1; |
1478 } | 1478 } |
OLD | NEW |