1. 29 Dec, 2009 3 commits
    • Rob Pike's avatar
      remove all references to gobType() from the decoder. · 1f551156
      Rob Pike authored
      Fixes #470.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/183074
      1f551156
    • Robert Griesemer's avatar
      Fix bug in godoc tab conversion filter: · 2aefb8d9
      Robert Griesemer authored
      tabs after an empty line where not converted.
      
      Also, made it more robust in the presence of
      (unexpected) ' ' and '\v' chars in indentation
      mode.
      
      R=r
      CC=golang-dev
      https://golang.org/cl/181085
      2aefb8d9
    • Robert Griesemer's avatar
      Symmetric changes to md4.go as for md5.go. · f0fcb2d5
      Robert Griesemer authored
      Use uint index variables in some cases instead
      of int to enable strength reduction; this makes
      it possible for the compiler to reduce % into
      masks.
      
      Old code: 6g -S md4.go md4block.go | grep "md4block.go:44"
      0471 (md4block.go:44) MOVL    AX,BX
      0472 (md4block.go:44) MOVL    AX,BP
      0473 (md4block.go:44) MOVL    AX,R8
      0474 (md4block.go:44) SARL    $31,R8
      0475 (md4block.go:44) SHRL    $30,R8
      0476 (md4block.go:44) ADDL    R8,BP
      0477 (md4block.go:44) SARL    $2,BP
      0478 (md4block.go:44) IMULL   $4,BP
      0479 (md4block.go:44) SUBL    BP,BX
      0480 (md4block.go:44) MOVLQSX BX,BX
      0481 (md4block.go:44) LEAQ    shift1+0(SB),BP
      0482 (md4block.go:44) CMPL    BX,8(BP)
      0483 (md4block.go:44) JCS     ,485
      0484 (md4block.go:44) CALL    ,runtime.throwindex+0(SB)
      0485 (md4block.go:44) MOVQ    (BP),BP
      0486 (md4block.go:44) MOVL    (BP)(BX*4),DI
      
      New code: 6g -S md4.go md4block.go | grep "md4block.go:44"
      0471 (md4block.go:44) MOVL    AX,BX
      0472 (md4block.go:44) ANDL    $3,BX
      0473 (md4block.go:44) MOVLQZX BX,BX
      0474 (md4block.go:44) LEAQ    shift1+0(SB),BP
      0475 (md4block.go:44) CMPL    BX,8(BP)
      0476 (md4block.go:44) JCS     ,478
      0477 (md4block.go:44) CALL    ,runtime.throwindex+0(SB)
      0478 (md4block.go:44) MOVQ    (BP),BP
      0479 (md4block.go:44) MOVL    (BP)(BX*4),DI
      
      R=agl, agl1
      CC=golang-dev
      https://golang.org/cl/181086
      f0fcb2d5
  2. 28 Dec, 2009 5 commits
  3. 27 Dec, 2009 1 commit
  4. 26 Dec, 2009 1 commit
  5. 24 Dec, 2009 4 commits
  6. 23 Dec, 2009 11 commits
  7. 22 Dec, 2009 6 commits
  8. 21 Dec, 2009 5 commits
  9. 19 Dec, 2009 2 commits
  10. 18 Dec, 2009 2 commits
    • Rob Pike's avatar
      new comments for bytes.NewBuffer and NewBufferString. · 1f0e6a4c
      Rob Pike authored
      corrects a common misunderstanding about NewBuffer.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/179106
      1f0e6a4c
    • Adam Langley's avatar
      runtime: fix race condition · 50d6c81d
      Adam Langley authored
      (Thanks to ken and rsc for pointing this out)
      
      rsc:
      	ken pointed out that there's a race in the new
      	one-lock-per-channel code.  the issue is that
      	if one goroutine has gone to sleep doing
      
      	select {
      	case <-c1:
      	case <-c2:
      	}
      
      	and then two more goroutines try to send
      	on c1 and c2 simultaneously, the way that
      	the code makes sure only one wins is the
      	selgen field manipulation in dequeue:
      
      	       // if sgp is stale, ignore it
      	       if(sgp->selgen != sgp->g->selgen) {
      		       //prints("INVALID PSEUDOG POINTER\n");
      		       freesg(c, sgp);
      		       goto loop;
      	       }
      
      	       // invalidate any others
      	       sgp->g->selgen++;
      
      	but because the global lock is gone both
      	goroutines will be fiddling with sgp->g->selgen
      	at the same time.
      
      This results in a 7% slowdown in the single threaded case for a
      ping-pong microbenchmark.
      
      Since the cas predominantly succeeds, adding a simple check first
      didn't make any difference.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/180068
      50d6c81d