]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: rewrite argtype to substitute in a single pass
authorRuss Cox <rsc@golang.org>
Sun, 8 Mar 2015 17:33:49 +0000 (13:33 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 17 Mar 2015 00:33:15 +0000 (00:33 +0000)
commit13f9c8b08efdff3512c2d558cacf9a1beb3f75c9
treee01ddcc928db2b54e83600445862fdb51f502b44
parent5fca39967de70e78e0a1a4060d2e8feee77393d1
cmd/gc: rewrite argtype to substitute in a single pass

Substituting in multiple passes meant walking the type
multiple times, and worse, if a complex type was substituted
in an early pass, later passes would follow it, possibly recursively,
until hitting the depth 10 limit.

Change-Id: Ie61d6ec08438e297baabe932afe33d08f358e55f
Reviewed-on: https://go-review.googlesource.com/7625
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/internal/gc/range.go
src/cmd/internal/gc/subr.go
src/cmd/internal/gc/swt.go
src/cmd/internal/gc/walk.go