mirror of
https://github.com/golang/go
synced 2024-11-19 07:44:49 -07:00
gc: maybe the code is only mostly dead
R=ken2 CC=golang-dev https://golang.org/cl/2346044
This commit is contained in:
parent
2ad521c19a
commit
53fff1e74d
@ -257,17 +257,6 @@ gen(Node *n)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OIF:
|
case OIF:
|
||||||
if(n->ntest == N || n->ntest->op == OLITERAL) {
|
|
||||||
// drop dead code in if true or if false.
|
|
||||||
// the linker will do it for us in general,
|
|
||||||
// but this avoids writnig to the object file
|
|
||||||
// in a very common case.
|
|
||||||
if(n->ntest == N || n->ntest->val.u.bval)
|
|
||||||
genlist(n->nbody);
|
|
||||||
else
|
|
||||||
genlist(n->nelse);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
p1 = gjmp(P); // goto test
|
p1 = gjmp(P); // goto test
|
||||||
p2 = gjmp(P); // p2: goto else
|
p2 = gjmp(P); // p2: goto else
|
||||||
patch(p1, pc); // test:
|
patch(p1, pc); // test:
|
||||||
|
Loading…
Reference in New Issue
Block a user