]> Cypherpunks repositories - gostls13.git/commitdiff
doc: describe change to eliminate method expression wrappers from stack traces
authorKeith Randall <khr@google.com>
Tue, 22 Jan 2019 21:44:32 +0000 (13:44 -0800)
committerKeith Randall <khr@golang.org>
Mon, 28 Jan 2019 19:53:34 +0000 (19:53 +0000)
Change-Id: I824b42a1c1fdcee8712681ffc6316470761be065
Reviewed-on: https://go-review.googlesource.com/c/159858
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go1.12.html

index dddf44b520a52a7a578b66e969295e5b79fdeaa5..c34b473a39bb9724d54bf5b1aa1689b37f9fbc52 100644 (file)
@@ -232,6 +232,23 @@ for {
 </pre>
 </p>
 
+<p><!-- CL 153477 -->
+  Wrappers generated by the compiler to implement method expressions
+  are no longer reported
+  by <a href="/pkg/runtime/#CallersFrames"><code>runtime.CallersFrames</code></a>
+  and <a href="/pkg/runtime/#Stack"><code>runtime.Stack</code></a>. They
+  are also not printed in panic stack traces.
+
+  This change aligns the <code>gc</code> toolchain to match
+  the <code>gccgo</code> toolchain, which already elided such wrappers
+  from stack traces.
+
+  Clients of these APIs might need to adjust for the missing
+  frames. For code that must interoperate between 1.11 and 1.12
+  releases, you can replace the method expression <code>x.M</code>
+  with the function literal <code>func (...) { x.M(...) } </code>.
+</p>
+
 <p><!-- CL 144340 -->
   The compiler now accepts a <code>-lang</code> flag to set the Go language
   version to use. For example, <code>-lang=go1.8</code> causes the compiler to