aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-10-28 21:52:53 -0400
committerRuss Cox <rsc@golang.org>2014-10-28 21:52:53 -0400
commit5e568545991cb358a8a004b21e23ac6fa9801124 (patch)
treeac094c574d3f32f9eca8c2c253e5a2ed5b4d230a /src/runtime/stack.c
parent5f54f06a359f2973521ff3f42899c12d3a6a7fed (diff)
downloadgo-5e568545991cb358a8a004b21e23ac6fa9801124.tar.xz
cmd/gc: avoid use of goprintf
goprintf is a printf-like print for Go. It is used in the code generated by 'defer print(...)' and 'go print(...)'. Normally print(1, 2, 3) turns into printint(1) printint(2) printint(3) but defer and go need a single function call to give the runtime; they give the runtime something like goprintf("%d%d%d", 1, 2, 3). Variadic functions like goprintf cannot be described in the new type information world, so we have to replace it. Replace with a custom function, so that defer print(1, 2, 3) turns into defer func(a1, a2, a3 int) { print(a1, a2, a3) }(1, 2, 3) (and then the print becomes three different printints as usual). Fixes #8614. LGTM=austin R=austin CC=golang-codereviews, r https://golang.org/cl/159700043
Diffstat (limited to 'src/runtime/stack.c')
0 files changed, 0 insertions, 0 deletions