Skip to content
Snippets Groups Projects
Commit 382b44eb authored by Russ Cox's avatar Russ Cox
Browse files

[dev.cc] cmd/5g etc: code cleanup: delay var decls and eliminate dead code

Ran rsc.io/grind rev 6f0e601 on the source files.

The cleanups move var declarations as close to the use
as possible, splitting disjoint uses of the var into separate
variables. They also remove dead code (especially in
func sudoaddable), which helps with the var moving.

There's more cleanup to come, but this alone cuts the
time spent compiling html/template on my 2013 MacBook Pro
from 3.1 seconds to 2.3 seconds.

Change-Id: I4de499f47b1dd47a560c310bbcde6b08d425cfd6
Reviewed-on: https://go-review.googlesource.com/5637


Reviewed-by: default avatarRob Pike <r@golang.org>
parent 3af0d791
No related branches found
No related tags found
No related merge requests found
Showing
with 1471 additions and 2379 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment