mirror of
https://github.com/golang/go.git
synced 2025-05-23 00:11:26 +00:00
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 <iant@golang.org>
This commit is contained in:
parent
447965d4e0
commit
c53aecaaea
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user