OLD | NEW |
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 /* | 5 /* |
6 * portable half of code generator. | 6 * portable half of code generator. |
7 * mainly statements and control flow. | 7 * mainly statements and control flow. |
8 */ | 8 */ |
9 | 9 |
10 #include <u.h> | 10 #include <u.h> |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 | 725 |
726 while(nr != N && nr->op == OCONVNOP) | 726 while(nr != N && nr->op == OCONVNOP) |
727 nr = nr->left; | 727 nr = nr->left; |
728 | 728 |
729 if(nl == N || isblank(nl)) { | 729 if(nl == N || isblank(nl)) { |
730 cgen_discard(nr); | 730 cgen_discard(nr); |
731 return; | 731 return; |
732 } | 732 } |
733 | 733 |
734 if(nr == N || iszero(nr)) { | 734 if(nr == N || iszero(nr)) { |
735 » » // externals and heaps should already be clear | 735 » » // heaps should already be clear |
736 » » if(nr == N) { | 736 » » if(nr == N && (nl->class & PHEAP)) |
737 » » » if(nl->class == PEXTERN) | 737 » » » return; |
738 » » » » return; | |
739 » » » if(nl->class & PHEAP) | |
740 » » » » return; | |
741 » » } | |
742 | 738 |
743 tl = nl->type; | 739 tl = nl->type; |
744 if(tl == T) | 740 if(tl == T) |
745 return; | 741 return; |
746 if(isfat(tl)) { | 742 if(isfat(tl)) { |
747 if(nl->op == ONAME) | 743 if(nl->op == ONAME) |
748 gvardef(nl); | 744 gvardef(nl); |
749 clearfat(nl); | 745 clearfat(nl); |
750 return; | 746 return; |
751 } | 747 } |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 Node* | 982 Node* |
987 temp(Type *t) | 983 temp(Type *t) |
988 { | 984 { |
989 Node *n; | 985 Node *n; |
990 ········ | 986 ········ |
991 n = nod(OXXX, N, N); | 987 n = nod(OXXX, N, N); |
992 tempname(n, t); | 988 tempname(n, t); |
993 n->sym->def->used = 1; | 989 n->sym->def->used = 1; |
994 return n->orig; | 990 return n->orig; |
995 } | 991 } |
OLD | NEW |