aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/objfile.go
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-09-22 08:52:41 -0700
committerDan Scales <danscales@google.com>2021-09-22 23:17:55 +0000
commitee69b09424f611d02d4b0f0da3eff875e075438f (patch)
tree6c24b7f2360d70242cc61c94da297c9ac80319d4 /src/cmd/internal/obj/objfile.go
parent1319b1476ea6f55c780936d133a005054fa81234 (diff)
downloadgo-ee69b09424f611d02d4b0f0da3eff875e075438f.tar.xz
cmd/compile: break out constants for local and global dictionary prefixes
Create constant LocalDictName for the pname/refix for dictionary parameters or local variables, and constant GlobalDictPrefix for the prefix for names of global dictionaries. I wanted to make sure these constants were set up as we add more reference to dictionaries for debugging, etc. Change-Id: Ide801f842383300a2699c96943ec06decaecc358 Reviewed-on: https://go-review.googlesource.com/c/go/+/351450 Trust: Dan Scales <danscales@google.com> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/internal/obj/objfile.go')
-rw-r--r--src/cmd/internal/obj/objfile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go
index 910e6ef0d9..8a094df91a 100644
--- a/src/cmd/internal/obj/objfile.go
+++ b/src/cmd/internal/obj/objfile.go
@@ -340,7 +340,7 @@ func (w *writer) Sym(s *LSym) {
if strings.HasPrefix(s.Name, "go.itab.") && s.Type == objabi.SRODATA {
flag2 |= goobj.SymFlagItab
}
- if strings.HasPrefix(s.Name, w.ctxt.Pkgpath) && strings.HasPrefix(s.Name[len(w.ctxt.Pkgpath):], "..dict") {
+ if strings.HasPrefix(s.Name, w.ctxt.Pkgpath) && strings.HasPrefix(s.Name[len(w.ctxt.Pkgpath):], ".") && strings.HasPrefix(s.Name[len(w.ctxt.Pkgpath)+1:], objabi.GlobalDictPrefix) {
flag2 |= goobj.SymFlagDict
}
name := s.Name