- 15 Nov, 2019 1 commit
-
-
go101 authored
Go specification says: A value x is assignable to a variable of type T if x is a bidirectional channel value, T is a channel type, x's type V and T have identical element types, and at least one of V or T is not a defined type. However, the current reflection implementation is incorrect which makes "x is assignable to T" even if type V and T are both defined type. The current reflection implementation also mistakes the base types of two non-defined pointer types share the same underlying type when the two base types satisfy the above mentioned special channel assignability rule. Fixes #29469 Change-Id: Ia4b9c4ac47dc8e76a11faef422b2e5c5726b78b3 GitHub-Last-Rev: 487c20a564091a1d2ba5feb95ab5196331c699c2 GitHub-Pull-Request: golang/go#29739 Reviewed-on: https://go-review.googlesource.com/c/go/+/157822 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 22 Oct, 2019 1 commit
-
-
Matthew Dempsky authored
The code for generating gcdata was (technically) unsafe. It was also rather repetitive. This CL refactors it a bit and abstracts use of gcdata into a helper gcSlice method. Updates #34972. Change-Id: Ie86d7822eafe263f1d3d150eedf0ec66be1ec85d Reviewed-on: https://go-review.googlesource.com/c/go/+/202582 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by:
Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by:
Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 21 Oct, 2019 1 commit
-
-
Matthew Dempsky authored
Follow the idiom for allowing -d=checkptr to recognize and verify correctness. Updates #22218. Updates #34972. Change-Id: Ib6001c6f0e6dc535a36bcfaa1ae48e29e0c737f8 Reviewed-on: https://go-review.googlesource.com/c/go/+/202580 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 10 Oct, 2019 1 commit
-
-
Brad Fitzpatrick authored
Part 1: CL 199499 (GOOS nacl) Part 2: CL 200077 (amd64p32 files, toolchain) Part 3: stuff that arguably should've been part of Part 2, but I forgot one of my grep patterns when splitting the original CL up into two parts. This one might also have interesting stuff to resurrect for any future x32 ABI support. Updates #30439 Change-Id: I2b4143374a253a003666f3c69e776b7e456bdb9c Reviewed-on: https://go-review.googlesource.com/c/go/+/200318 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 09 Oct, 2019 1 commit
-
-
Brad Fitzpatrick authored
This is part two if the nacl removal. Part 1 was CL 199499. This CL removes amd64p32 support, which might be useful in the future if we implement the x32 ABI. It also removes the nacl bits in the toolchain, and some remaining nacl bits. Updates #30439 Change-Id: I2475d5bb066d1b474e00e40d95b520e7c2e286e1 Reviewed-on: https://go-review.googlesource.com/c/go/+/200077 Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 28 Sep, 2019 1 commit
-
-
David Crawshaw authored
This was missing from the original StructOf CL because I couldn't think of a use for it. Now I can: even with types used entirely by reflect, unexported fields can be set using UnsafeAddr. Change-Id: I5e7e3d81d16e8817cdd69d85796ce33930ef523b Reviewed-on: https://go-review.googlesource.com/c/go/+/85661 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 18 Sep, 2019 1 commit
-
-
Jean de Klerk authored
Currently, if you call various reflect methods you might get a panic with a message like, "reflect: Field of non-struct type". Sometimes it's easy to grok what's going on, but other times you need to laboriously go perform reflect.ValueOf(myType).Kind(). This CL just adds that detail to the error message, saving debuggers the extra step and making the error message more clear. Change-Id: I7e0c211a3001e6b217b828cbcf50518080b5cb1e Reviewed-on: https://go-review.googlesource.com/c/go/+/183097 Reviewed-by:
Daniel Martí <mvdan@mvdan.cc> Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 03 Sep, 2019 1 commit
-
-
Keith Randall authored
Right now we generate hash functions for all types, just in case they are used as map keys. That's a lot of wasted effort and binary size for types which will never be used as a map key. Instead, generate hash functions only for types that we know are map keys. Just doing that is a bit too simple, since maps with an interface type as a key might have to hash any concrete key type that implements that interface. So for that case, implement hashing of such types at runtime (instead of with generated code). It will be slower, but only for maps with interface types as keys, and maybe only a bit slower as the aeshash time probably dominates the dispatch time. Reorg where we keep the equals and hash functions. Move the hash function from the key type to the map type, saving a field in every non-map type. That leaves only one function in the alg structure, so get rid of that and just keep the equal function in the type descriptor itself. cmd/go now has 10 generated hash functions, instead of 504. Makes cmd/go 1.0% smaller. Update #6853. Speed on non-interface keys is unchanged. Speed on interface keys is ~20% slower: name old time/op new time/op delta MapInterfaceString-8 23.0ns ±21% 27.6ns ±14% +20.01% (p=0.002 n=10+10) MapInterfacePtr-8 19.4ns ±16% 23.7ns ± 7% +22.48% (p=0.000 n=10+8) Change-Id: I7c2e42292a46b5d4e288aaec4029bdbb01089263 Reviewed-on: https://go-review.googlesource.com/c/go/+/191198 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Martin Möhrmann <moehrmann@google.com>
-
- 02 Sep, 2019 1 commit
-
-
Daniel Martí authored
Some were never used, and some haven't been used for years. One exception is net/http's readerAndCloser, which was only used in a test. Move it to a test file. While at it, remove a check in regexp that could never fire; the field is an uint32, so it can never be negative. Change-Id: Ia2200f6afa106bae4034045ea8233b452f38747b Reviewed-on: https://go-review.googlesource.com/c/go/+/192621 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 27 Aug, 2019 1 commit
-
-
Sergei Zagurskii authored
directlyAssignable invoked rtype.Name() just to compare its result to empty string. We really only need to check whether rtype has name. It can be done much cheaper, by checking tflagNamed. Benchmark: https://play.golang.org/p/V2BzESPuf2w name old time/op new time/op delta DirectlyAssignable-12 32.7ns ± 6% 6.6ns ± 6% -79.80% (p=0.008 n=5+5) Fixes #32186 Change-Id: I1a2a167dbfddf319fba3015cb6a011bf010f99a8 Reviewed-on: https://go-review.googlesource.com/c/go/+/178518 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 03 Apr, 2019 1 commit
-
-
Romain Baugue authored
Fixes #30688 Change-Id: I8b63feba4b18bc07a09f6fbfaa33c1b3326b40e6 Reviewed-on: https://go-review.googlesource.com/c/go/+/169597 Reviewed-by:
Rob Pike <r@golang.org>
-
- 26 Mar, 2019 2 commits
-
-
Keith Randall authored
It needs to be set before addTypeBits is called. Fixes #31043 Change-Id: I692b4047dc17bd68202d45da41dd55d432383e59 Reviewed-on: https://go-review.googlesource.com/c/go/+/169318 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
We can't use ptrdata inside of typeptrdata, because it won't be properly initialized until typeptrdata returns. Fixes #31039 Change-Id: Ib8c89191a7e4cce678a05d351bb6ded81ba23aae Reviewed-on: https://go-review.googlesource.com/c/go/+/169317 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 25 Mar, 2019 1 commit
-
-
Keith Randall authored
We already have the ptrdata field in a type, which encodes exactly the same information that kindNoPointers does. My problem with kindNoPointers is that it often leads to double-negative code like: t.kind & kindNoPointers != 0 Much clearer is: t.ptrdata == 0 Update #27167 Change-Id: I92307d7f018a6bbe3daca4a4abb4225e359349b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/169157 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 08 Mar, 2019 1 commit
-
-
Daniel Martí authored
If a for loop has a simple condition and begins with a simple "if x { break; }"; we can simply add "!x" to the loop's condition. While at it, simplify a few assignments to use the common pattern "x := staticDefault; if cond { x = otherValue(); }". Finally, simplify a couple of var declarations. Change-Id: I413982c6abd32905adc85a9a666cb3819139c19f Reviewed-on: https://go-review.googlesource.com/c/go/+/165342 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 07 Mar, 2019 1 commit
-
-
Keith Randall authored
First the insidious bug: var n uintptr for n := elemPtrs; n > 120; n -= 120 { prog = append(prog, 120) prog = append(prog, mask[:15]...) mask = mask[15:] } prog = append(prog, byte(n)) prog = append(prog, mask[:(n+7)/8]...) The := breaks this code, because the n after the loop is always 0! We also do need to handle field padding correctly. In particular the old padding code doesn't correctly handle fields that are not a multiple of a pointer in size. Fixes #30606. Change-Id: Ifcab9494dc25c20116753c5d7e0145d6c2053ed8 Reviewed-on: https://go-review.googlesource.com/c/go/+/165860 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 06 Mar, 2019 1 commit
-
-
Keith Randall authored
They are missing a stop byte at the end. Normally this doesn't matter, but when including a GC program in another GC program, we strip the last byte. If that last byte wasn't a stop byte, then we've thrown away part of the program we actually need. Fixes #30606 Change-Id: Ie9604beeb84f7f9442e77d31fe64c374ca132cce Reviewed-on: https://go-review.googlesource.com/c/go/+/165857 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 29 Dec, 2018 1 commit
-
-
Keith Randall authored
Reorg map flags a bit so we don't need any extra space for the extra flag. Fixes #23734 Change-Id: I436812156240ae90de53d0943fe1aabf3ea37417 Reviewed-on: https://go-review.googlesource.com/c/155918 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 16 Nov, 2018 1 commit
-
-
Vladimir Kovpak authored
On reflect documentation page only this function doesn't have description, this commit add simple description. Change-Id: Idcda89ddd1f6fdd1938c4030e89ebdc186255ce6 GitHub-Last-Rev: 1553b834bb4f7a49efc7ff81763a255bc51bbf17 GitHub-Pull-Request: golang/go#28818 Reviewed-on: https://go-review.googlesource.com/c/149721 Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 06 Nov, 2018 1 commit
-
-
Raghavendra Nagaraj authored
Previously we panicked if the number of methods present for an embedded field was >= 32. This change removes that limit and now StructOf dynamically calls itself to create space for the number of methods. Fixes #25402 Change-Id: I3b1deb119796d25f7e6eee1cdb126327b49a0b5e GitHub-Last-Rev: 16da71ad6b23563f3ed26f1914adf41e3d42de69 GitHub-Pull-Request: golang/go#26865 Reviewed-on: https://go-review.googlesource.com/c/128479 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 02 Nov, 2018 1 commit
-
-
Brad Fitzpatrick authored
Go documentation style for boolean funcs is to say: // Foo reports whether ... func Foo() bool (rather than "returns true if") This CL also replaces 4 uses of "iff" with the same "reports whether" wording, which doesn't lose any meaning, and will prevent people from sending typo fixes when they don't realize it's "if and only if". In the past I think we've had the typo CLs updated to just say "reports whether". So do them all at once. (Inspired by the addition of another "returns true if" in CL 146938 in fd_plan9.go) Created with: $ perl -i -npe 's/returns true if/reports whether/' $(git grep -l "returns true iff" | grep -v vendor) $ perl -i -npe 's/returns true if/reports whether/' $(git grep -l "returns true if" | grep -v vendor) Change-Id: Ided502237f5ab0d25cb625dbab12529c361a8b9f Reviewed-on: https://go-review.googlesource.com/c/147037 Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 29 Sep, 2018 1 commit
-
-
Keith Randall authored
During a call to a reflect-generated function or method (via makeFuncStub or methodValueCall), when should we scan the return values? When we're starting a reflect call, the space on the stack for the return values is not initialized yet, as it contains whatever junk was on the stack of the caller at the time. The return space must not be scanned during a GC. When we're finishing a reflect call, the return values are initialized, and must be scanned during a GC to make sure that any pointers in the return values are found and their referents retained. When the GC stack walk comes across a reflect call in progress on the stack, it needs to know whether to scan the results or not. It doesn't know the progress of the reflect call, so it can't decide by itself. The reflect package needs to tell it. This CL adds another slot in the frame of makeFuncStub and methodValueCall so we can put a boolean in there which tells the runtime whether to scan the results or not. This CL also adds the args length to reflectMethodValue so the runtime can restrict its scanning to only the args section (not the results) if the reflect package says the results aren't ready yet. Do a delicate dance in the reflect package to set the "results are valid" bit. We need to make sure we set the bit only after we've copied the results back to the stack. But we must set the bit before we drop reflect's copy of the results. Otherwise, we might have a state where (temporarily) no one has a live copy of the results. That's the state we were observing in issue #27695 before this CL. The bitmap used by the runtime currently contains only the args. (Actually, it contains all the bits, but the size is set so we use only the args portion.) This is safe for early in a reflect call, but unsafe late in a reflect call. The test issue27695.go demonstrates this unsafety. We change the bitmap to always include both args and results, and decide at runtime which portion to use. issue27695.go only has a test for method calls. Function calls were ok because there wasn't a safepoint between when reflect dropped its copy of the return values and when the caller is resumed. This may change when we introduce safepoints everywhere. This truncate-to-only-the-args was part of CL 9888 (in 2015). That part of the CL fixed the problem demonstrated in issue27695b.go but introduced the problem demonstrated in issue27695.go. TODO, in another CL: simplify FuncLayout and its test. stack return value is now identical to frametype.ptrdata + frametype.gcdata. Fixes #27695 Change-Id: I2d49b34e34a82c6328b34f02610587a291b25c5f Reviewed-on: https://go-review.googlesource.com/137440 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Austin Clements <austin@google.com>
-
- 26 Sep, 2018 1 commit
-
-
Keith Randall authored
Fix the code to use write barriers on heap memory, and no write barriers on stack memory. These errors were discoverd as part of fixing #27695. They may have something to do with that issue, but hard to be sure. The core cause is different, so this fix is a separate CL. Update #27695 Change-Id: Ib005f6b3308de340be83c3d07d049d5e316b1e3c Reviewed-on: https://go-review.googlesource.com/137438 Reviewed-by:
Austin Clements <austin@google.com>
-
- 28 Jun, 2018 1 commit
-
-
Ian Lance Taylor authored
Before CL 4281055 in 2011, the reflect package was quite different. rtype, then called commonType, was embedded in exported structs with names like StructType. In order to avoid accidental conversions between pointers to these public structs, which sometimes had identical fields, the embedded commonType fields were tagged. In CL 4281055 the formerly public structs were unexported, and all access was done through the Type interface. At that point the field tags in the reflect structs were no longer useful. In Go 1.8 the language was changed to ignore struct field tags when converting between types. This made the field tags in the reflect structs doubly useless. This CL simply removes them. Fixes #20914 Change-Id: I9af4d6d0709276a91a6b6ee5323cad9dcd0cd0a0 Reviewed-on: https://go-review.googlesource.com/121475 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 27 Jun, 2018 1 commit
-
-
Ian Lance Taylor authored
The current implementation does not generate wrappers for methods of embedded non-interface types. We can only skip the wrapper if kindDirectIface of the generated struct type matches kindDirectIface of the embedded type. Panic if that is not the case. It would be better to actually generate wrappers, but that can be done later. Updates #15924 Fixes #24782 Change-Id: I01f5c76d9a07f44e1b04861bfe9f9916a04e65ca Reviewed-on: https://go-review.googlesource.com/121316 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 29 May, 2018 1 commit
-
-
Alberto Donizetti authored
Fixes #25401 Change-Id: I0b61ecfcee43ebfe0a84b5c1e28a3817f96b94ed Reviewed-on: https://go-review.googlesource.com/115015 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 10 May, 2018 1 commit
-
-
Robert Griesemer authored
On the API level this is just an update of the documentation to match the current spec more closely. On the implementation side, this is a rename of various unexported names. For #22005. Change-Id: Ie5ae32f3b10f003805240efcceab3d0fd373cd51 Reviewed-on: https://go-review.googlesource.com/112717 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 06 May, 2018 1 commit
-
-
Martin Möhrmann authored
The hmap field in the maptype is only used by the runtime to check the sizes of the hmap structure created by the compiler and runtime agree. Comments are already present about the hmap structure definitions in the compiler and runtime needing to be in sync. Add a test that checks the runtimes hmap size is as expected to detect when the compilers and runtimes hmap sizes diverge instead of checking this at runtime when a map is created. Change-Id: I974945ebfdb66883a896386a17bbcae62a18cf2a Reviewed-on: https://go-review.googlesource.com/91796 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
- 15 Mar, 2018 1 commit
-
-
Matthew Dempsky authored
By moving exported methods to the front of method lists, filtering down to only the exported methods just needs a count of how many exported methods exist, which the compiler can statically provide. This allows getting rid of the exported method cache. For #22075. Change-Id: I8eeb274563a2940e1347c34d673f843ae2569064 Reviewed-on: https://go-review.googlesource.com/100846 Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 17 Feb, 2018 1 commit
-
-
Martin Möhrmann authored
Rename all map implementation and test files to use "map" as a file name prefix instead of "hashmap" for the implementation and "map" for the test file names. Change-Id: I7b317c1f7a660b95c6d1f1a185866f2839e69446 Reviewed-on: https://go-review.googlesource.com/90336 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 09 Jan, 2018 1 commit
-
-
Russ Cox authored
Type values being comparable implies that Type is a valid map key type. As previously written, they sound unrelated. Change-Id: I8e2235275d62898bfb47de850e8257b51ab5cbd6 Reviewed-on: https://go-review.googlesource.com/87021 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 02 Jan, 2018 1 commit
-
-
Tim Cooper authored
Fixes #6535 Change-Id: I34974c0050424c96d19ad69bf4522bb69cde2fd5 Reviewed-on: https://go-review.googlesource.com/85815 Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 01 Dec, 2017 1 commit
-
-
Russ Cox authored
It's not safe to do p+x with unsafe if that would point past the end of the object. (Valid in C, not safe in Go.) Pass a "whySafe" reason (compiled away) to explain at each call site why it's safe. Fixes #21733. Change-Id: I5da8c25bde66f5c9beac232f2135dcab8e8bf3b1 Reviewed-on: https://go-review.googlesource.com/80738 Reviewed-by:
Austin Clements <austin@google.com>
-
- 27 Sep, 2017 1 commit
-
-
Joe Tsai authored
Adding the "https://" scheme allows godoc to properly detect the URL and provide a hyperlink for it. Change-Id: I76dc309368c86975de01bc6e6e9196037b2114d7 Reviewed-on: https://go-review.googlesource.com/66570 Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 05 Sep, 2017 1 commit
-
-
Matthew Dempsky authored
The previous logic was overly complicated, generated suboptimally encoded struct type descriptors, and mishandled embeddings of predeclared universal types. Fixes #21122. Fixes #21353. Fixes #21696. Fixes #21702. Updates #21357. Change-Id: If34761fa6dbe4af2af59dee501e7f30845320376 Reviewed-on: https://go-review.googlesource.com/60410 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Crawshaw <crawshaw@golang.org>
-
- 23 Aug, 2017 1 commit
-
-
André Carvalho authored
The method Method expects index to be an index of exported fields, but, before this change, the index used by MethodByName could take into account unexported fields if those happened sort before the exported one. Fixes #21177 Change-Id: I90bb64a47b23e2e43fdd2b8a1e0a2c9a8a63ded2 Reviewed-on: https://go-review.googlesource.com/51810 Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 16 Aug, 2017 1 commit
-
-
Daniel Martí authored
pkgPath always received the empty string. Worse yet, it panicked if it received anything else. This has been the case ever since newName was introduced in early 2016. Change-Id: I5f164305bd30c34455ef35e776c7616f303b37e4 Reviewed-on: https://go-review.googlesource.com/54331 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Crawshaw <crawshaw@golang.org>
-
- 15 Jul, 2017 1 commit
-
-
Ian Lance Taylor authored
When StructOf is used with an anonymous field that has methods, and that anonymous field is not the first field, the methods we generate are incorrect because they do not offset to the field as required. If we encounter that case, panic rather than doing the wrong thing. Fixes #20824 Updates #15924 Change-Id: I3b0901ddbc6d58af5f7e84660b5e3085a431035d Reviewed-on: https://go-review.googlesource.com/47035 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 13 Jun, 2017 1 commit
-
-
Pravendra Singh authored
According to the language spec, a struct field name should be an identifier. identifier = letter { letter | unicode_digit } . letter = unicode_letter | "_" . Implements a function 'isValidFieldName(fieldName string) bool'. To check if the field name is a valid identifier or not. It will panic if the field name is invalid. It uses the non-exported function implementation 'isLetter' from the package 'scanner', used to parse an identifier. Fixes #20600. Change-Id: I1db7db1ad88cab5dbea6565be15cc7461cc56c44 Reviewed-on: https://go-review.googlesource.com/45590 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 08 Jun, 2017 1 commit
-
-
Ian Lance Taylor authored
Fixes #20541. Change-Id: Ifdfdf3616482b71761daf6d114b779a8ec532051 Reviewed-on: https://go-review.googlesource.com/44495 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Crawshaw <crawshaw@golang.org>
-