1. 21 Apr, 2015 3 commits
  2. 20 Apr, 2015 16 commits
  3. 19 Apr, 2015 2 commits
  4. 18 Apr, 2015 9 commits
  5. 17 Apr, 2015 10 commits
    • Mikio Hara's avatar
      net: clean up cgo · 6d3a7e79
      Mikio Hara authored
      This change adds a type addrinfoErrno to represent getaddrinfo,
      getnameinfo-specific errors, and uses it in cgo-based lookup functions.
      
      Also retags cgo files for clarification and does minor cleanup.
      
      Change-Id: I6db7130ad7bf35bbd4e8839a97759e1364c43828
      Reviewed-on: https://go-review.googlesource.com/9020Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      6d3a7e79
    • David Crawshaw's avatar
      cmd/internal/ld: replace Diag;Errorexit with Exitf · 7816a096
      David Crawshaw authored
      I have left the Diag calls in place where I believe Ctxt.Cursym != nil
      which means this CL is not the improvement I had hoped for. However
      it is now safe to call Exitf whereever you are in the linker, which
      makes it easier to reason about some code.
      
      Change-Id: I8261e761ca9719f7d216e2747314adfe464e3337
      Reviewed-on: https://go-review.googlesource.com/8668Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7816a096
    • David Crawshaw's avatar
      misc/cgo/testcarchive: check that os.Args is set · c5befcf0
      David Crawshaw authored
      Change-Id: I4278abca9d2a8f25149fa8935a93d32e7d04a43a
      Reviewed-on: https://go-review.googlesource.com/9050Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      c5befcf0
    • Matthew Dempsky's avatar
      encoding/gob: fix hang from skipping large slices · 4d01922e
      Matthew Dempsky authored
      Change-Id: I4e59b5b1702e08d7c6191d0a70fb0a555f3340c8
      Reviewed-on: https://go-review.googlesource.com/9061
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      4d01922e
    • Rob Pike's avatar
      doc/go1.5.txt: go generate: add $GOLINE · 223ab4db
      Rob Pike authored
      Change-Id: I9968ce162996e71843eeaf9764d216c401427fed
      Reviewed-on: https://go-review.googlesource.com/9040Reviewed-by: default avatarRob Pike <r@golang.org>
      223ab4db
    • Rob Pike's avatar
      doc/articles/go_command.html: mention go generate · 7df2854f
      Rob Pike authored
      Fix some out-of-date remarks.
      
      Fixes #10489.
      
      Change-Id: I8f0cce2588828052a5d013e7bac6bcfeb220579d
      Reviewed-on: https://go-review.googlesource.com/9008Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      7df2854f
    • Rob Pike's avatar
      cmd/go: add $GOLINE to generate · 9c3bf097
      Rob Pike authored
      Also use os.Expand for variable substitution so ${x}y works.
      
      Fixes #9960.
      
      Change-Id: Ic8239b2e737d1f41910dde8ee9524ac48907cb03
      Reviewed-on: https://go-review.googlesource.com/9007Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      9c3bf097
    • Josh Bleecher Snyder's avatar
      cmd/internal/gc, cmd/6g: generate boolean values without jumps · 13cb62c7
      Josh Bleecher Snyder authored
      Use SETcc instructions instead of Jcc to generate boolean values.
      This generates shorter, jump-free code, which may in turn enable other
      peephole optimizations.
      
      For example, given
      
      func f(i, j int) bool {
      	return i == j
      }
      
      Before
      
      "".f t=1 size=32 value=0 args=0x18 locals=0x0
      	0x0000 00000 (x.go:3)	TEXT	"".f(SB), $0-24
      	0x0000 00000 (x.go:3)	FUNCDATA	$0, gclocals·b4c25e9b09fd0cf9bb429dcefe91c353(SB)
      	0x0000 00000 (x.go:3)	FUNCDATA	$1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
      	0x0000 00000 (x.go:4)	MOVQ	"".i+8(FP), BX
      	0x0005 00005 (x.go:4)	MOVQ	"".j+16(FP), BP
      	0x000a 00010 (x.go:4)	CMPQ	BX, BP
      	0x000d 00013 (x.go:4)	JEQ	21
      	0x000f 00015 (x.go:4)	MOVB	$0, "".~r2+24(FP)
      	0x0014 00020 (x.go:4)	RET
      	0x0015 00021 (x.go:4)	MOVB	$1, "".~r2+24(FP)
      	0x001a 00026 (x.go:4)	JMP	20
      
      After
      
      "".f t=1 size=32 value=0 args=0x18 locals=0x0
      	0x0000 00000 (x.go:3)	TEXT	"".f(SB), $0-24
      	0x0000 00000 (x.go:3)	FUNCDATA	$0, gclocals·b4c25e9b09fd0cf9bb429dcefe91c353(SB)
      	0x0000 00000 (x.go:3)	FUNCDATA	$1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
      	0x0000 00000 (x.go:4)	MOVQ	"".i+8(FP), BX
      	0x0005 00005 (x.go:4)	MOVQ	"".j+16(FP), BP
      	0x000a 00010 (x.go:4)	CMPQ	BX, BP
      	0x000d 00013 (x.go:4)	SETEQ	"".~r2+24(FP)
      	0x0012 00018 (x.go:4)	RET
      
      regexp benchmarks, best of 12 runs:
      
      benchmark                                 old ns/op      new ns/op      delta
      BenchmarkNotOnePassShortB                 782            733            -6.27%
      BenchmarkLiteral                          180            171            -5.00%
      BenchmarkNotLiteral                       2855           2721           -4.69%
      BenchmarkMatchHard_32                     2672           2557           -4.30%
      BenchmarkMatchHard_1K                     80182          76732          -4.30%
      BenchmarkMatchEasy1_32M                   76440180       73304748       -4.10%
      BenchmarkMatchEasy1_32K                   68798          66350          -3.56%
      BenchmarkAnchoredLongMatch                482            465            -3.53%
      BenchmarkMatchEasy1_1M                    2373042        2292692        -3.39%
      BenchmarkReplaceAll                       2776           2690           -3.10%
      BenchmarkNotOnePassShortA                 1397           1360           -2.65%
      BenchmarkMatchClass_InRange               3842           3742           -2.60%
      BenchmarkMatchEasy0_32                    125            122            -2.40%
      BenchmarkMatchEasy0_32K                   11414          11164          -2.19%
      BenchmarkMatchEasy0_1K                    668            654            -2.10%
      BenchmarkAnchoredShortMatch               260            255            -1.92%
      BenchmarkAnchoredLiteralShortNonMatch     164            161            -1.83%
      BenchmarkOnePassShortB                    623            612            -1.77%
      BenchmarkOnePassShortA                    801            788            -1.62%
      BenchmarkMatchClass                       4094           4033           -1.49%
      BenchmarkMatchEasy0_32M                   14078800       13890704       -1.34%
      BenchmarkMatchHard_32K                    4095844        4045820        -1.22%
      BenchmarkMatchEasy1_1K                    1663           1643           -1.20%
      BenchmarkMatchHard_1M                     131261708      129708215      -1.18%
      BenchmarkMatchHard_32M                    4210112412     4169292003     -0.97%
      BenchmarkMatchMedium_32K                  2460752        2438611        -0.90%
      BenchmarkMatchEasy0_1M                    422914         419672         -0.77%
      BenchmarkMatchMedium_1M                   78581121       78040160       -0.69%
      BenchmarkMatchMedium_32M                  2515287278     2498464906     -0.67%
      BenchmarkMatchMedium_32                   1754           1746           -0.46%
      BenchmarkMatchMedium_1K                   52105          52106          +0.00%
      BenchmarkAnchoredLiteralLongNonMatch      185            185            +0.00%
      BenchmarkMatchEasy1_32                    107            107            +0.00%
      BenchmarkOnePassLongNotPrefix             505            505            +0.00%
      BenchmarkOnePassLongPrefix                147            147            +0.00%
      
      The godoc binary is ~0.12% smaller after this CL.
      
      Updates #5729.
      
      toolstash -cmp passes for all architectures other than amd64 and amd64p32.
      
      Other architectures can be done in follow-up CLs.
      
      Change-Id: I0e167e259274b722958567fc0af83a17ca002da7
      Reviewed-on: https://go-review.googlesource.com/2284Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      13cb62c7
    • Ian Lance Taylor's avatar
      runtime: add -buildmode=c-archive/c-shared support for linux/386 · 9c1868d0
      Ian Lance Taylor authored
      Change-Id: I87147ca6bb53e3121cc4245449c519509f107638
      Reviewed-on: https://go-review.googlesource.com/9009
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
      9c1868d0
    • Russ Cox's avatar
      cmd/internal/gc: make use of new String methods in prints · 17228f44
      Russ Cox authored
      $ sam -d cmd/internal/gc/*.{go,y} cmd/?g/*.go
      X ,s/, (gc\.)?[BFHNST]conv\(([^()]+), 0\)/, \2/g
      X/'/w
      q
      $
      
      Change-Id: Ic28a4807d237b8ae53ceca1e4e7fdb43580ab560
      Reviewed-on: https://go-review.googlesource.com/9032Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      17228f44