aboutsummaryrefslogtreecommitdiff
path: root/src/internal/pkgbits/decoder.go
diff options
context:
space:
mode:
authorMark Freeman <mark@golang.org>2025-05-12 12:21:03 -0400
committerGopher Robot <gobot@golang.org>2025-05-12 13:46:33 -0700
commit52624e533fe52329da5ba6ebb9c37712048168e0 (patch)
tree5877bf6903dd8f5b13a210ef286db9d18fd42e5e /src/internal/pkgbits/decoder.go
parent019d79872681d49de7ea192ac2dbc02f0ce679fc (diff)
downloadgo-52624e533fe52329da5ba6ebb9c37712048168e0.tar.xz
internal/pkgbits: rename Reloc* to Section*
This is a basic refactoring. This enumeration refers primarily to the different sections of a UIR file, so this naming is a bit more direct. Change-Id: Ib70ab054e97effaabc035450d246ae4354da8075 Reviewed-on: https://go-review.googlesource.com/c/go/+/671935 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Mark Freeman <mark@golang.org>
Diffstat (limited to 'src/internal/pkgbits/decoder.go')
-rw-r--r--src/internal/pkgbits/decoder.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/internal/pkgbits/decoder.go b/src/internal/pkgbits/decoder.go
index 9a8a3da240..9ff6f5c76c 100644
--- a/src/internal/pkgbits/decoder.go
+++ b/src/internal/pkgbits/decoder.go
@@ -158,7 +158,7 @@ func (pr *PkgDecoder) DataIdx(k SectionKind, idx RelIndex) string {
// StringIdx returns the string value for the given string index.
func (pr *PkgDecoder) StringIdx(idx RelIndex) string {
- return pr.DataIdx(RelocString, idx)
+ return pr.DataIdx(SectionString, idx)
}
// NewDecoder returns a Decoder for the given (section, index) pair,
@@ -341,7 +341,7 @@ func (r *Decoder) Sync(mWant SyncMarker) {
fmt.Printf("\t[stack trace unavailable; recompile package %q with -d=syncframes]\n", r.common.pkgPath)
}
for _, pc := range writerPCs {
- fmt.Printf("\t%s\n", r.common.StringIdx(r.rawReloc(RelocString, pc)))
+ fmt.Printf("\t%s\n", r.common.StringIdx(r.rawReloc(SectionString, pc)))
}
fmt.Printf("\nexpected %v, reading at:\n", mWant)
@@ -410,7 +410,7 @@ func (r *Decoder) Reloc(k SectionKind) RelIndex {
// bitstream.
func (r *Decoder) String() string {
r.Sync(SyncString)
- return r.common.StringIdx(r.Reloc(RelocString))
+ return r.common.StringIdx(r.Reloc(SectionString))
}
// Strings decodes and returns a variable-length slice of strings from
@@ -481,7 +481,7 @@ func (r *Decoder) bigFloat() *big.Float {
func (pr *PkgDecoder) PeekPkgPath(idx RelIndex) string {
var path string
{
- r := pr.TempDecoder(RelocPkg, idx, SyncPkgDef)
+ r := pr.TempDecoder(SectionPkg, idx, SyncPkgDef)
path = r.String()
pr.RetireDecoder(&r)
}
@@ -498,10 +498,10 @@ func (pr *PkgDecoder) PeekObj(idx RelIndex) (string, string, CodeObj) {
var name string
var rcode int
{
- r := pr.TempDecoder(RelocName, idx, SyncObject1)
+ r := pr.TempDecoder(SectionName, idx, SyncObject1)
r.Sync(SyncSym)
r.Sync(SyncPkg)
- ridx = r.Reloc(RelocPkg)
+ ridx = r.Reloc(SectionPkg)
name = r.String()
rcode = r.Code(SyncCodeObj)
pr.RetireDecoder(&r)