1. 02 Mar, 2011 4 commits
    • Roger Peppe's avatar
      cgo: put temporary source files in _obj. · 9704d4ec
      Roger Peppe authored
      Fixes #1572.
      Initially I tried changing things so all object
      files get put in _obj, but it's too much - everything
      needs changing. Perhaps some other time.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/4237050
      9704d4ec
    • Roger Peppe's avatar
      fmt: allow recursive calls to Fscan etc. · 81bfbe93
      Roger Peppe authored
      Add a new Read method to ScanState so that it
      satisfies the io.Reader interface; rename
      Getrune and Ungetrune to ReadRune and UnreadRune.
      Make sure ReadRune does not read past width restrictions;
      remove now-unnecessary Width method from ScanState.
      Also make the documentation a little clearer as to
      how ReadRune and UnreadRune are used.
      
      R=r, r2
      CC=golang-dev
      https://golang.org/cl/4240056
      81bfbe93
    • Russ Cox's avatar
      runtime: record goroutine creation pc and display in traceback · 324cc3d0
      Russ Cox authored
      package main
      
      func main() {
              go func() { *(*int)(nil) = 0 }()
              select{}
      }
      
      panic: runtime error: invalid memory address or nil pointer dereference
      
      [signal 0xb code=0x1 addr=0x0 pc=0x1c96]
      
      runtime.panic+0xac /Users/rsc/g/go/src/pkg/runtime/proc.c:1083
              runtime.panic(0x11bf0, 0xf8400011f0)
      runtime.panicstring+0xa3 /Users/rsc/g/go/src/pkg/runtime/runtime.c:116
              runtime.panicstring(0x29a57, 0x0)
      runtime.sigpanic+0x144 /Users/rsc/g/go/src/pkg/runtime/darwin/thread.c:470
              runtime.sigpanic()
      main._func_001+0x16 /Users/rsc/g/go/src/pkg/runtime/x.go:188
              main._func_001()
      runtime.goexit /Users/rsc/g/go/src/pkg/runtime/proc.c:150
              runtime.goexit()
      ----- goroutine created by -----
      main.main+0x3d /Users/rsc/g/go/src/pkg/runtime/x.go:4
      
      goroutine 1 [4]:
      runtime.gosched+0x77 /Users/rsc/g/go/src/pkg/runtime/proc.c:598
              runtime.gosched()
      runtime.block+0x27 /Users/rsc/g/go/src/pkg/runtime/chan.c:680
              runtime.block()
      main.main+0x44 /Users/rsc/g/go/src/pkg/runtime/x.go:5
              main.main()
      runtime.mainstart+0xf /Users/rsc/g/go/src/pkg/runtime/amd64/asm.s:77
              runtime.mainstart()
      runtime.goexit /Users/rsc/g/go/src/pkg/runtime/proc.c:150
              runtime.goexit()
      ----- goroutine created by -----
      _rt0_amd64+0x8e /Users/rsc/g/go/src/pkg/runtime/amd64/asm.s:64
      
      Fixes #1563.
      
      R=r
      CC=golang-dev
      https://golang.org/cl/4243046
      324cc3d0
    • Brad Fitzpatrick's avatar
      http: initialize request Header for the transport · 9733f96b
      Brad Fitzpatrick authored
      Fixes #1558
      
      R=rsc, r, bradfitzwork
      CC=golang-dev
      https://golang.org/cl/4260042
      9733f96b
  2. 01 Mar, 2011 9 commits
  3. 28 Feb, 2011 7 commits
  4. 26 Feb, 2011 1 commit
    • Nigel Tao's avatar
      compress/lzw: don't use a closure in NewReader, which avoids having · fdbbb066
      Nigel Tao authored
      to move some variables from the stack to the heap.
      
      Sorted benchmark runs on my 2007-era Mac Mini (GOARCH=amd64, GOOS=linux):
      
      Before:
      lzw.BenchmarkDecoder        2000        878176 ns/op
      lzw.BenchmarkDecoder        2000        878415 ns/op
      lzw.BenchmarkDecoder        2000        880352 ns/op
      lzw.BenchmarkDecoder        2000        898445 ns/op
      lzw.BenchmarkDecoder        2000        901728 ns/op
      
      After:
      lzw.BenchmarkDecoder        2000        859065 ns/op
      lzw.BenchmarkDecoder        2000        859402 ns/op
      lzw.BenchmarkDecoder        2000        860035 ns/op
      lzw.BenchmarkDecoder        2000        860555 ns/op
      lzw.BenchmarkDecoder        2000        861109 ns/op
      
      The ratio of before/after median times is 1.024.
      
      The runtime.MemStats.Mallocs delta per loop drops from 109 to 104.
      
      R=r, r2, dfc
      CC=golang-dev
      https://golang.org/cl/4253043
      fdbbb066
  5. 25 Feb, 2011 17 commits
  6. 24 Feb, 2011 2 commits