Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1121)

Side by Side Diff: src/cmd/gc/dcl.c

Issue 64170043: code review 64170043: cmd/gc: correct liveness for fat variables (Closed)
Patch Set: diff -r a2b715d74188 https://code.google.com/p/go/ Created 11 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/cmd/8g/reg.c ('k') | src/cmd/gc/gen.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/cmd/8g/reg.c ('k') | src/cmd/gc/gen.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b