1
0
mirror of https://github.com/golang/go synced 2024-11-26 14:08:37 -07:00

cmd/gc: eliminate a useless bounds check in inlined append().

R=golang-dev, daniel.morsing, r
CC=golang-dev
https://golang.org/cl/9358043
This commit is contained in:
Rémy Oudompheng 2013-05-20 23:19:41 +02:00
parent 6a3859f433
commit 4b0eb19a05

View File

@ -2537,7 +2537,7 @@ append(Node *n, NodeList **init)
l = list(l, nod(OAS, nn, nod(OLEN, ns, N))); // n = len(s)
nx = nod(OSLICE, ns, nod(OKEY, N, nod(OADD, nn, na))); // ...s[:n+argc]
nx->bounded = 1;
nx->etype = 1;
l = list(l, nod(OAS, ns, nx)); // s = s[:n+argc]
for (a = n->list->next; a != nil; a = a->next) {