- 16 Mar, 2016 3 commits
-
-
Mikio Hara authored
Change-Id: I5dbcdf0ee0b46b760b2a7decb1d937aac2a6fa8d Reviewed-on: https://go-review.googlesource.com/20585 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Todd Neal authored
Change-Id: I01c000ff3f6dc6b0ed691e289eeef0fa61500337 Reviewed-on: https://go-review.googlesource.com/20744Reviewed-by: Keith Randall <khr@golang.org>
-
Martin Möhrmann authored
Use constants instead of dynamically computed values to determine the bit sizes of types similar to how strconv and other packages directly compute these sizes. Move these constants near the code that uses them. Change-Id: I78d113b7e697466097e32653975df5990380c2c1 Reviewed-on: https://go-review.googlesource.com/20514 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
- 15 Mar, 2016 24 commits
-
-
Dave Day authored
This change also refactors SplitHostPort to avoid using gotos and naked returns. Fixes #14827 Change-Id: I4dca528936757fd06da76c23af8a0f6175bbedd1 Reviewed-on: https://go-review.googlesource.com/20726Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Todd Neal authored
Change-Id: Ieefeceea40bd29657fd519368b0920dad8443844 Reviewed-on: https://go-review.googlesource.com/20712 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
They've been on for a few weeks of general use and nothing has tripped up on them yet. Makes the compiler ~18% faster. Change-Id: I42d7bbc0581597f9cf4fb28989847814c81b08a2 Reviewed-on: https://go-review.googlesource.com/20741Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Matloob authored
The new link is https://golang.org/s/go15heapdump. Change-Id: Ifcaf8572bfe815ffaa78442a1991f6e20e990a50 Reviewed-on: https://go-review.googlesource.com/20740Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
The obj.Fmt* values are only used by gc/fmt.go, so just move them there. Also, add comments documenting the correspondance between FmtFoo names and their flag characters to make understanding the existing documentation slightly less confusing. While here, add a new FmtFlag named type to represent these values. Change-Id: I9631214b892557d094823f1ac575d0c43a84007b Reviewed-on: https://go-review.googlesource.com/20717 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Wedson Almeida Filho authored
Change Cond implementation to use a notification list such that waiters can first register for a notification, release the lock, then actually wait. Signalers never have to park anymore. This is intended to address an issue in the previous implementation where Broadcast could fail to signal all waiters. Results of the existing benchmark are below. Original New Diff BenchmarkCond1-48 2000000 745 ns/op 755 +1.3% BenchmarkCond2-48 1000000 1545 ns/op 1532 -0.8% BenchmarkCond4-48 300000 3833 ns/op 3896 +1.6% BenchmarkCond8-48 200000 10049 ns/op 10257 +2.1% BenchmarkCond16-48 100000 21123 ns/op 21236 +0.5% BenchmarkCond32-48 30000 40393 ns/op 41097 +1.7% Fixes #14064 Change-Id: I083466d61593a791a034df61f5305adfb8f1c7f9 Reviewed-on: https://go-review.googlesource.com/18892Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Caleb Spare <cespare@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Caleb Spare authored
While we're at it, add tests for EncodedLen and DecodedLen. Fixes #14803. Change-Id: I200c72cf11c51669b8d9f70c6e57ece359f7ae61 Reviewed-on: https://go-review.googlesource.com/20649Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Change-Id: I34cdc9cb3d32e86ff3a57db0012326c39cd55670 Reviewed-on: https://go-review.googlesource.com/20718Reviewed-by: Robert Griesemer <gri@golang.org>
-
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>
-
Matthew Dempsky authored
All of a struct's fields have to fit into memory anyway, so index them with int instead of int64. This also makes it nicer for cmd/compile/internal/gc to reuse the same NumFields function. Change-Id: I210be804a0c33370ec9977414918c02c675b0fbe Reviewed-on: https://go-review.googlesource.com/20691Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
Remove method type information for pruned methods from any program that does not reflect on methods. This can be a significant saving: addr2line: -310KB (8.8%) A future update might want to consider a more aggressive variant of this: setting the Type and Func fields of reflect.Method to nil for unexported methods. That would shrink cmd/go by 2% and jujud by 2.6% but could be considered an API change. So this CL sticks to the uncontroversial change. For #6853. Change-Id: I5d186d9f822dc118ee89dc572c4912a3b3c72577 Reviewed-on: https://go-review.googlesource.com/20701 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
Make sure symbol gets carried along by load-combining rule. Add the new load into the right block where we know that mem is live. Use auxInt field to carry i along instead of an explicit ADDQ. Incorporate LEA ops into MOVBQZX and friends. Change-Id: I587f7c6120b98fd2a0d48ddd6ddd13345d4421b4 Reviewed-on: https://go-review.googlesource.com/20732 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Todd Neal <todd@tneal.org>
-
Alberto Donizetti authored
Silence vet. Change-Id: I987438847389500cf3b5bc545ef918c66917b51a Reviewed-on: https://go-review.googlesource.com/20683Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Turns out there were only two call sites that expected t.Field(t.NumFields()) to return nil. Change-Id: I4679988d38ee9d7c9d89883537a17046717b2a77 Reviewed-on: https://go-review.googlesource.com/20731 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Russ Cox authored
On my Mac I am in group 5000 which apparently has no name (I suspect because it is an LDAP group and I cannot reach the LDAP server). Do not make the test fail in that case. Fixes #14806 Change-Id: I56b11a8e86b048abfb00812eaad37802fd2adcc5 Reviewed-on: https://go-review.googlesource.com/20710Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dave Cheney authored
Change-Id: I8e990204c7a1e65d6b8e4262f6b5b9bd0cb3540c Reviewed-on: https://go-review.googlesource.com/20725 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dave Cheney authored
Make boolean looking things boolean. Change-Id: I8d1c0a32b471412b25a72908c7da6458d7bbe65b Reviewed-on: https://go-review.googlesource.com/20723 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shahar Kohanim authored
Symbols in the object file currently refer to each other using symbol name and version. Referring to the same symbol many times in an object file takes up space and causes redundant map lookups. Instead write out a list of unique symbol references and have symbols refer to each other using indexes into this list. Credit to Michael Hudson-Doyle for kicking this off. Reduces pkg/linux_amd64 size by 30% from 61MB to 43MB name old s/op new s/op delta LinkCmdGo 0.74 ± 3% 0.63 ± 4% -15.22% (p=0.000 n=20+20) LinkJuju 6.38 ± 6% 5.73 ± 6% -10.16% (p=0.000 n=20+19) Change-Id: I7e101a0c80b8e673a3ba688295e6f80ea04e1cfb Reviewed-on: https://go-review.googlesource.com/20099Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
CL 14603 attempted to preserve the callee-save registers for the darwin/arm runtime initialization routine, but I believe it wasn't sufficient and resulted in the crash reported in issue Saving and restoring the registers on the stack the same way linux/arm does seems more obvious and fixes #14778, so do that. Even though #14778 is not reproducible on darwin/arm64, I applied a similar change there, and to linux/arm64 which obeys the same calling convention. Finally, this CL is a candidate for a 1.6 minor release for the same reason CL 14603 was in a 1.5 minor release (as CL 16968). It is small and only touches the iOS platforms and gomobile on darwin/arm is currently useless without it. Fixes #14778 Fixes #12590 (again) Change-Id: I7401daf0bbd7c579a7e84761384a7b763651752a Reviewed-on: https://go-review.googlesource.com/20621Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Dave Cheney authored
Move the C header style architecture constants to the per arch Main methods. Change-Id: Ie7ff39baa275ceaa6680e7d16441ca9f0aa12597 Reviewed-on: https://go-review.googlesource.com/20722Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Dave Cheney authored
Partial automatic cleanup driven by Dominik Honnef's unused tool. As _lookup now only has one caller, merge it into the caller and remove the conditional create logic. Change-Id: I2ea354d9d4b32a19905271eca74725231b6d8a93 Reviewed-on: https://go-review.googlesource.com/20589 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
This is a band-aid, but it fixes the problem until a deeper fix is in place. Testing with genpkg -n 50000, I see: Before: 154.67 real 184.66 user 3.15 sys After: 61.82 real 96.99 user 2.17 sys Fixes #14781. Change-Id: I24c7822d60c289bdd6a18a7840b984954c95f7d4 Reviewed-on: https://go-review.googlesource.com/20696Reviewed-by: Robert Griesemer <gri@golang.org>
-
Martin Möhrmann authored
Treat the verb %X in the same special way as %q, %s and %x are for arrays and slices with byte type elements. Modify input for tests so the result of %x and %X is distinct. Change-Id: I38d227755e98c7fad5e4adc2f603c6873aa910fd Reviewed-on: https://go-review.googlesource.com/20516 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Jeremy Jackins authored
Change-Id: I928f51a1fe4830a81d4f5d3eb572785e06a75b77 Reviewed-on: https://go-review.googlesource.com/20581Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 14 Mar, 2016 13 commits
-
-
Robert Griesemer authored
Another step towards hooking up exported inlined function bodies. Change-Id: Ib8094b03ac7970fee0e51b5826b5f8aa232e23fb Reviewed-on: https://go-review.googlesource.com/20605Reviewed-by: Alan Donovan <adonovan@google.com> Run-TryBot: Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
Allows removing a bunch of unnecessary fields. Passes toolstash/buildall. Change-Id: Iec2492920e1c3ef352a9bf4296c74a55d9cc9ad6 Reviewed-on: https://go-review.googlesource.com/20677Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Workaround Go 1.4 compiler bugs. See discussion at: https://groups.google.com/d/msg/golang-dev/Ss7mCKsvk8w/Gsq7VYI0AwAJ Change-Id: I842335fddffb67a6e21c000fe5bef258ea61c77a Reviewed-on: https://go-review.googlesource.com/20690Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Emmanuel Odeke authored
Change-Id: I93e73f16474b4b31f7097af2f9479822dfc34c5c Reviewed-on: https://go-review.googlesource.com/20678Reviewed-by: Adam Langley <agl@golang.org>
-
Matthew Dempsky authored
Currently, the only use for this is on the Left side of OKEY nodes within struct literals. esc and fmt only care so they can recognize that the ONAME nodes are actually field names, which need special handling. sinit additionally needs to know the field's offset within the struct, which we can provide via Xoffset. Passes toolstash/buildall. Change-Id: I362d965e161f4d80fcd9c9bae0dfacc657dc0b29 Reviewed-on: https://go-review.googlesource.com/20676Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Passes toolstash -cmp. Change-Id: Id16009ef3ef1173eafe0f0c578dbf325b61aab3c Reviewed-on: https://go-review.googlesource.com/20674 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Switch TSTRUCT and TINTER to use Fields instead of Type, which wrings out the remaining few direct uses of the latter. Preparation for converting fields to use a separate "Field" type. Passes toolstash/buildall. Change-Id: I5a2ea7e159d0dde1be2c9afafc10a8f739d95743 Reviewed-on: https://go-review.googlesource.com/20675 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Josh Bleecher Snyder authored
Passes toolstash -cmp. Change-Id: Iaa0d78c2552efb29e67f6c99c7287f8566027add Reviewed-on: https://go-review.googlesource.com/20673Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
Follow-up to CL 20645. Passes toolstash -cmp. Change-Id: Idc63c41b2be2d52e3a6ac59b3a12eb41aa2efbed Reviewed-on: https://go-review.googlesource.com/20670Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
Change-Id: I434f881c10dec41a802641db8873abf1353beba2 Reviewed-on: https://go-review.googlesource.com/20671 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
String symbols' names used to appear in the final binary. Using a string's contents as it's symbol's name was a thus a bad idea if the string's name was long. Recent improvements by crawshaw have changed that. Instead of placing long strings behind opaque names in local packages, place them in the global string package and make them content-addressable. Symbol names still occur in the object files, so use a hash to avoid needless length there. Reduces the size of cmd/go by 30k. Change-Id: Ifdbbaf47bf44352418c90ddd903d5106e48db4f1 Reviewed-on: https://go-review.googlesource.com/20524 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Alexandru Moșoi authored
decompose-builtin pass requires an opt pass, but -N disables late-opt, the only opt pass (out of two) that happens after decompose-builtin. This CL enables both 'opt' and 'late opt' passes. The extra compile time for 'late opt' in negligible since most rewrites were already done in the first 'opt' (also measured before). We should put some effort in splitting the generic rules into required and optional. Also update generic.rules comments about lowering of StringMake and SliceMake. Tested with GO_GCFLAGS=-N ./all.bash Change-Id: I92999681aaa02587b6dc6e32ce997a91f1fc9499 Reviewed-on: https://go-review.googlesource.com/20682 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Pratt authored
Parts of the SSA compiler in package gc contain amd64-specific code, most notably Prog generation. Move this code into package amd64, so that other architectures can be added more easily. In package gc, this change is just moving code. There are no functional changes or even any larger structural changes beyond changing function names (mostly for export). In the cmd/compile/internal/ssa/gen tool, more information is included in arch to remove the AMD64-specific behavior in the main portion of the tool. The generated opGen.go is identical. Change-Id: I8eb37c6e6df6de1b65fa7dab6f3bc32c29daf643 Reviewed-on: https://go-review.googlesource.com/20609Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-