Skip to content

Commit c53aeca

Browse files
committed
doc: describe change to eliminate method expression wrappers from stack traces
Change-Id: I824b42a1c1fdcee8712681ffc6316470761be065 Reviewed-on: https://go-review.googlesource.com/c/159858 Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 447965d commit c53aeca

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

doc/go1.12.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,23 @@ <h3 id="compiler">Compiler toolchain</h3>
232232
</pre>
233233
</p>
234234

235+
<p><!-- CL 153477 -->
236+
Wrappers generated by the compiler to implement method expressions
237+
are no longer reported
238+
by <a href="/pkg/runtime/#CallersFrames"><code>runtime.CallersFrames</code></a>
239+
and <a href="/pkg/runtime/#Stack"><code>runtime.Stack</code></a>. They
240+
are also not printed in panic stack traces.
241+
242+
This change aligns the <code>gc</code> toolchain to match
243+
the <code>gccgo</code> toolchain, which already elided such wrappers
244+
from stack traces.
245+
246+
Clients of these APIs might need to adjust for the missing
247+
frames. For code that must interoperate between 1.11 and 1.12
248+
releases, you can replace the method expression <code>x.M</code>
249+
with the function literal <code>func (...) { x.M(...) } </code>.
250+
</p>
251+
235252
<p><!-- CL 144340 -->
236253
The compiler now accepts a <code>-lang</code> flag to set the Go language
237254
version to use. For example, <code>-lang=go1.8</code> causes the compiler to

0 commit comments

Comments
 (0)