]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: create an API for unwinding inlined frames
authorAustin Clements <austin@google.com>
Sun, 5 Feb 2023 20:54:33 +0000 (15:54 -0500)
committerAustin Clements <austin@google.com>
Fri, 10 Mar 2023 17:18:27 +0000 (17:18 +0000)
commitf52bede354102a5e16e19381b93d4a469d1286d4
treec34f5a0a819f760acceee8411612e758fa9fa041
parentdcb4c1c1aad098e6b0da4a64896ff2f98f3a2ad7
runtime: create an API for unwinding inlined frames

We've replicated the code to expand inlined frames in many places in
the runtime at this point. This CL adds a simple iterator API that
abstracts this out.

We also use this to try out a new idea for structuring tests of
runtime internals: rather than exporting this whole internal data type
and API, we write the test in package runtime and import the few bits
of std we need. The idea is that, for tests of internals, it's easier
to inject public APIs from std than it is to export non-public APIs
from runtime. This is discussed more in #55108.

For #54466.

Change-Id: Iebccc04ff59a1509694a8ac0e0d3984e49121339
Reviewed-on: https://go-review.googlesource.com/c/go/+/466096
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Austin Clements <austin@google.com>
src/runtime/import_test.go [new file with mode: 0644]
src/runtime/importx_test.go [new file with mode: 0644]
src/runtime/runtime2.go
src/runtime/string.go
src/runtime/symtab.go
src/runtime/symtabinl.go [new file with mode: 0644]
src/runtime/symtabinl_test.go [new file with mode: 0644]