LEFT | RIGHT |
(no file at all) | |
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 #include <ar.h> | 9 #include <ar.h> |
10 | 10 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 435 |
436 // Phase 7: Check external declarations. | 436 // Phase 7: Check external declarations. |
437 for(l=externdcl; l; l=l->next) | 437 for(l=externdcl; l; l=l->next) |
438 if(l->n->op == ONAME) | 438 if(l->n->op == ONAME) |
439 typecheck(&l->n, Erv); | 439 typecheck(&l->n, Erv); |
440 | 440 |
441 if(nerrors+nsavederrors) | 441 if(nerrors+nsavederrors) |
442 errorexit(); | 442 errorexit(); |
443 | 443 |
444 dumpobj(); | 444 dumpobj(); |
| 445 |
| 446 print("thingsallocs/used: %d/%d\n", thingsallocs, thingsused); |
445 | 447 |
446 if(nerrors+nsavederrors) | 448 if(nerrors+nsavederrors) |
447 errorexit(); | 449 errorexit(); |
448 | 450 |
449 flusherrors(); | 451 flusherrors(); |
450 exits(0); | 452 exits(0); |
451 return 0; | 453 return 0; |
452 } | 454 } |
453 | 455 |
454 void | 456 void |
(...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2301 p = infile; | 2303 p = infile; |
2302 else | 2304 else |
2303 p = p+1; | 2305 p = p+1; |
2304 snprint(namebuf, sizeof(namebuf), "%s", p); | 2306 snprint(namebuf, sizeof(namebuf), "%s", p); |
2305 p = strrchr(namebuf, '.'); | 2307 p = strrchr(namebuf, '.'); |
2306 if(p != nil) | 2308 if(p != nil) |
2307 *p = 0; | 2309 *p = 0; |
2308 outfile = smprint("%s.%c", namebuf, thechar); | 2310 outfile = smprint("%s.%c", namebuf, thechar); |
2309 } | 2311 } |
2310 } | 2312 } |
LEFT | RIGHT |