Commit a9a675ec authored by Nigel Tao's avatar Nigel Tao

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
parent 18601f88
......@@ -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:
......
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment