An error occurred fetching the project authors.
- 10 Mar, 2016 1 commit
-
-
Matthew Dempsky authored
Also, more lazy variable declarations, and make Dijkstra happy by replacing "goto loop" with a for loop. Change-Id: Idf2cd779a92eb3f33bd3394e12c9a0be72002ff4 Reviewed-on: https://go-review.googlesource.com/20496Reviewed-by:
Dave Cheney <dave@cheney.net> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 09 Mar, 2016 2 commits
-
-
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>
-
- 08 Mar, 2016 1 commit
-
-
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>
-
- 07 Mar, 2016 1 commit
-
-
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>
-
- 03 Mar, 2016 2 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>
-
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 2 commits
-
-
Robert Griesemer authored
Change-Id: Ic9ca792b55cc4ebd0ac6cfa2fbdb58030893bacd Reviewed-on: https://go-review.googlesource.com/20132 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
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>
-
- 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>
-
- 12 Feb, 2016 1 commit
-
-
Keith Randall authored
Type switches need write barriers if the written-to variable is heap allocated. For the added needwritebarrier call, the right arg doesn't really matter, I just pass something that will never disqualify the write barrier. The left arg is the one that matters. Fixes #14306 Change-Id: Ic2754167cce062064ea2eeac2944ea4f77cc9c3b Reviewed-on: https://go-review.googlesource.com/19481Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 27 Jan, 2016 1 commit
-
-
Russ Cox authored
This debugging print crept into an earlier CL of mine. Change-Id: If6e8609e69a60aec50c06889c2d98a8b8a4bd02b Reviewed-on: https://go-review.googlesource.com/18971 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by:
Ian Lance Taylor <iant@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>
-
- 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>
-
- 23 Oct, 2015 1 commit
-
-
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>
-
- 07 Sep, 2015 1 commit
-
-
Dave Cheney authored
Convert Label.Used to a boolean. Also move the field to the bottom of the struct to avoid padding. This change passes go build -toolexec 'toolstash -cmp' -a std. Change-Id: If09ee92f9d54dce807e7b862cf771005daed810d Reviewed-on: https://go-review.googlesource.com/14308 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 01 Sep, 2015 2 commits
-
-
Håvard Haugen authored
Change-Id: I021c95df24edbff24ff2922769ef2b2acd47016a Reviewed-on: https://go-review.googlesource.com/14081 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Dave Cheney <dave@cheney.net>
-
Håvard Haugen authored
See report in commit 3c9fa388. Change-Id: I74a5995a1c1ca62b8d01857e89b084502e7da928 Reviewed-on: https://go-review.googlesource.com/14170Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 31 Aug, 2015 1 commit
-
-
Håvard Haugen authored
This helps vet see a real issue: cmd/internal/gc$ go vet gen.go:1223: unreachable code Fixes #12106. Change-Id: I720868b07ae6b6d5a4dc6b238baa8c9c889da6d8 Reviewed-on: https://go-review.googlesource.com/14083Reviewed-by:
Minux Ma <minux@golang.org> Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 28 Jul, 2015 1 commit
-
-
Josh Bleecher Snyder authored
The existing backend recognizes special assignment statements as being implementable with static data rather than code. Unfortunately, it assumes that it is in the middle of codegen; it emits data and modifies the AST. This does not play well with SSA's two-phase bootstrapping approach, in which we attempt to compile code but fall back to the existing backend if something goes wrong. To work around this: * Add the ability to inquire about static data without side-effects. * Save the static data required for a function. * Emit that static data during SSA codegen. Change-Id: I2e8a506c866ea3e27dffb597095833c87f62d87e Reviewed-on: https://go-review.googlesource.com/12790Reviewed-by:
Keith Randall <khr@golang.org>
-
- 23 Jul, 2015 1 commit
-
-
Josh Bleecher Snyder authored
Add label and goto checks and improve test coverage. Implement OSWITCH and OSELECT. Implement OBREAK and OCONTINUE. Allow generation of code in dead blocks. Change-Id: Ibebb7c98b4b2344f46d38db7c9dce058c56beaac Reviewed-on: https://go-review.googlesource.com/12445Reviewed-by:
Keith Randall <khr@golang.org>
-
- 04 Jun, 2015 1 commit
-
-
Russ Cox authored
$ sizeof -p cmd/compile/internal/gc Node Node 144 $ Change-Id: I688e3790964fe42f48c19f697ec38094a92fe1c1 Reviewed-on: https://go-review.googlesource.com/10531Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 03 Jun, 2015 7 commits
-
-
Russ Cox authored
$ sizeof -p cmd/compile/internal/gc Node Node 168 $ Change-Id: If624a2d72ec04ef30a1bc7ce76c0d61a526d8a37 Reviewed-on: https://go-review.googlesource.com/10532Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
$ sizeof -p cmd/compile/internal/gc Node Node 176 $ Change-Id: Ibf1ab531a60d4af8a0c242c0e504f4fd50cd5b36 Reviewed-on: https://go-review.googlesource.com/10530Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Russ Cox authored
$ sizeof -p cmd/compile/internal/gc Node Node 240 $ Change-Id: Id12710c480ed4e0a5bf4f5006f6bd56ef91a2af1 Reviewed-on: https://go-review.googlesource.com/10525Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Russ Cox authored
$ sizeof -p cmd/compile/internal/gc Node Node 248 $ Change-Id: I0fbfeb0d0b36e225eb282fce9e480a96ec1d278f Reviewed-on: https://go-review.googlesource.com/10524Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Russ Cox authored
$ sizeof -p cmd/compile/internal/gc Node Node 256 $ Change-Id: I89ac8bbe077664aa076092bfd096947e84c0624c Reviewed-on: https://go-review.googlesource.com/10523Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Russ Cox authored
$ sizeof -p cmd/compile/internal/gc Node Node 272 $ Change-Id: I3d9b67eebfc0be0a4b9768d3de3dc76300abd89c Reviewed-on: https://go-review.googlesource.com/10521Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Russ Cox authored
$ sizeof -p cmd/compile/internal/gc Node Node 288 $ Change-Id: I4e316efa246132b3faa3a892e4fe9c9039250665 Reviewed-on: https://go-review.googlesource.com/10520Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
- 28 May, 2015 1 commit
-
-
Josh Bleecher Snyder authored
This is an automated follow-up to CL 10210. It was generated with a combination of eg and gofmt -r. No functional changes. Passes toolstash -cmp. Change-Id: I35f5897948a270b472d8cf80612071b4b29e9a2b Reviewed-on: https://go-review.googlesource.com/10253Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 21 May, 2015 1 commit
-
-
Russ Cox authored
Trivial merging of 5g, 6g, ... into go tool compile, and similarlly 5l, 6l, ... into go tool link. The files compile/main.go and link/main.go are new. Everything else in those directories is a move followed by change of imports and package name. This CL breaks the build. Manual fixups are in the next CL. See golang-dev thread titled "go tool compile, etc" for background. Change-Id: Id35ff5a5859ad9037c61275d637b1bd51df6828b Reviewed-on: https://go-review.googlesource.com/10287Reviewed-by:
Dave Cheney <dave@cheney.net> Reviewed-by:
Rob Pike <r@golang.org>
-
- 15 May, 2015 5 commits
-
-
Josh Bleecher Snyder authored
This is an automated follow-up to CL 10120. It was generated with a combination of eg and gofmt -r. No functional changes. Passes toolstash -cmp. Change-Id: I0dc6d146372012b4cce9cc4064066daa6694eee6 Reviewed-on: https://go-review.googlesource.com/10144Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
This reverts commit 5726af54. It broke all the builds. Change-Id: I4b1dde86f9433717d303c1dabd6aa1a2bf97fab2 Reviewed-on: https://go-review.googlesource.com/10143Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Daniel Morsing authored
Fixes #8042. Change-Id: I75080f24104256065fd73b07a13c5b8e7d6da94c Reviewed-on: https://go-review.googlesource.com/9442Reviewed-by:
Russ Cox <rsc@golang.org>
-
Josh Bleecher Snyder authored
This CL was generated by updating Val in go.go and then running: sed -i "" 's/\.U\.[SBXFC]val = /.U = /' *.go sed -i "" 's/\.U\.Sval/.U.\(string\)/g' *.go *.y sed -i "" 's/\.U\.Bval/.U.\(bool\)/g' *.go *.y sed -i "" 's/\.U\.Xval/.U.\(\*Mpint\)/g' *.go *.y sed -i "" 's/\.U\.Fval/.U.\(\*Mpflt\)/g' *.go *.y sed -i "" 's/\.U\.Cval/.U.\(\*Mpcplx\)/g' *.go *.y No functional changes. Passes toolstash -cmp. This reduces the size of gc.Node from 424 to 392 bytes. This in turn reduces the permanent (pprof -inuse_space) memory usage while compiling the test/rotate?.go tests: test old(MB) new(MB) change rotate0 379.49 364.78 -3.87% rotate1 373.42 359.07 -3.84% rotate2 381.17 366.24 -3.91% rotate3 374.30 359.95 -3.83% CL 8445 was similar to this; gri asked that Val's implementation be hidden first. CLs 8912, 9263, and 9267 have at least isolated the changes to the cmd/internal/gc package. Updates #9933. Change-Id: I83ddfe003d48e0a73c92e819edd3b5e620023084 Reviewed-on: https://go-review.googlesource.com/10059Reviewed-by:
Russ Cox <rsc@golang.org>
-
Josh Bleecher Snyder authored
This trivial change is a prerequisite to converting Val.U to an interface{}. No functional changes. Passes toolstash -cmp. Change-Id: I17ff036f68d29a9ed0097a8b23ae1c91e6ce8c21 Reviewed-on: https://go-review.googlesource.com/10058Reviewed-by:
Russ Cox <rsc@golang.org>
-
- 14 May, 2015 1 commit
-
-
Shenghou Ma authored
Fixes #10805. Change-Id: Ia77639e606a0c18fc53cba9749d92f325014025f Reviewed-on: https://go-review.googlesource.com/10040Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-