mirror of
https://github.com/golang/go
synced 2024-11-24 22:10:02 -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:
parent
18601f88fd
commit
a9a675ec35
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user