aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/type.go
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@golang.org>2016-04-07 21:37:45 -0400
committerDavid Crawshaw <crawshaw@golang.org>2016-04-22 13:51:29 +0000
commitc165988360457553ccbfa4a09919de3262a4438a (patch)
treed1b93530f564b951d14725dea29f0e37ec803f6e /src/runtime/type.go
parent1492e7db059ea7903110b0725d5ced3134558e73 (diff)
downloadgo-c165988360457553ccbfa4a09919de3262a4438a.tar.gz
go-c165988360457553ccbfa4a09919de3262a4438a.zip
cmd/compile, etc: use nameOff in uncommonType
linux/amd64 PIE: cmd/go: -62KB (0.5%) jujud: -550KB (0.7%) For #6853. Change-Id: Ieb67982abce5832e24b997506f0ae7108f747108 Reviewed-on: https://go-review.googlesource.com/22371 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/type.go')
-rw-r--r--src/runtime/type.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runtime/type.go b/src/runtime/type.go
index 0b28fa6d43..9e4c40553a 100644
--- a/src/runtime/type.go
+++ b/src/runtime/type.go
@@ -304,7 +304,7 @@ type method struct {
}
type uncommontype struct {
- pkgpath name
+ pkgpath nameOff
mcount uint16 // number of methods
moff uint16 // offset from this uncommontype to [mcount]method
}
@@ -524,7 +524,9 @@ func typesEqual(t, v *_type) bool {
if ut == nil || uv == nil {
return false
}
- if ut.pkgpath.name() != uv.pkgpath.name() {
+ pkgpatht := t.nameOff(ut.pkgpath).name()
+ pkgpathv := v.nameOff(uv.pkgpath).name()
+ if pkgpatht != pkgpathv {
return false
}
}