1
0
mirror of https://github.com/golang/go synced 2024-11-24 20:00:10 -07:00

cmd/6g, cmd/8g: clean up unnecessary switch code in componentgen.

Code higher up in the function already catches these cases.

R=remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/6496106
This commit is contained in:
Nigel Tao 2012-09-12 21:47:05 +10:00
parent 18601f88fd
commit a9a675ec35
2 changed files with 0 additions and 12 deletions

View File

@ -1325,9 +1325,6 @@ componentgen(Node *nr, Node *nl)
switch(nl->type->etype) {
case TARRAY:
if(!isslice(nl->type))
goto no;
nodl.xoffset += Array_array;
nodl.type = ptrto(nl->type->type);
@ -1405,9 +1402,6 @@ componentgen(Node *nr, Node *nl)
gmove(&nodr, &nodl);
goto yes;
case TSTRUCT:
goto no;
}
no:

View File

@ -1339,9 +1339,6 @@ componentgen(Node *nr, Node *nl)
switch(nl->type->etype) {
case TARRAY:
if(!isslice(nl->type))
goto no;
nodl.xoffset += Array_array;
nodl.type = ptrto(nl->type->type);
@ -1419,9 +1416,6 @@ componentgen(Node *nr, Node *nl)
gmove(&nodr, &nodl);
goto yes;
case TSTRUCT:
goto no;
}
no: