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

Unified Diff: src/cmd/8g/cgen.c

Issue 6845053: code review 6845053: cmd/8g: fix erroneous LEAL nil. (Closed)
Patch Set: diff -r 2a55e349097f https://go.googlecode.com/hg/ Created 12 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/cmd/8g/gsubr.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/8g/cgen.c
===================================================================
--- a/src/cmd/8g/cgen.c
+++ b/src/cmd/8g/cgen.c
@@ -827,16 +827,19 @@
return;
case ODOTPTR:
- if(n->left->addable
- || n->left->op == OCALLFUNC
- || n->left->op == OCALLMETH
- || n->left->op == OCALLINTER) {
+ switch(n->left->op) {
+ case ODOT:
+ case ODOTPTR:
+ case OCALLFUNC:
+ case OCALLMETH:
+ case OCALLINTER:
// igen-able nodes.
igen(n->left, &n1, res);
regalloc(a, types[tptr], &n1);
gmove(&n1, a);
regfree(&n1);
- } else {
+ break;
+ default:
regalloc(a, types[tptr], res);
cgen(n->left, a);
}
« no previous file with comments | « no previous file | src/cmd/8g/gsubr.c » ('j') | no next file with comments »

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