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 "go.h" | 5 #include "go.h" |
6 #include "md5.h" | 6 #include "md5.h" |
7 #include "y.tab.h" | 7 #include "y.tab.h" |
8 #include "opnames.h" | 8 #include "opnames.h" |
9 #include "yerr.h" | 9 #include "yerr.h" |
10 | 10 |
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 if(n->type == T) | 1447 if(n->type == T) |
1448 fmtprint(fp, "%#N", n); | 1448 fmtprint(fp, "%#N", n); |
1449 else if(n->type->etype == TNIL) | 1449 else if(n->type->etype == TNIL) |
1450 fmtprint(fp, "nil"); | 1450 fmtprint(fp, "nil"); |
1451 else | 1451 else |
1452 fmtprint(fp, "%#N (type %T)", n, n->type); | 1452 fmtprint(fp, "%#N (type %T)", n, n->type); |
1453 goto out; | 1453 goto out; |
1454 } | 1454 } |
1455 | 1455 |
1456 if(fp->flags & FmtSharp) { | 1456 if(fp->flags & FmtSharp) { |
| 1457 if(n->orig != N) |
| 1458 n = n->orig; |
1457 exprfmt(fp, n, 0); | 1459 exprfmt(fp, n, 0); |
1458 goto out; | 1460 goto out; |
1459 } | 1461 } |
1460 | 1462 |
1461 switch(n->op) { | 1463 switch(n->op) { |
1462 default: | 1464 default: |
1463 fmtprint(fp, "%O%J", n->op, n); | 1465 fmtprint(fp, "%O%J", n->op, n); |
1464 break; | 1466 break; |
1465 | 1467 |
1466 case ONAME: | 1468 case ONAME: |
(...skipping 2257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3724 Strlit* | 3726 Strlit* |
3725 strlit(char *s) | 3727 strlit(char *s) |
3726 { | 3728 { |
3727 Strlit *t; | 3729 Strlit *t; |
3728 ········ | 3730 ········ |
3729 t = mal(sizeof *t + strlen(s)); | 3731 t = mal(sizeof *t + strlen(s)); |
3730 strcpy(t->s, s); | 3732 strcpy(t->s, s); |
3731 t->len = strlen(s); | 3733 t->len = strlen(s); |
3732 return t; | 3734 return t; |
3733 } | 3735 } |
LEFT | RIGHT |