Commit 8f734d4e authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/5g, cmd/6g, cmd/8g, cmd/9g: zero more in componentgen

Fix a flipped nil check.
The flipped check prevented componentgen
from zeroing a non-cadable nl.
This fix reduces the number of non-SB LEAQs
in godoc from 35323 to 34920 (-1.1%).

Update #1914

Change-Id: I15ea303068835f606f883ddf4a2bb4cb2287e9ae
Reviewed-on: https://go-review.googlesource.com/2605Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
parent 77a21139
......@@ -1680,7 +1680,7 @@ componentgen(Node *nr, Node *nl)
nodl = *nl;
if(!cadable(nl)) {
if(nr == N || !cadable(nr))
if(nr != N && !cadable(nr))
goto no;
igen(nl, &nodl, N);
freel = 1;
......
......@@ -1587,7 +1587,7 @@ componentgen(Node *nr, Node *nl)
nodl = *nl;
if(!cadable(nl)) {
if(nr == N || !cadable(nr))
if(nr != N && !cadable(nr))
goto no;
igen(nl, &nodl, N);
freel = 1;
......
......@@ -1427,7 +1427,7 @@ componentgen(Node *nr, Node *nl)
nodl = *nl;
if(!cadable(nl)) {
if(nr == N || !cadable(nr))
if(nr != N && !cadable(nr))
goto no;
igen(nl, &nodl, N);
freel = 1;
......
......@@ -1602,7 +1602,7 @@ componentgen(Node *nr, Node *nl)
nodl = *nl;
if(!cadable(nl)) {
if(nr == N || !cadable(nr))
if(nr != N && !cadable(nr))
goto no;
igen(nl, &nodl, N);
freel = 1;
......
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