cmd/compile: insert ' ' and \n at beginning of walkprint
Rather than emitting spaces and newlines for println as we walk the expression, construct it all up front. This enables further optimizations. This requires using printstring instead of print in the implementation of printsp and printnl, on pain of infinite recursion. That's ok; it's more efficient anyway, and just as simple. While we're here, do it for other print routines as well. Change-Id: I61d7df143810e00710c4d4d948d904007a7fd190 Reviewed-on: https://go-review.googlesource.com/55097 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Showing
Please
register
or
sign in
to comment