@@ -48,7 +48,7 @@ type pkgReader struct {
48
48
// offset for rewriting the given (absolute!) index into the output,
49
49
// but bitwise inverted so we can detect if we're missing the entry
50
50
// or not.
51
- newindex []pkgbits. Index
51
+ newindex []index
52
52
}
53
53
54
54
func newPkgReader (pr pkgbits.PkgDecoder ) * pkgReader {
@@ -59,15 +59,15 @@ func newPkgReader(pr pkgbits.PkgDecoder) *pkgReader {
59
59
pkgs : make ([]* types.Pkg , pr .NumElems (pkgbits .RelocPkg )),
60
60
typs : make ([]* types.Type , pr .NumElems (pkgbits .RelocType )),
61
61
62
- newindex : make ([]pkgbits. Index , pr .TotalElems ()),
62
+ newindex : make ([]index , pr .TotalElems ()),
63
63
}
64
64
}
65
65
66
66
// A pkgReaderIndex compactly identifies an index (and its
67
67
// corresponding dictionary) within a package's export data.
68
68
type pkgReaderIndex struct {
69
69
pr * pkgReader
70
- idx pkgbits. Index
70
+ idx index
71
71
dict * readerDict
72
72
methodSym * types.Sym
73
73
@@ -85,7 +85,7 @@ func (pri pkgReaderIndex) asReader(k pkgbits.RelocKind, marker pkgbits.SyncMarke
85
85
return r
86
86
}
87
87
88
- func (pr * pkgReader ) newReader (k pkgbits.RelocKind , idx pkgbits. Index , marker pkgbits.SyncMarker ) * reader {
88
+ func (pr * pkgReader ) newReader (k pkgbits.RelocKind , idx index , marker pkgbits.SyncMarker ) * reader {
89
89
return & reader {
90
90
Decoder : pr .NewDecoder (k , idx , marker ),
91
91
p : pr ,
@@ -260,7 +260,7 @@ func (r *reader) posBase() *src.PosBase {
260
260
261
261
// posBaseIdx returns the specified position base, reading it first if
262
262
// needed.
263
- func (pr * pkgReader ) posBaseIdx (idx pkgbits. Index ) * src.PosBase {
263
+ func (pr * pkgReader ) posBaseIdx (idx index ) * src.PosBase {
264
264
if b := pr .posBases [idx ]; b != nil {
265
265
return b
266
266
}
@@ -341,7 +341,7 @@ func (r *reader) pkg() *types.Pkg {
341
341
342
342
// pkgIdx returns the specified package from the export data, reading
343
343
// it first if needed.
344
- func (pr * pkgReader ) pkgIdx (idx pkgbits. Index ) * types.Pkg {
344
+ func (pr * pkgReader ) pkgIdx (idx index ) * types.Pkg {
345
345
if pkg := pr .pkgs [idx ]; pkg != nil {
346
346
return pkg
347
347
}
@@ -391,7 +391,7 @@ func (r *reader) typWrapped(wrapped bool) *types.Type {
391
391
func (r * reader ) typInfo () typeInfo {
392
392
r .Sync (pkgbits .SyncType )
393
393
if r .Bool () {
394
- return typeInfo {idx : pkgbits . Index (r .Len ()), derived : true }
394
+ return typeInfo {idx : index (r .Len ()), derived : true }
395
395
}
396
396
return typeInfo {idx : r .Reloc (pkgbits .RelocType ), derived : false }
397
397
}
@@ -668,7 +668,7 @@ func (pr *pkgReader) objInstIdx(info objInfo, dict *readerDict, shaped bool) ir.
668
668
// type arguments, if any.
669
669
// If shaped is true, then the shaped variant of the object is returned
670
670
// instead.
671
- func (pr * pkgReader ) objIdx (idx pkgbits. Index , implicits , explicits []* types.Type , shaped bool ) ir.Node {
671
+ func (pr * pkgReader ) objIdx (idx index , implicits , explicits []* types.Type , shaped bool ) ir.Node {
672
672
n , err := pr .objIdxMayFail (idx , implicits , explicits , shaped )
673
673
if err != nil {
674
674
base .Fatalf ("%v" , err )
@@ -682,7 +682,7 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index, implicits, explicits []*types.Typ
682
682
//
683
683
// Other sources of internal failure (such as duplicate definitions) still fail
684
684
// the build.
685
- func (pr * pkgReader ) objIdxMayFail (idx pkgbits. Index , implicits , explicits []* types.Type , shaped bool ) (ir.Node , error ) {
685
+ func (pr * pkgReader ) objIdxMayFail (idx index , implicits , explicits []* types.Type , shaped bool ) (ir.Node , error ) {
686
686
rname := pr .newReader (pkgbits .RelocName , idx , pkgbits .SyncObject1 )
687
687
_ , sym := rname .qualifiedIdent ()
688
688
tag := pkgbits .CodeObj (rname .Code (pkgbits .SyncCodeObj ))
@@ -952,7 +952,7 @@ func shapify(targ *types.Type, basic bool) *types.Type {
952
952
}
953
953
954
954
// objDictIdx reads and returns the specified object dictionary.
955
- func (pr * pkgReader ) objDictIdx (sym * types.Sym , idx pkgbits. Index , implicits , explicits []* types.Type , shaped bool ) (* readerDict , error ) {
955
+ func (pr * pkgReader ) objDictIdx (sym * types.Sym , idx index , implicits , explicits []* types.Type , shaped bool ) (* readerDict , error ) {
956
956
r := pr .newReader (pkgbits .RelocObjDict , idx , pkgbits .SyncObject1 )
957
957
958
958
dict := readerDict {
@@ -2578,7 +2578,7 @@ func (r *reader) funcInst(pos src.XPos) (wrapperFn, baseFn, dictPtr ir.Node) {
2578
2578
return
2579
2579
}
2580
2580
2581
- func (pr * pkgReader ) objDictName (idx pkgbits. Index , implicits , explicits []* types.Type ) * ir.Name {
2581
+ func (pr * pkgReader ) objDictName (idx index , implicits , explicits []* types.Type ) * ir.Name {
2582
2582
rname := pr .newReader (pkgbits .RelocName , idx , pkgbits .SyncObject1 )
2583
2583
_ , sym := rname .qualifiedIdent ()
2584
2584
tag := pkgbits .CodeObj (rname .Code (pkgbits .SyncCodeObj ))
0 commit comments