1. 22 Jan, 2013 11 commits
  2. 21 Jan, 2013 6 commits
  3. 20 Jan, 2013 3 commits
  4. 19 Jan, 2013 5 commits
  5. 18 Jan, 2013 15 commits
    • Russ Cox's avatar
      api: update next.txt · 1debf5bb
      Russ Cox authored
      R=golang-dev, minux.ma, dave
      CC=golang-dev
      https://golang.org/cl/7135061
      1debf5bb
    • Russ Cox's avatar
      math/big: fix typo · 92b2643c
      Russ Cox authored
      Fixes #4678.
      
      TBR=gri
      CC=golang-dev
      https://golang.org/cl/7135059
      92b2643c
    • Matthew Dempsky's avatar
      cmd/6c: Optimize rotate expressions to use rotate instructions. · bb192d13
      Matthew Dempsky authored
      For simplicity, only recognizes expressions of the exact form
      "(x << a) | (x >> b)" where x is a variable and a and b are
      integer constant expressions that add to x's bit width.
      
      Fixes #4629.
      
      $ cat rotate.c
      unsigned int
      rotate(unsigned int x)
      {
              x = (x << 3) | (x >> (sizeof(x) * 8 - 3));
              return x;
      }
      
      ## BEFORE
      $ go tool 6c -S rotate.c
      (rotate.c:2)	TEXT	rotate+0(SB),$0-8
      (rotate.c:2)	MOVL	x+0(FP),!!DX
      (rotate.c:4)	MOVL	DX,!!AX
      (rotate.c:4)	SALL	$3,!!AX
      (rotate.c:4)	MOVL	DX,!!CX
      (rotate.c:4)	SHRL	$29,!!CX
      (rotate.c:4)	ORL	CX,!!AX
      (rotate.c:5)	RET	,!!
      (rotate.c:5)	RET	,!!
      (rotate.c:5)	END	,!!
      
      ## AFTER
      $ go tool 6c -S rotate.c
      (rotate.c:2)	TEXT	rotate+0(SB),$0-8
      (rotate.c:4)	MOVL	x+0(FP),!!AX
      (rotate.c:4)	ROLL	$3,!!AX
      (rotate.c:5)	RET	,!!
      (rotate.c:5)	RET	,!!
      (rotate.c:5)	END	,!!
      
      R=rsc, minux.ma
      CC=golang-dev
      https://golang.org/cl/7069056
      bb192d13
    • Kamil Kisiel's avatar
      encoding/xml: fix decoding of attributes in to pointer fields. · 4730a226
      Kamil Kisiel authored
      Fixes #3719.
      
      R=anacrolix, rsc
      CC=golang-dev
      https://golang.org/cl/7131052
      4730a226
    • Robert Griesemer's avatar
      spec: clarify lhs syntax for range and select · d3679726
      Robert Griesemer authored
      Fixes #4653.
      
      R=rsc, r, iant, ken, thakis
      CC=golang-dev
      https://golang.org/cl/7135058
      d3679726
    • Jan Ziak's avatar
      runtime: try to determine the actual type during garbage collection · 059fed3d
      Jan Ziak authored
      If the scanned block has no typeinfo the garbage collector will attempt
      to get the actual type of the block.
      
      R=golang-dev, bradfitz, rsc
      CC=golang-dev
      https://golang.org/cl/7093045
      059fed3d
    • Rémy Oudompheng's avatar
      test: re-enable issue4348.go. · 09cb91ed
      Rémy Oudompheng authored
      The test array is too large to fit a stack frame
      but can be a global.
      
      R=golang-dev, minux.ma
      CC=golang-dev
      https://golang.org/cl/7127059
      09cb91ed
    • Daniel Morsing's avatar
      cmd/gc: more robust checking of OIND nodes. · c0d9bf56
      Daniel Morsing authored
      Fixes #4610.
      
      R=golang-dev, remyoudompheng, rsc
      CC=golang-dev, nigeltao
      https://golang.org/cl/7058057
      c0d9bf56
    • Akshat Kumar's avatar
      syscall, os: fix a fork-exec/wait race in Plan 9. · b6284700
      Akshat Kumar authored
      On Plan 9, only the parent of a given process can enter its wait
      queue. When a Go program tries to fork-exec a child process
      and subsequently waits for it to finish, the goroutines doing
      these two tasks do not necessarily tie themselves to the same
      (or any single) OS thread. In the case that the fork and the wait
      system calls happen on different OS threads (say, due to a
      goroutine being rescheduled somewhere along the way), the
      wait() will either return an error or end up waiting for a
      completely different child than was intended.
      
      This change forces the fork and wait syscalls to happen in the
      same goroutine and ties that goroutine to its OS thread until
      the child exits. The PID of the child is recorded upon fork and
      exit, and de-queued once the child's wait message has been read.
      The Wait API, then, is translated into a synthetic implementation
      that simply waits for the requested PID to show up in the queue
      and then reads the associated stats.
      
      R=rsc, rminnich, npe, mirtchovski, ality
      CC=golang-dev
      https://golang.org/cl/6545051
      b6284700
    • Rémy Oudompheng's avatar
      cmd/gc: fix handling of struct padding in hash/eq. · 1d6eb2e9
      Rémy Oudompheng authored
      The test case of issue 4585 was not passing due to
      miscalculation of memequal args, and the previous fix
      does not handle padding at the end of a struct.
      
      Handling of padding at end of structs also fixes the case
      of [n]T where T is such a padded struct.
      
      Fixes #4585.
      (again)
      
      R=golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/7133059
      1d6eb2e9
    • Carl Shapiro's avatar
      cmd/5a, cmd/5c, cmd/6a, cmd/6c, cmd/8a, cmd/8c, cmd/ld: update reference · 47568c74
      Carl Shapiro authored
      Reference the 80386 compiler documentation now that the
      documentation for the 68020 is offline.
      
      R=golang-dev, minux.ma, rsc
      CC=golang-dev
      https://golang.org/cl/7127053
      47568c74
    • Sébastien Paolacci's avatar
      runtime: faster mcentral alloc. · d8626ef1
      Sébastien Paolacci authored
      Reduce individual object handling by anticipating how much of them are servable.
      
      Not a chunked transfer cache, but decent enough to make sure the bottleneck is not here.
      
      Mac OSX, median of 10 runs:
      
      benchmark                 old ns/op    new ns/op    delta
      BenchmarkBinaryTree17    5358937333   4892813012   -8.70%
      BenchmarkFannkuch11      3257752475   3315436116   +1.77%
      BenchmarkGobDecode         23277349     23001114   -1.19%
      BenchmarkGobEncode         14367327     14262925   -0.73%
      BenchmarkGzip             441045541    440451719   -0.13%
      BenchmarkGunzip           139117663    139622494   +0.36%
      BenchmarkJSONEncode        45715854     45687802   -0.06%
      BenchmarkJSONDecode       103949570    106530032   +2.48%
      BenchmarkMandelbrot200      4542462      4548290   +0.13%
      BenchmarkParse              7790558      7557540   -2.99%
      BenchmarkRevcomp          831436684    832510381   +0.13%
      BenchmarkTemplate         133789824    133007337   -0.58%
      
      benchmark                  old MB/s     new MB/s  speedup
      BenchmarkGobDecode            32.82        33.33    1.02x
      BenchmarkGobEncode            53.42        53.86    1.01x
      BenchmarkGzip                 43.70        44.01    1.01x
      BenchmarkGunzip              139.09       139.14    1.00x
      BenchmarkJSONEncode           42.69        42.56    1.00x
      BenchmarkJSONDecode           18.78        17.91    0.95x
      BenchmarkParse                 7.37         7.67    1.04x
      BenchmarkRevcomp             306.83       305.70    1.00x
      BenchmarkTemplate             14.57        14.56    1.00x
      
      R=rsc, dvyukov
      CC=golang-dev
      https://golang.org/cl/7005055
      d8626ef1
    • Rémy Oudompheng's avatar
      cmd/gc, cmd/6g: fix error on large stacks. · d127ed53
      Rémy Oudompheng authored
      Fixes #4666.
      
      R=golang-dev, daniel.morsing, rsc
      CC=golang-dev
      https://golang.org/cl/7141047
      d127ed53
    • Matthew Dempsky's avatar
      cmd/6c: Improve peep hole optimization of rotate and shift instructions. · 41ec481a
      Matthew Dempsky authored
      Update #4629.
      
      $ cat shift2.c
      unsigned int
      shift(unsigned int x, unsigned int y)
      {
              x = (x << 3);
              y = (y << 5);
              x = (x << 7);
              y = (y << 9);
              return x ^ y;
      }
      
      ## BEFORE
      $ go tool 6c -S shift2.c
      (shift2.c:2)	TEXT	shift+0(SB),$0-8
      (shift2.c:4)	MOVL	x+0(FP),!!AX
      (shift2.c:4)	SALL	$3,!!AX
      (shift2.c:4)	MOVL	AX,!!DX
      (shift2.c:5)	MOVL	y+4(FP),!!AX
      (shift2.c:5)	SALL	$5,!!AX
      (shift2.c:5)	MOVL	AX,!!CX
      (shift2.c:6)	MOVL	DX,!!AX
      (shift2.c:6)	SALL	$7,!!AX
      (shift2.c:6)	MOVL	AX,!!DX
      (shift2.c:7)	MOVL	CX,!!AX
      (shift2.c:7)	SALL	$9,!!AX
      (shift2.c:7)	MOVL	AX,!!CX
      (shift2.c:8)	MOVL	DX,!!AX
      (shift2.c:8)	XORL	CX,!!AX
      (shift2.c:8)	RET	,!!
      (shift2.c:8)	RET	,!!
      (shift2.c:8)	END	,!!
      
      ## AFTER
      $ go tool 6c -S shift2.c
      (shift2.c:2)	TEXT	shift+0(SB),$0-8
      (shift2.c:4)	MOVL	x+0(FP),!!AX
      (shift2.c:4)	SALL	$3,!!AX
      (shift2.c:5)	MOVL	y+4(FP),!!CX
      (shift2.c:5)	SALL	$5,!!CX
      (shift2.c:6)	SALL	$7,!!AX
      (shift2.c:7)	SALL	$9,!!CX
      (shift2.c:8)	XORL	CX,!!AX
      (shift2.c:8)	RET	,!!
      (shift2.c:8)	RET	,!!
      (shift2.c:8)	END	,!!
      
      R=rsc, minux.ma, dave, nigeltao
      CC=golang-dev
      https://golang.org/cl/7066055
      41ec481a
    • Rémy Oudompheng's avatar
      cmd/gc: allow registerization of temporaries created by inlining. · dfdfba14
      Rémy Oudompheng authored
      Names beginning with a dot are ignored by optimizers.
      
      R=rsc, lvd, golang-dev, dave
      CC=golang-dev
      https://golang.org/cl/7098049
      dfdfba14