- 24 Jun, 2016 1 commit
-
-
David Crawshaw authored
The encoding/json package uses NumMethod()==0 as a fast check for interface satisfaction. In the case when a type has no methods at all, we don't need to grab the RWMutex. Improves JSON decoding benchmark on linux/amd64: name old time/op new time/op delta CodeDecoder-8 44.2ms ± 2% 40.6ms ± 1% -8.11% (p=0.000 n=10+10) name old speed new speed delta CodeDecoder-8 43.9MB/s ± 2% 47.8MB/s ± 1% +8.82% (p=0.000 n=10+10) For #16117 Change-Id: Id717e7fcd2f41b7d51d50c26ac167af45bae3747 Reviewed-on: https://go-review.googlesource.com/24433 Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 23 Jun, 2016 2 commits
-
-
David Crawshaw authored
Improves JSON decoding on linux/amd64. name old time/op new time/op delta CodeUnmarshal-40 89.3ms ± 2% 86.3ms ± 2% -3.31% (p=0.000 n=22+22) name old speed new speed delta CodeUnmarshal-40 21.7MB/s ± 2% 22.5MB/s ± 2% +3.44% (p=0.000 n=22+22) Updates #16117 Change-Id: I52acf31d7729400cfe6693e46292d41e1addba3d Reviewed-on: https://go-review.googlesource.com/24410 Run-TryBot: David Crawshaw <crawshaw@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
This was removed in CL 19695 but it slows down reflect.New, which ends up on the hot path of things like JSON decoding. There is no immediate cost in binary size, but it will make it harder to further shrink run time type information in Go 1.8. Before BenchmarkNew-40 30000000 36.3 ns/op After BenchmarkNew-40 50000000 29.5 ns/op Fixes #16161 Updates #16117 Change-Id: If7cb7f3e745d44678f3f5cf3a5338c59847529d2 Reviewed-on: https://go-review.googlesource.com/24400 Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 14 Jun, 2016 1 commit
-
-
David Crawshaw authored
This adds 8 bytes of binary size to every type that has methods. It is the smallest change I could come up with for 1.7. Fixes #16037 Change-Id: Ibe15c3165854a21768596967757864b880dbfeed Reviewed-on: https://go-review.googlesource.com/24070 Reviewed-by:
Keith Randall <khr@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 03 Jun, 2016 1 commit
-
-
David Crawshaw authored
Fixes #15923 Change-Id: I3e56564365086ceb0bfc15db61db6fb446ab7448 Reviewed-on: https://go-review.googlesource.com/23760 Reviewed-by:
Sebastien Binet <seb.binet@gmail.com> Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 02 Jun, 2016 1 commit
-
-
Sebastien Binet authored
This CL documents that StructOf currently does not generate wrapper methods for embedded fields. Updates #15924 Change-Id: I932011b1491d68767709559f515f699c04ce70d4 Reviewed-on: https://go-review.googlesource.com/23681 Reviewed-by:
David Crawshaw <crawshaw@golang.org>
-
- 25 May, 2016 1 commit
-
-
David Crawshaw authored
Also remove some of the now unnecessary corner case handling and tests I've been adding recently for unexported method data. For #15673 Change-Id: Ie0c7b03f2370bbe8508cdc5be765028f08000bd7 Reviewed-on: https://go-review.googlesource.com/23410 Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 20 May, 2016 1 commit
-
-
David Crawshaw authored
Fixes #15673 Change-Id: Ib36d8db3299a93d92665dbde012d52c2c5332ac0 Reviewed-on: https://go-review.googlesource.com/23253 Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 17 May, 2016 1 commit
-
-
Colin Cross authored
The initial implementation of reflect.StructOf in https://golang.org/cl/9251 had a limitation that field names had to be ASCII, which was later lifted by https://golang.org/cl/21777. Remove the out-of-date documentation disallowing UTF-8 field names. Updates: #5748 Updates: #15064 Change-Id: I2c5bfea46bfd682449c6e847fc972a1a131f51b7 Reviewed-on: https://go-review.googlesource.com/23170 Reviewed-by:
David Crawshaw <crawshaw@golang.org>
-
- 13 May, 2016 1 commit
-
-
David Crawshaw authored
By picking up a spurious tFlagExtraStar, the method type was printing as unc instead of func. Updates #15673 Change-Id: I0c2c189b99bdd4caeb393693be7520b8e3f342bf Reviewed-on: https://go-review.googlesource.com/23103 Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 12 May, 2016 1 commit
-
-
Aliaksandr Valialkin authored
Updated #11041 Change-Id: I4a110ba8fefb367a1049b4a65dd20c39eb890ea2 Reviewed-on: https://go-review.googlesource.com/23080 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 10 May, 2016 1 commit
-
-
Emmanuel Odeke authored
Fixes #15046. Change-Id: Iba7216297735be8e1ec550ce5336d17dcd3fd6b7 Reviewed-on: https://go-review.googlesource.com/22992 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 27 Apr, 2016 2 commits
-
-
David Crawshaw authored
The new type was inheriting the tflagExtraStar from its prototype. Fixes #15467 Change-Id: Ic22c2a55cee7580cb59228d52b97e1c0a1e60220 Reviewed-on: https://go-review.googlesource.com/22501 Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
Fixes #15468 Change-Id: I8723171f87774a98d5e80e7832ebb96dd1fbea74 Reviewed-on: https://go-review.googlesource.com/22524 Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org>
-
- 22 Apr, 2016 2 commits
-
-
David Crawshaw authored
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>
-
David Crawshaw authored
linux/amd64: cmd/go: -8KB (basically nothing) linux/amd64 PIE: cmd/go: -191KB (1.6%) jujud: -1.5MB (1.9%) Updates #6853 Fixes #15064 Change-Id: I0adbb95685e28be92e8548741df0e11daa0a9b5f Reviewed-on: https://go-review.googlesource.com/21777 Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 18 Apr, 2016 1 commit
-
-
David Crawshaw authored
Introduce and start using nameOff for two encoded names. This pair of changes is best done together because the linker's method decoder expects the method layouts to match. Precursor to converting all existing name and *string fields to nameOff. linux/amd64: cmd/go: -45KB (0.5%) jujud: -389KB (0.6%) linux/amd64 PIE: cmd/go: -170KB (1.4%) jujud: -1.5MB (1.8%) For #6853. Change-Id: Ia044423f010fb987ce070b94c46a16fc78666ff6 Reviewed-on: https://go-review.googlesource.com/21396 Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 15 Apr, 2016 1 commit
-
-
Matthew Dempsky authored
cmd and runtime were handled separately, and I'm intentionally skipped syscall. This is the rest of the standard library. CL generated mechanically with github.com/mdempsky/unconvert. Change-Id: I9e0eff886974dedc37adb93f602064b83e469122 Reviewed-on: https://go-review.googlesource.com/22104 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 13 Apr, 2016 2 commits
-
-
David Crawshaw authored
By replacing the *string used to represent pkgPath with a reflect.name everywhere, the embedded *string for package paths inside the reflect.name can be replaced by an offset, nameOff. This reduces the number of pointers in the type information. This also moves all reflect.name types into the same section, making it possible to use nameOff more widely in later CLs. No significant binary size change for normal binaries, but: linux/amd64 PIE: cmd/go: -440KB (3.7%) jujud: -2.6MB (3.2%) For #6853. Change-Id: I3890b132a784a1090b1b72b32febfe0bea77eaee Reviewed-on: https://go-review.googlesource.com/21395 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
This CL introduces the typeOff type and a lookup method of the same name that can turn a typeOff offset into an *rtype. In a typical Go binary (built with buildmode=exe, pie, c-archive, or c-shared), there is one moduledata and all typeOff values are offsets relative to firstmoduledata.types. This makes computing the pointer cheap in typical programs. With buildmode=shared (and one day, buildmode=plugin) there are multiple modules whose relative offset is determined at runtime. We identify a type in the general case by the pair of the original *rtype that references it and its typeOff value. We determine the module from the original pointer, and then use the typeOff from there to compute the final *rtype. To ensure there is only one *rtype representing each type, the runtime initializes a typemap for each module, using any identical type from an earlier module when resolving that offset. This means that types computed from an offset match the type mapped by the pointer dynamic relocations. A series of followup CLs will replace other *rtype values with typeOff (and name/*string with nameOff). For types created at runtime by reflect, type offsets are treated as global IDs and reference into a reflect offset map kept by the runtime. darwin/amd64: cmd/go: -57KB (0.6%) jujud: -557KB (0.8%) linux/amd64 PIE: cmd/go: -361KB (3.0%) jujud: -3.5MB (4.2%) For #6853. Change-Id: Icf096fd884a0a0cb9f280f46f7a26c70a9006c96 Reviewed-on: https://go-review.googlesource.com/21285 Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 12 Apr, 2016 1 commit
-
-
David Crawshaw authored
This is the first in a series of CLs to replace the use of pointers in binary read-only data with offsets. In standard Go binaries these CLs have a small effect, shrinking 8-byte pointers to 4-bytes. In position-independent code, it also saves the dynamic relocation for the pointer. This has a significant effect on the binary size when building as PIE, c-archive, or c-shared. darwin/amd64: cmd/go: -12KB (0.1%) jujud: -82KB (0.1%) linux/amd64 PIE: cmd/go: -86KB (0.7%) jujud: -569KB (0.7%) For #6853. Change-Id: Iad5625bbeba58dabfd4d334dbee3fcbfe04b2dcf Reviewed-on: https://go-review.googlesource.com/21284 Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 01 Apr, 2016 1 commit
-
-
Sebastien Binet authored
This change exposes a facility to create new struct types from a slice of reflect.StructFields. - reflect: first stab at implementing StructOf - reflect: tests for StructOf StructOf creates new struct types in the form of structTypeWithMethods to accomodate the GC (especially the uncommonType.methods slice field.) Creating struct types with embedded interfaces with unexported methods is not supported yet and will panic. Creating struct types with non-ASCII field names or types is not yet supported (see #15064.) Binaries' sizes for linux_amd64: old=tip (0104a31b) old bytes new bytes delta bin/go 9911336 9915456 +0.04% reflect 781704 830048 +6.18% Updates #5748. Updates #15064. Change-Id: I3b8fd4fadd6ce3b1b922e284f0ae72a3a8e3ce44 Reviewed-on: https://go-review.googlesource.com/9251 Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org>
-
- 25 Mar, 2016 2 commits
-
-
John Jeffery authored
The Lookup method provides a way to extract a tag value, while determining whether the tag key exists in the struct field's tag. Fixes #14883 Change-Id: I7460cb68f0ca1aaa025935050b9e182efcb64db3 Reviewed-on: https://go-review.googlesource.com/20864 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
Create a byte encoding designed for static Go names. It is intended to be a compact representation of a name and optional tag data that can be turned into a Go string without allocating, and describes whether or not it is exported without unicode table. The encoding is described in reflect/type.go: // The first byte is a bit field containing: // // 1<<0 the name is exported // 1<<1 tag data follows the name // 1<<2 pkgPath *string follow the name and tag // // The next two bytes are the data length: // // l := uint16(data[1])<<8 | uint16(data[2]) // // Bytes [3:3+l] are the string data. // // If tag data follows then bytes 3+l and 3+l+1 are the tag length, // with the data following. // // If the import path follows, then ptrSize bytes at the end of // the data form a *string. The import path is only set for concrete // methods that are defined in a different package than their type. Shrinks binary sizes: cmd/go: 164KB (1.6%) jujud: 1.0MB (1.5%) For #6853. Change-Id: I46b6591015b17936a443c9efb5009de8dfe8b609 Reviewed-on: https://go-review.googlesource.com/20968 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 23 Mar, 2016 1 commit
-
-
David Crawshaw authored
Remove reflect type information for unexported methods that do not satisfy any interface in the program. Ideally the unexported method would not appear in the method list at all, but that is tricky because the slice is built by the compiler. Reduces binary size: cmd/go: 81KB (0.8%) jujud: 258KB (0.4%) For #6853. Change-Id: I25ef8df6907e9ac03b18689d584ea46e7d773043 Reviewed-on: https://go-review.googlesource.com/21033 Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 15 Mar, 2016 1 commit
-
-
David Crawshaw authored
The type information for a method includes two variants: a func without the receiver, and a func with the receiver as the first parameter. The former is used as part of the dynamic interface checks, but the latter is only returned as a type in the reflect.Method struct. Instead of computing it at compile time, construct it at run time with reflect.FuncOf. Using cl/20701 as a baseline, cmd/go: -480KB, (4.4%) jujud: -5.6MB, (7.8%) For #6853. Change-Id: I1b8c73f3ab894735f53d00cb9c0b506d84d54e92 Reviewed-on: https://go-review.googlesource.com/20709 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 09 Mar, 2016 1 commit
-
-
David Crawshaw authored
Alternative to golang.org/cl/19852. This memory layout doesn't have an easy type representation, but it is noticeably smaller than the current funcType, and saves significant extra space. Some notes on the layout are in reflect/type.go: // A *rtype for each in and out parameter is stored in an array that // directly follows the funcType (and possibly its uncommonType). So // a function type with one method, one input, and one output is: // // struct { // funcType // uncommonType // [2]*rtype // [0] is in, [1] is out // uncommonTypeSliceContents // } There are three arbitrary limits introduced by this CL: 1. No more than 65535 function input parameters. 2. No more than 32767 function output parameters. 3. reflect.FuncOf is limited to 128 parameters. I don't think these are limits in practice, but are worth noting. Reduces godoc binary size by 2.4%, 330KB. For #6853. Change-Id: I225c0a0516ebdbe92d41dfdf43f716da42dfe347 Reviewed-on: https://go-review.googlesource.com/19916 Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 08 Mar, 2016 1 commit
-
-
David Crawshaw authored
Instead of a pointer on every rtype, use a bit flag to indicate that the contents of uncommonType directly follows the rtype value when it is needed. This requires a bit of juggling in the compiler's rtype encoder. The backing arrays for fields in the rtype are presently encoded directly after the slice header. This packing requires separating the encoding of the uncommonType slice headers from their backing arrays. Reduces binary size of godoc by ~180KB (1.5%). No measurable change in all.bash time. For #6853. Change-Id: I60205948ceb5c0abba76fdf619652da9c465a597 Reviewed-on: https://go-review.googlesource.com/19790 Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 04 Mar, 2016 1 commit
-
-
David Crawshaw authored
go test github.com/onsi/gomega/gbytes now passes at tip, and tests added to the reflect package. Fixes #14645 Change-Id: I16216c1a86211a1103d913237fe6bca5000cf885 Reviewed-on: https://go-review.googlesource.com/20221 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 02 Mar, 2016 1 commit
-
-
Brad Fitzpatrick authored
The tree's pretty inconsistent about single space vs double space after a period in documentation. Make it consistently a single space, per earlier decisions. This means contributors won't be confused by misleading precedence. This CL doesn't use go/doc to parse. It only addresses // comments. It was generated with: $ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])') $ go test go/doc -update Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7 Reviewed-on: https://go-review.googlesource.com/20022 Reviewed-by:
Rob Pike <r@golang.org> Reviewed-by:
Dave Day <djd@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 26 Feb, 2016 1 commit
-
-
David Crawshaw authored
Reduces binary size of cmd/go by 0.5%. For #6853. Change-Id: I5a4b814049580ab5098ad252d979f80b70d8a5f9 Reviewed-on: https://go-review.googlesource.com/19694 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 25 Feb, 2016 1 commit
-
-
David Crawshaw authored
Simplifies some code as ptrToThis was unreliable under dynamic linking. Now the same type lookup is used regardless of execution mode. A synthetic relocation, R_USETYPE, is introduced to make sure the linker includes *T on use of T, if *T is carrying methods. Changes the heap dump format. Anything reading the format needs to look at the last bool of a type of an interface value to determine if the type should be the pointer-to type. Reduces binary size of cmd/go by 0.2%. For #6853. Change-Id: I79fcb19a97402bdb0193f3c7f6d94ddf061ee7b2 Reviewed-on: https://go-review.googlesource.com/19695 Reviewed-by:
Keith Randall <khr@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 24 Feb, 2016 1 commit
-
-
David Crawshaw authored
Reduces binary size of cmd/go by 1%. For #6853. Change-Id: I6f2992a4dd3699db1b532ab08683e82741b9c2e4 Reviewed-on: https://go-review.googlesource.com/19692 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 23 Feb, 2016 1 commit
-
-
Matthew Dempsky authored
This reverts commit f28bbb77. Change-Id: I82fb81dcff3ddcaefef72949f1ef3a41bcd22301 Reviewed-on: https://go-review.googlesource.com/19849 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 22 Feb, 2016 1 commit
-
-
Matthew Dempsky authored
Also eliminates per-maptype hiter and hmap types, since they're not really needed anyway. Update packages reflect and runtime accordingly. Reduces golang.org/x/tools/cmd/godoc's text segment by ~170kB: text data bss dec hex filename 13085702 140640 151520 13377862 cc2146 godoc.before 12915382 140640 151520 13207542 c987f6 godoc.after Updates #6853. Change-Id: I948b2bc1f22d477c1756204996b4e3e1fb568d81 Reviewed-on: https://go-review.googlesource.com/16610 Reviewed-by:
Keith Randall <khr@golang.org>
-
- 27 Oct, 2015 1 commit
-
-
kargakis authored
Change-Id: I86cdd5c1d7b6f76d3474d180e75ea0c732241080 Reviewed-on: https://go-review.googlesource.com/16309 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 26 Oct, 2015 1 commit
-
-
Marcel van Lohuizen authored
This CL changes reflect to allow access to exported fields and methods in unexported embedded structs for gccgo and after gc has been adjusted to disallow access to embedded unexported structs. Adresses #12367, #7363, #11007, and #7247. Change-Id: If80536eab35abcd25300d8ddc2d27d5c42d7e78e Reviewed-on: https://go-review.googlesource.com/14010 Reviewed-by:
Russ Cox <rsc@golang.org>
-
- 09 Sep, 2015 1 commit
-
-
Keith Randall authored
Keep track of which types of keys need an update and which don't. Strings need an update because the new key might pin a smaller backing store. Floats need an update because it might be +0/-0. Interfaces need an update because they may contain strings or floats. Fixes #11088 Change-Id: I9ade53c1dfb3c1a2870d68d07201bc8128e9f217 Reviewed-on: https://go-review.googlesource.com/10843 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 26 Aug, 2015 2 commits
-
-
Michael Hudson-Doyle authored
No longer used after previous hashmap change. Change-Id: I558470f872281e84a78406132df4e391d077b833 Reviewed-on: https://go-review.googlesource.com/13785 Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Michael Hudson-Doyle authored
Previously t.zero always pointed to runtime.zerovalue. Change the hashmap code to always return a runtime pointer directly, and change that pointer to point to a larger buffer if one is needed. (It might be better to only copy from the pointer returned by the mapaccess functions when the value type is small enough and have the compiler insert explicit zeroing for larger value types, but I tried and failed to do this). This removes all uses of the zero field of the type data; the field itself can be removed in a separate change. Fixes #11491 Change-Id: I5b81752ff4067d74a5a281c41e88f151bae0171e Reviewed-on: https://go-review.googlesource.com/13784 Reviewed-by:
Keith Randall <khr@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-