]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj: unexport Link.Hash
authorJosh Bleecher Snyder <josharian@gmail.com>
Fri, 14 Apr 2017 13:44:30 +0000 (06:44 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 18 Apr 2017 02:14:02 +0000 (02:14 +0000)
A prior CL eliminated the last reference to Ctxt.Hash
from the compiler.

Change-Id: Ic97ff84ed1a14e0c93fb0e8ec0b2617c3397c0e8
Reviewed-on: https://go-review.googlesource.com/40699
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/plive.go
src/cmd/internal/obj/line_test.go
src/cmd/internal/obj/link.go
src/cmd/internal/obj/sym.go

index 8e1c80a9ce22328ddeaa17b98046939dfcfba25a..dfc3785a75891b8b946473b1af33df89a332ad4b 100644 (file)
@@ -1135,7 +1135,7 @@ func livenessemit(lv *Liveness, argssym, livesym *obj.LSym) {
        // so that they can be de-duplicated.
        // This provides significant binary size savings.
        // It is safe to rename these LSyms because
-       // they are tracked separately from ctxt.Hash.
+       // they are tracked separately from ctxt.hash.
        argssym.Name = fmt.Sprintf("gclocals·%x", md5.Sum(argssym.P))
        livesym.Name = fmt.Sprintf("gclocals·%x", md5.Sum(livesym.P))
 }
index af595fd6a64cbb1710a2dc49f1300809c1a2e365..956302f8f1b090e6712d7db5121137cbfa615263 100644 (file)
@@ -12,7 +12,7 @@ import (
 
 func TestLinkgetlineFromPos(t *testing.T) {
        ctxt := new(Link)
-       ctxt.Hash = make(map[SymVer]*LSym)
+       ctxt.hash = make(map[SymVer]*LSym)
 
        afile := src.NewFileBase("a.go", "a.go")
        bfile := src.NewFileBase("b.go", "/foo/bar/b.go")
index cc59d1f5b16bdf20d44e9026788a564f13ecd86d..be411d8c789dc9f300048128d2bf50d1ec5946b7 100644 (file)
@@ -761,7 +761,7 @@ type Link struct {
        Flag_optimize bool
        Bso           *bufio.Writer
        Pathname      string
-       Hash          map[SymVer]*LSym
+       hash          map[SymVer]*LSym
        PosTable      src.PosTable
        InlTree       InlTree // global inlining tree used by gc/inl.go
        Imports       []string
index 6a44c2215f659f20e626c8f9e8cb3e64c8d43e2b..bb844cdb0df4bee8ef70c06c98522f33fc75dbc2 100644 (file)
@@ -53,7 +53,7 @@ func WorkingDir() string {
 
 func Linknew(arch *LinkArch) *Link {
        ctxt := new(Link)
-       ctxt.Hash = make(map[SymVer]*LSym)
+       ctxt.hash = make(map[SymVer]*LSym)
        ctxt.Arch = arch
        ctxt.Pathname = WorkingDir()
 
@@ -76,13 +76,13 @@ func (ctxt *Link) Lookup(name string, v int) *LSym {
 // LookupInit looks up the symbol with name name and version v.
 // If it does not exist, it creates it and passes it to initfn for one-time initialization.
 func (ctxt *Link) LookupInit(name string, v int, init func(s *LSym)) *LSym {
-       s := ctxt.Hash[SymVer{name, v}]
+       s := ctxt.hash[SymVer{name, v}]
        if s != nil {
                return s
        }
 
        s = &LSym{Name: name, Version: int16(v)}
-       ctxt.Hash[SymVer{name, v}] = s
+       ctxt.hash[SymVer{name, v}] = s
        if init != nil {
                init(s)
        }