1. 28 Jan, 2013 6 commits
  2. 27 Jan, 2013 1 commit
    • Ian Lance Taylor's avatar
      runtime: use new CNT_MASK in lfstack · e65c0a82
      Ian Lance Taylor authored
      This is for SPARC64, a 64-bit processor that uses all 64-bits
      of virtual addresses.  The idea is to use the low order 3 bits
      to at least get a small ABA counter.  That should work since
      pointers are aligned.  The idea is for SPARC64 to set CNT_MASK
      == 7, PTR_BITS == 0, PTR_MASK == 0xffffffffffffff8.
      
      Also add uintptr casts to avoid GCC warnings.  The gccgo
      runtime code is compiled with GCC, and GCC warns when casting
      between a pointer and a type of a different size.
      
      R=dvyukov
      CC=golang-dev
      https://golang.org/cl/7225043
      e65c0a82
  3. 26 Jan, 2013 3 commits
  4. 25 Jan, 2013 2 commits
    • Brad Fitzpatrick's avatar
      CONTRIBUTORS: add Carl Shapiro's golang.org address · 5a49acc7
      Brad Fitzpatrick authored
      R=golang-dev, dsymonds
      CC=golang-dev
      https://golang.org/cl/7220046
      5a49acc7
    • John Graham-Cumming's avatar
      net/http: fix Content-Length/Transfer-Encoding on HEAD requests · 3c77b896
      John Graham-Cumming authored
      net/http currently assumes that the response to a HEAD request
          will always have a Content-Length header. This is incorrect.
      
      RFC2616 says: "The HEAD method is identical to GET except that
      the server MUST NOT return a message-body in the response. The
      metainformation contained in the HTTP headers in response to a
      HEAD request SHOULD be identical to the information sent in
      response to a GET request. This method can be used for
      obtaining metainformation about the entity implied by the
      request without transferring the entity-body itself. This
      method is often used for testing hypertext links for validity,
      accessibility, and recent modification."
      
      This means that three cases are possible: a Content-Length
      header, a Transfer-Encoding header or neither. In the wild the
      following sites exhibit these behaviours (curl -I):
      
      HEAD on http://www.google.co.uk/ has Transfer-Encoding: chunked
      HEAD on http://www.bbc.co.uk/    has Content-Length: 45247
      HEAD on http://edition.cnn.com/  has neither header
      
      This patch does not remove the ErrMissingContentLength error
      for compatibility reasons, but it is no longer used.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/7182045
      3c77b896
  5. 24 Jan, 2013 9 commits
  6. 23 Jan, 2013 14 commits
  7. 22 Jan, 2013 5 commits
    • Dave Cheney's avatar
      testing: add Skip/Skipf · f7ea900a
      Dave Cheney authored
      This proposal adds two methods to *testing.T, Skip(string) and Skipf(format, args...). The intent is to replace the existing log and return idiom which currently has 97 cases in the standard library. A simple example of Skip would be:
      
      func TestSomethingLong(t *testing.T) {
              if testing.Short() {
                      t.Skip("skipping test in short mode.")
                      // not reached
              }
              ... time consuming work
      }
      
      Additionally tests can be skipped anywhere a *testing.T is present. An example adapted from the go.crypto/ssh/test package would be:
      
      // setup performs some before test action and returns a func()
      // which should be defered by the caller for cleanup.
      func setup(t *testing.T) func() {
              ...
              cmd := exec.Command("sshd", "-f", configfile, "-i")
              if err := cmd.Run(); err != nil {
                      t.Skipf("could not execute mock ssh server: %v", err)
              }
              ...
              return func() {
                      // stop subprocess and cleanup
              }
      }
      
      func TestDialMockServer(t *testing.T) {
              cleanup := setup(t)
              defer cleanup()
              ...
      }
      
      In verbose mode tests that are skipped are now reported as a SKIP, rather than PASS.
      
      Link to discussion: https://groups.google.com/d/topic/golang-nuts/BqorNARzt4U/discussion
      
      R=adg, rsc, r, n13m3y3r
      CC=golang-dev, minux.ma
      https://golang.org/cl/6501094
      f7ea900a
    • Rick Arnold's avatar
      encoding/json: ignore unexported fields in Unmarshal · 6e3f3af4
      Rick Arnold authored
      Go 1.0 behavior was to create an UnmarshalFieldError when a json value name matched an unexported field name. This error will no longer be created and the field will be skipped instead.
      
      Fixes #4660.
      
      R=adg, rsc, bradfitz
      CC=golang-dev
      https://golang.org/cl/7139049
      6e3f3af4
    • Brad Fitzpatrick's avatar
      cmd/api: fix type scrubbing · 93d92d51
      Brad Fitzpatrick authored
      It wasn't removing names from func parameters for func types,
      and it was handling "a, b string" as "string", not "string, string".
      
      Fixes #4688
      
      R=golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/7181051
      93d92d51
    • Akshat Kumar's avatar
      lib9: declare __fixargv0 before use in flag.c · b9f0a6bf
      Akshat Kumar authored
      The Plan 9 compilers complain about not
      having type information for the function,
      which sets off type signature problems
      during the linking stage.
      
      R=rsc, ality, iant
      CC=golang-dev
      https://golang.org/cl/7058054
      b9f0a6bf
    • Robin Eklind's avatar
      fmt: Remove dead code and make comments and variables consistent. · 3692dfdd
      Robin Eklind authored
      R=minux.ma, dave, rsc
      CC=golang-dev
      https://golang.org/cl/7064055
      3692dfdd