Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(136)

Delta Between Two Patch Sets: src/cmd/gc/gen.c

Issue 13334052: code review 13334052: cmd/gc: eliminate redundant &x.Field nil checks (Closed)
Left Patch Set: diff -r c111e30c49a4 https://code.google.com/p/go/ Created 11 years, 6 months ago
Right Patch Set: diff -r 2e735aa41d4a https://code.google.com/p/go/ Created 11 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/8g/peep.c ('k') | src/cmd/gc/pgen.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(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 /* 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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 622
623 // binary 623 // binary
624 case OCAP: 624 case OCAP:
625 case OCOM: 625 case OCOM:
626 case OLEN: 626 case OLEN:
627 case OMINUS: 627 case OMINUS:
628 case ONOT: 628 case ONOT:
629 case OPLUS: 629 case OPLUS:
630 cgen_discard(nr->left); 630 cgen_discard(nr->left);
631 break; 631 break;
632 ········
633 case OIND:
634 cgen_checknil(nr->left);
635 break;
632 636
633 // special enough to just evaluate 637 // special enough to just evaluate
634 default: 638 default:
635 tempname(&tmp, nr->type); 639 tempname(&tmp, nr->type);
636 cgen_as(&tmp, nr); 640 cgen_as(&tmp, nr);
637 gused(&tmp); 641 gused(&tmp);
638 } 642 }
639 } 643 }
640 644
641 /* 645 /*
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 Node* 930 Node*
927 temp(Type *t) 931 temp(Type *t)
928 { 932 {
929 Node *n; 933 Node *n;
930 ········ 934 ········
931 n = nod(OXXX, N, N); 935 n = nod(OXXX, N, N);
932 tempname(n, t); 936 tempname(n, t);
933 n->sym->def->used = 1; 937 n->sym->def->used = 1;
934 return n; 938 return n;
935 } 939 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b