Commit c53aecaa authored by Keith Randall's avatar Keith Randall Committed by Keith Randall

doc: describe change to eliminate method expression wrappers from stack traces

Change-Id: I824b42a1c1fdcee8712681ffc6316470761be065
Reviewed-on: https://go-review.googlesource.com/c/159858Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 447965d4
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment