diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2022-08-18 03:53:58 -0700 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2022-08-18 17:26:17 +0000 |
| commit | 07cf24bdfe55dd3493e580c67b5437a114df7658 (patch) | |
| tree | 2f419f1ce5b784763cf16b072369fec53c238b52 /src/cmd/link/internal | |
| parent | b23d469e854f36e5ba8c0de9b7406a81e82d15c1 (diff) | |
| download | go-07cf24bdfe55dd3493e580c67b5437a114df7658.tar.xz | |
cmd/compile/internal/noder: set ir.Name.DictIndex for unified IR
For local variables of derived type, Delve relies on ir.Name.DictIndex
being set to the type's rtype index within the function's dictionary.
This CL implements that functionality within unified IR.
Manually double checked that Delve behaves correctly, at least as far
as I can tell from casual use. Specifically, I confirmed that running
the test program from TestDictIndex, stepping into testfn, and then
running `print mapvar` prints `map[int]main.CustomInt []`, which
matches the behavior under GOEXPERIMENT=nounified. (Also compare that
when ir.Name.DictIndex is *not* set by unified IR, `print mapvar`
instead prints `map[int]go.shape.int []`.)
Fixes #54514.
Change-Id: I90d443945895abfba04dc018f15e00217930091c
Reviewed-on: https://go-review.googlesource.com/c/go/+/424735
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/link/internal')
| -rw-r--r-- | src/cmd/link/internal/ld/dwarf_test.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/cmd/link/internal/ld/dwarf_test.go b/src/cmd/link/internal/ld/dwarf_test.go index 4ac3dbdcfd..4b50371161 100644 --- a/src/cmd/link/internal/ld/dwarf_test.go +++ b/src/cmd/link/internal/ld/dwarf_test.go @@ -11,7 +11,6 @@ import ( "debug/dwarf" "debug/pe" "fmt" - "internal/buildcfg" "internal/testenv" "io" "io/ioutil" @@ -1597,9 +1596,6 @@ func TestDictIndex(t *testing.T) { if runtime.GOOS == "plan9" { t.Skip("skipping on plan9; no DWARF symbol table in executables") } - if buildcfg.Experiment.Unified { - t.Skip("GOEXPERIMENT=unified does not emit dictionaries yet") - } t.Parallel() const prog = ` |
