An error occurred fetching the project authors.
- 10 Mar, 2016 1 commit
-
-
Matthew Dempsky authored
Better documentation. Change parameter types from **Type and int to just *Type and bool. Make use of short var declarations. Change-Id: I909846ba0df65cd2bc05ee145b72d60e881588bd Reviewed-on: https://go-review.googlesource.com/20495Reviewed-by:
Dave Cheney <dave@cheney.net>
-
- 09 Mar, 2016 4 commits
-
-
Ian Lance Taylor authored
Mix in several other minor cleanups, including adding some new methods to Nodes: Index, Addr, SetIndex, SetNodes. Passes toolstash -cmp. Update #14473. Change-Id: I8bd4ae3fde7c5e20ba66e7dd1654fbc70c3ddeb8 Reviewed-on: https://go-review.googlesource.com/20491Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
This CL was automatically generated using a special-purpose AST rewriting tool, followed by manual editing to put some comments back in the right places and fix some bad line breaks. The result is not perfect but it's a big step toward getting back to sanity, and because it was automatically generated there is a decent chance that it is correct. Passes toolstash -cmp. Update #14473. Change-Id: I01c09078a6d78e2b008bc304d744b79469a38d3d Reviewed-on: https://go-review.googlesource.com/20440Reviewed-by:
David Crawshaw <crawshaw@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
More idiomatic naming (in particular, matches the naming used for go/types.Signature). Also, convert more code to use these methods and/or IterFields. (Still more to go; only made a quick pass for low hanging fruit.) Passes toolstash -cmp. Change-Id: I61831bfb1ec2cd50d4c7efc6062bca4e0dcf267b Reviewed-on: https://go-review.googlesource.com/20451Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
Passes toolstash -cmp. Change-Id: I325b02dcc8412ded0dc304d43377c0bdf59c66a8 Reviewed-on: https://go-review.googlesource.com/20405Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 08 Mar, 2016 3 commits
-
-
Ian Lance Taylor authored
Bug accidentally inserted in https://golang.org/cl/20210. Doesn't seem to make a difference, but restore original code anyhow. Update #14473. Change-Id: I9cf87987ff158e27c7231027819317cdde8c132c Reviewed-on: https://go-review.googlesource.com/20401 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Passes toolstash -cmp. Update #14473. Change-Id: I717ebd948dfc8faf8b9ef5aa02c67484af618d18 Reviewed-on: https://go-review.googlesource.com/20359Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Passes toolstash -cmp. Update #14473. Change-Id: I2620374b79c61b1e48467b98afe2d7d3beef878b Reviewed-on: https://go-review.googlesource.com/20354Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 07 Mar, 2016 3 commits
-
-
Josh Bleecher Snyder authored
Opt for replacements that avoid any assumptions about the representations in use. Passes toolstash -cmp. Change-Id: Ia858a33abcae344e03fc1862fc9b0e192fde80c1 Reviewed-on: https://go-review.googlesource.com/20279 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Found by temporarily flipping fields from *NodeList to Nodes and fixing all the compilation errors. This CL does not actually change any fields. Passes toolstash -cmp. Update #14473. Change-Id: Ib98fa37e8752f96358224c973a743618a6a0e736 Reviewed-on: https://go-review.googlesource.com/20320 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Eliminates type conversions in a bunch of Oconv(int(n.Op), ...) calls. Notably, this identified a misuse of Oconv in amd64/gsubr.go to try to print an assembly instruction op instead of a compiler node op. Change-Id: I93b5aa49fe14a5eaf868b05426d3b8cd8ab52bc5 Reviewed-on: https://go-review.googlesource.com/20298 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 05 Mar, 2016 1 commit
-
-
Matthew Dempsky authored
Instead make substArgTypes responsible for cloning the function definition Node and the function signature Type tree. Passes toolstash -cmp. Change-Id: I9ec84c90a7ae83d164d3f578e84a91cf1490d8ab Reviewed-on: https://go-review.googlesource.com/20239 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 04 Mar, 2016 4 commits
-
-
Brad Fitzpatrick authored
Change-Id: Ib632ee7ac893750bec4cfe223745bca5f31900ab Reviewed-on: https://go-review.googlesource.com/20234Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Also fix some uses of nodeSeqIterator.Len, and fix the implementation in nodesIterator. Passes toolstash -cmp. Update #14473. Change-Id: I228871470234b7f1314ffd2aae8a4c0624c35f98 Reviewed-on: https://go-review.googlesource.com/20231 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Passing copy==1 to syslook is only necessary to support subsequent calls to substArgTypes. typ2Itab and concatstring* don't have "any" parameters, so no point in deep copying their function signatures at every call site. For a couple other syslook calls (makemap and conv[IET]2[IET]), move them closer to their corresponding substArgTypes calls so it's easier to see that all syslook(fn, 1) calls are necessary. Change-Id: I4a0588ab2b8b5b8ce7a0a44b24c8cf8fda489af6 Reviewed-on: https://go-review.googlesource.com/20215 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Pases toolstash -cmp. Update #14473. Change-Id: I450d9f51fd280da91952008cd917b749d88960a3 Reviewed-on: https://go-review.googlesource.com/20210 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 03 Mar, 2016 4 commits
-
-
Ian Lance Taylor authored
Added Seq method to nodeListIterator. Added new functions nodeSeqLen, nodeSeqFirst, nodeSeqSecond. Allow nil as source argument to setNodeSeq. Change-Id: Ifc1cd4d7207b7a125b3830c92c4d6d6f00eedd54 Reviewed-on: https://go-review.googlesource.com/20195Reviewed-by:
David Crawshaw <crawshaw@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
I tried to write a program to convert *NodeList to Node, but ran into too many problem cases. I'm backing off and trying a more iterative approach using interfaces. This CL adds an interface for iteration over either a *NodeList or a Nodes. I changed typechecklist to use it, to show how it works. After NodeList is eliminated, we can change the typechecklist parameter type to Nodes. Passes toolstash -cmp. Change-Id: I5c7593714b020d20868b99151b1e7cadbbdbc397 Reviewed-on: https://go-review.googlesource.com/20190 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
The ODOTPTRs introduced in CL #19814 don't have field names, just offsets. The fieldtrack experiment crashes when examining them. Instead, just ignore them. We'll never track these fields anyway. It would be nice to have the runtime type struct build in the compiler (like we do sudog, for example) so we could use its fieldnames. Doesn't seem worth it just for this CL. Change-Id: I5e75024f5a8333eb7439543b3f466ea40213a1b9 Reviewed-on: https://go-review.googlesource.com/20157Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
Change-Id: Ia3e5d62b9d38a6c356baec8eb88b2bdabff5820f Reviewed-on: https://go-review.googlesource.com/20150Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Run-TryBot: Robert Griesemer <gri@golang.org>
-
- 02 Mar, 2016 3 commits
-
-
Robert Griesemer authored
- removed lots of unnecessary int(x) casts - removed parserline() - was inconsistently used anyway - minor simplifications in dcl.go Change-Id: Ibf7de679eea528a31c9692ef1c76a1d9b3239211 Reviewed-on: https://go-review.googlesource.com/20131Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
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/20022Reviewed-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>
-
Ian Lance Taylor authored
The size calculation has been wrong since this code was first committed in https://golang.org/cl/3120. The effect was that the compiler always allocated a temporary buffer on the stack for a non-escaping string concatenation. This turns out to make no practical difference, as the compiler always allocates a buffer of the same size (32 bytes) and the runtime only uses the temporary buffer if the concatenated strings fit (check is in rawstringtmp in runtime/string.go). The effect of this change is to avoid generating a temporary buffer on the stack that will not be used. Change-Id: Id632bfe3d6c113c9934c018a2dd4bcbf1784a63d Reviewed-on: https://go-review.googlesource.com/20112 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 29 Feb, 2016 1 commit
-
-
Ian Lance Taylor authored
Passes toolstash -cmp. Casual timings show about a 3% improvement in compile times. Update #14473. Change-Id: I584add2e8f1a52486ba418b25ba6122b7347b643 Reviewed-on: https://go-review.googlesource.com/19989Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 27 Feb, 2016 1 commit
-
-
Ian Lance Taylor authored
Introduces a new types Nodes that can be used to replace NodeList. Update #14473. Change-Id: Id77c5dcae0cbeb898ba12dd46bd400aad408871c Reviewed-on: https://go-review.googlesource.com/19969Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 26 Feb, 2016 1 commit
-
-
Ian Lance Taylor authored
A slice uses less memory than a NodeList, and has better memory locality when walking the list. This uncovered a tricky case involving closures: the escape analysis pass when run on a closure was appending to the Dcl list of the OCLOSURE rather than the ODCLFUNC. This happened to work because they shared the same NodeList. Fixed with a change to addrescapes, and a check to Tempname to catch any recurrences. This removes the last use of the listsort function outside of tests. I'll send a separate CL to remove it. Unfortunately, while this passes all tests, it does not pass toolstash -cmp. The problem is that cmpstackvarlt does not fully determine the sort order, and the change from listsort to sort.Sort, while generally desirable, produces a different ordering. I could stage this by first making cmpstackvarlt fully determined, but no matter what toolstash -cmp is going to break at some point. In my casual testing the compiler is 2.2% faster. Update #14473. Change-Id: I367d66daa4ec73ed95c14c66ccda3a2133ad95d5 Reviewed-on: https://go-review.googlesource.com/19919Reviewed-by:
Brad Fitzpatrick <bradfitz@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/16610Reviewed-by:
Keith Randall <khr@golang.org>
-
- 21 Feb, 2016 1 commit
-
-
Josh Bleecher Snyder authored
All [0]T values are equal. [1]T values are equal iff their sole components are. This types show up most frequently as a by-product of variadic function calls, such as fmt.Printf("abc") or fmt.Printf("%v", x). Cuts 12k off cmd/go and 22k off golang.org/x/tools/cmd/godoc, approx 0.1% each. For #6853 and #9930 Change-Id: Ic9b7aeb8cc945804246340f6f5e67bbf6008773e Reviewed-on: https://go-review.googlesource.com/19766Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 14 Jan, 2016 1 commit
-
-
Russ Cox authored
Consider this code: func f(*int) func g() { p := new(int) f(p) } where f is an assembly function. In general liveness analysis assumes that during the call to f, p is dead in this frame. If f has retained p, p will be found alive in f's frame and keep the new(int) from being garbage collected. This is all correct and works. We use the Go func declaration for f to give the assembly function liveness information (the arguments are assumed live for the entire call). Now consider this code: func h1() { p := new(int) syscall.Syscall(1, 2, 3, uintptr(unsafe.Pointer(p))) } Here syscall.Syscall is taking the place of f, but because its arguments are uintptr, the liveness analysis and the garbage collector ignore them. Since p is no longer live in h once the call starts, if the garbage collector scans the stack while the system call is blocked, it will find no reference to the new(int) and reclaim it. If the kernel is going to write to *p once the call finishes, reclaiming the memory is a mistake. We can't change the arguments or the liveness information for syscall.Syscall itself, both for compatibility and because sometimes the arguments really are integers, and the garbage collector will get quite upset if it finds an integer where it expects a pointer. The problem is that these arguments are fundamentally untyped. The solution we have taken in the syscall package's wrappers in past releases is to insert a call to a dummy function named "use", to make it look like the argument is live during the call to syscall.Syscall: func h2() { p := new(int) syscall.Syscall(1, 2, 3, uintptr(unsafe.Pointer(p))) use(unsafe.Pointer(p)) } Keeping p alive during the call means that if the garbage collector scans the stack during the system call now, it will find the reference to p. Unfortunately, this approach is not available to users outside syscall, because 'use' is unexported, and people also have to realize they need to use it and do so. There is much existing code using syscall.Syscall without a 'use'-like function. That code will fail very occasionally in mysterious ways (see #13372). This CL fixes all that existing code by making the compiler do the right thing automatically, without any code modifications. That is, it takes h1 above, which is incorrect code today, and makes it correct code. Specifically, if the compiler sees a foreign func definition (one without a body) that has uintptr arguments, it marks those arguments as "unsafe uintptrs". If it later sees the function being called with uintptr(unsafe.Pointer(x)) as an argument, it arranges to mark x as having escaped, and it makes sure to hold x in a live temporary variable until the call returns, so that the garbage collector cannot reclaim whatever heap memory x points to. For now I am leaving the explicit calls to use in package syscall, but they can be removed early in a future cycle (likely Go 1.7). The rule has no effect on escape analysis, only on liveness analysis. Fixes #13372. Change-Id: I2addb83f70d08db08c64d394f9d06ff0a063c500 Reviewed-on: https://go-review.googlesource.com/18584Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 15 Dec, 2015 1 commit
-
-
Matthew Dempsky authored
After fixing #13587, I noticed that the "OAS2FUNC in disguise" block looked like it probably needed write barriers too. However, testing revealed the multi-value "return f()" case was already being handled correctly. It turns out this block is dead code due to "return f()" already being transformed into "t1, t2, ..., tN := f(); return t1, t2, ..., tN" by orderstmt when f is a multi-valued function. Updates #13587. Change-Id: Icde46dccc55beda2ea5fd5fcafc9aae26cec1552 Reviewed-on: https://go-review.googlesource.com/17759 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 12 Dec, 2015 1 commit
-
-
Matthew Dempsky authored
Copying return values to heap-escaped result parameters requires write barriers. Fixes #13587. Change-Id: Ifa04ff7fa4adcc6393acdd82e527beb8f2a00a8b Reviewed-on: https://go-review.googlesource.com/17762Reviewed-by:
Keith Randall <khr@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 07 Dec, 2015 1 commit
-
-
Matthew Dempsky authored
algtype already controls the behavior of the normal map access code paths, so it makes sense to base the decision on which optimized paths are applicable on it too. Enables use of optimized paths for key types like [8]byte and struct{s string}. Fixes #13271. Change-Id: I48c52d97abaa7259ad5aba9641ea996a967cd359 Reviewed-on: https://go-review.googlesource.com/17464 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 12 Nov, 2015 1 commit
-
-
Yao Zhang authored
It is based on ppc64 compiler. Change-Id: I15a101df05f2919ba5292136957ba0009227d067 Reviewed-on: https://go-review.googlesource.com/14445Reviewed-by:
Minux Ma <minux@golang.org>
-
- 30 Oct, 2015 1 commit
-
-
Marvin Stenger authored
Type Op is enfored now. Type EType will need further CLs. Added TODOs where Node.EType is used as a union type. The TODOs have the format `TODO(marvin): Fix Node.EType union type.`. Furthermore: -The flag of Econv function in fmt.go is removed, since unused. -Some cleaning along the way, e.g. declare vars first when getting initialized. Passes go build -toolexec 'toolstash -cmp' -a std. Fixes #11846 Change-Id: I908b955d5a78a195604970983fb9194bd9e9260b Reviewed-on: https://go-review.googlesource.com/14956Reviewed-by:
Keith Randall <khr@golang.org> Reviewed-by:
Marvin Stenger <marvin.stenger94@gmail.com>
-
- 26 Oct, 2015 1 commit
-
-
Robert Griesemer authored
Change-Id: I956e27fa07f16060b8f41b986d991c36557f7c12 Reviewed-on: https://go-review.googlesource.com/16332Reviewed-by:
Keith Randall <khr@golang.org>
-
- 23 Oct, 2015 2 commits
-
-
Håvard Haugen authored
Passes go build -a -toolexec 'toolstash -cmp' std cmd. Change-Id: Ib3d2c50601546495e7f1ab153d2978b1e3774101 Reviewed-on: https://go-review.googlesource.com/14800 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Robert Griesemer <gri@golang.org>
-
Jeremy Jackins authored
Update old c-style comments to look like Go comments. Also replace some lingering references to old .c files that don't exist anymore. Change-Id: I72b2407a40fc76c23e9048643e0622fd70b4cf90 Reviewed-on: https://go-review.googlesource.com/16190 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 21 Oct, 2015 2 commits
-
-
Ian Lance Taylor authored
The -msan option causes the compiler to add instrumentation for the C/C++ memory sanitizer. Every memory read/write will be preceded by a call to msanread/msanwrite. This CL passes tests but is not usable by itself. The actual implementation of msanread/msanwrite in the runtime package, and support for -msan in the go tool and the linker, and tests, will follow in subsequent CLs. Change-Id: I3d517fb3e6e65d9bf9433db070a420fd11f57816 Reviewed-on: https://go-review.googlesource.com/16160Reviewed-by:
David Crawshaw <crawshaw@golang.org>
-
Ian Lance Taylor authored
This is mechanical change that is a step toward reusing the racewalk pass for a more general instrumentation pass. The first use will be to add support for the memory sanitizer. Change-Id: I75b93b814ac60c1db1660e0b9a9a7d7977d86939 Reviewed-on: https://go-review.googlesource.com/16105Reviewed-by:
Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by:
David Crawshaw <crawshaw@golang.org>
-