OLD | NEW |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 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 "opnames.h" | 8 #include "opnames.h" |
9 | 9 |
10 // | 10 // |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 case OBREAK: | 906 case OBREAK: |
907 case OCONTINUE: | 907 case OCONTINUE: |
908 case OGOTO: | 908 case OGOTO: |
909 case OFALL: | 909 case OFALL: |
910 case OXFALL: | 910 case OXFALL: |
911 if(n->left) | 911 if(n->left) |
912 fmtprint(f, "%#O %N", n->op, n->left); | 912 fmtprint(f, "%#O %N", n->op, n->left); |
913 else | 913 else |
914 fmtprint(f, "%#O", n->op); | 914 fmtprint(f, "%#O", n->op); |
915 break; | 915 break; |
| 916 |
| 917 case OEMPTY: |
| 918 break; |
| 919 |
| 920 case OLABEL: |
| 921 fmtprint(f, "%N: ", n->left); |
| 922 break; |
| 923 ·········· |
916 } | 924 } |
917 | 925 |
918 if(extrablock) | 926 if(extrablock) |
919 fmtstrcpy(f, "}"); | 927 fmtstrcpy(f, "}"); |
920 | 928 |
921 return 0; | 929 return 0; |
922 } | 930 } |
923 | 931 |
924 | 932 |
925 static int opprec[] = { | 933 static int opprec[] = { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 [OAS2FUNC] = -1, | 1014 [OAS2FUNC] = -1, |
1007 [OAS2MAPR] = -1, | 1015 [OAS2MAPR] = -1, |
1008 [OAS2RECV] = -1, | 1016 [OAS2RECV] = -1, |
1009 [OASOP] = -1, | 1017 [OASOP] = -1, |
1010 [OBREAK] = -1, | 1018 [OBREAK] = -1, |
1011 [OCASE] = -1, | 1019 [OCASE] = -1, |
1012 [OCONTINUE] = -1, | 1020 [OCONTINUE] = -1, |
1013 [ODCL] = -1, | 1021 [ODCL] = -1, |
1014 [ODCLFIELD] = -1, | 1022 [ODCLFIELD] = -1, |
1015 [ODEFER] = -1, | 1023 [ODEFER] = -1, |
| 1024 [OEMPTY] = -1, |
1016 [OFALL] = -1, | 1025 [OFALL] = -1, |
1017 [OFOR] = -1, | 1026 [OFOR] = -1, |
1018 [OIF] = -1, | 1027 [OIF] = -1, |
| 1028 [OLABEL] = -1, |
1019 [OPROC] = -1, | 1029 [OPROC] = -1, |
1020 [ORANGE] = -1, | 1030 [ORANGE] = -1, |
1021 [ORETURN] = -1, | 1031 [ORETURN] = -1, |
1022 [OSELECT] = -1, | 1032 [OSELECT] = -1, |
1023 [OSWITCH] = -1, | 1033 [OSWITCH] = -1, |
1024 [OXCASE] = -1, | 1034 [OXCASE] = -1, |
1025 [OXFALL] = -1, | 1035 [OXFALL] = -1, |
1026 | 1036 |
1027 [OEND] = 0 | 1037 [OEND] = 0 |
1028 }; | 1038 }; |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 dumplist(char *s, NodeList *l) | 1567 dumplist(char *s, NodeList *l) |
1558 { | 1568 { |
1559 print("%s\n%+H\n", s, l); | 1569 print("%s\n%+H\n", s, l); |
1560 } | 1570 } |
1561 | 1571 |
1562 void | 1572 void |
1563 dump(char *s, Node *n) | 1573 dump(char *s, Node *n) |
1564 { | 1574 { |
1565 print("%s [%p]\n%+N\n", s, n, n); | 1575 print("%s [%p]\n%+N\n", s, n, n); |
1566 } | 1576 } |
OLD | NEW |