From 4b0eb19a05133d4cc117fefe1e37ea1e35a64c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Oudompheng?= Date: Mon, 20 May 2013 23:19:41 +0200 Subject: [PATCH] cmd/gc: eliminate a useless bounds check in inlined append(). R=golang-dev, daniel.morsing, r CC=golang-dev https://golang.org/cl/9358043 --- src/cmd/gc/walk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/gc/walk.c b/src/cmd/gc/walk.c index d9c6341b43..3dd8930969 100644 --- a/src/cmd/gc/walk.c +++ b/src/cmd/gc/walk.c @@ -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) {