]> Cypherpunks repositories - gostls13.git/commit
6l, 8l: avoid recursion in asmandsz
authorRuss Cox <rsc@golang.org>
Fri, 15 Oct 2010 17:01:03 +0000 (13:01 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 15 Oct 2010 17:01:03 +0000 (13:01 -0400)
commit837c204ada1d0a4cfdcce6b34e17bc8f69732f83
treee1ce51275c26fdea731e3756541c6480cfc06d0c
parentbe2c2120d0abe8a269c1c96bd6bbaed26a190196
6l, 8l: avoid recursion in asmandsz

The old code said

if(x) {
handle a
return
}
aa = *a
rewrite aa to make x true
recursivecall(&aa)

The new code says

params = copy out of a
if(!x) {
rewrite params to make x true
}
handle params

but it's hard to see that in the Rietveld diffs because
it gets confused by changes in indentation.

Avoiding the recursion makes other changes easier.

R=ken2
CC=golang-dev
https://golang.org/cl/2533041
src/cmd/6l/span.c
src/cmd/8l/span.c