LEFT | RIGHT |
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 | 8 |
9 static Node* walkprint(Node*, NodeList**, int); | 9 static Node* walkprint(Node*, NodeList**, int); |
10 static Node* mapfn(char*, Type*); | 10 static Node* mapfn(char*, Type*); |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 /* For pointer types, we can make a special form
of optimization | 777 /* For pointer types, we can make a special form
of optimization |
778 * | 778 * |
779 * These statements are put onto the expression
init list: | 779 * These statements are put onto the expression
init list: |
780 * Itab *tab = atomicloadtype(&cache); | 780 * Itab *tab = atomicloadtype(&cache); |
781 * if(tab == nil) | 781 * if(tab == nil) |
782 * tab = typ2Itab(type, itype, &cac
he); | 782 * tab = typ2Itab(type, itype, &cac
he); |
783 * | 783 * |
784 * The CONVIFACE expression is replaced with thi
s: | 784 * The CONVIFACE expression is replaced with thi
s: |
785 * OEFACE{tab, ptr}; | 785 * OEFACE{tab, ptr}; |
786 */ | 786 */ |
787 r = l->left; | |
788 l = temp(ptrto(types[TUINT8])); | 787 l = temp(ptrto(types[TUINT8])); |
789 | 788 |
790 » » » » n1 = nod(OAS, l, r); | 789 » » » » n1 = nod(OAS, l, sym->def); |
791 typecheck(&n1, Etop); | 790 typecheck(&n1, Etop); |
792 *init = list(*init, n1); | 791 *init = list(*init, n1); |
793 | 792 |
794 fn = syslook("typ2Itab", 1); | 793 fn = syslook("typ2Itab", 1); |
795 n1 = nod(OCALL, fn, N); | 794 n1 = nod(OCALL, fn, N); |
796 n1->list = ll; | 795 n1->list = ll; |
797 typecheck(&n1, Erv); | 796 typecheck(&n1, Erv); |
798 walkexpr(&n1, init); | 797 walkexpr(&n1, init); |
799 | 798 |
800 n2 = nod(OIF, N, N); | 799 n2 = nod(OIF, N, N); |
(...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2888 bits -= v; | 2887 bits -= v; |
2889 } | 2888 } |
2890 break; | 2889 break; |
2891 } | 2890 } |
2892 ········ | 2891 ········ |
2893 if(!sign && bits <= 62 && (1LL<<bits) <= max) | 2892 if(!sign && bits <= 62 && (1LL<<bits) <= max) |
2894 return 1; | 2893 return 1; |
2895 ········ | 2894 ········ |
2896 return 0; | 2895 return 0; |
2897 } | 2896 } |
LEFT | RIGHT |