1. 29 Oct, 2013 7 commits
    • Dominik Honnef's avatar
      misc/emacs: various cleanups · 22b3822d
      Dominik Honnef authored
      - Use #' for function symbols
      - Remove unused variables
      - Use declare-function to shut up byte compiler
      
      R=adonovan
      CC=golang-dev
      https://golang.org/cl/19010044
      22b3822d
    • Russ Cox's avatar
      os: do not return Lstat errors from Readdir · ef805fe3
      Russ Cox authored
      This CL restores the Go 1.1.2 semantics for os.File's Readdir method.
      
      The code in Go 1.1.2 was rewritten mainly because it looked buggy.
      This new version attempts to be clearer but still provide the 1.1.2 results.
      
      The important diff is not this CL's version against tip but this CL's version
      against Go 1.1.2.
      
      Go 1.1.2:
      
              names, err := f.Readdirnames(n)
              fi = make([]FileInfo, len(names))
              for i, filename := range names {
                      fip, err := Lstat(dirname + filename)
                      if err == nil {
                              fi[i] = fip
                      } else {
                              fi[i] = &fileStat{name: filename}
                      }
              }
              return fi, err
      
      This CL:
      
              names, err := f.Readdirnames(n)
              fi = make([]FileInfo, len(names))
              for i, filename := range names {
                      fip, lerr := lstat(dirname + filename)
                      if lerr != nil {
                              fi[i] = &fileStat{name: filename}
                              continue
                      }
                      fi[i] = fip
              }
              return fi, err
      
      The changes from Go 1.1.2 are stylistic, not semantic:
      1. Use lstat instead of Lstat, for testing (done before this CL).
      2. Make error handling in loop body look more like an error case.
      3. Use separate error variable name in loop body, to be clear
         we are not trying to influence the final return result.
      
      Fixes #6656.
      Fixes #6680.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/18870043
      ef805fe3
    • Russ Cox's avatar
      cmd/gc: silence clang warning · b8be100d
      Russ Cox authored
      This code is only built when you run 'make' in cmd/gc,
      not in all.bash.
      
      R=golang-dev, jsing, iant
      CC=golang-dev
      https://golang.org/cl/19160043
      b8be100d
    • Dominik Honnef's avatar
      misc/emacs: support godef-jump on import statements · 3b0e6c21
      Dominik Honnef authored
      The newest version of godef supports jumping to a package's source
      directory if point is on an import statement.
      
      R=adonovan
      CC=golang-dev
      https://golang.org/cl/18230043
      3b0e6c21
    • Russ Cox's avatar
      debug/dwarf: add DWARF 4 form constants · 7dbbb53f
      Russ Cox authored
      Some versions of clang generate DWARF 4-format attributes
      even when using -gdwarf-2. We don't care much about the
      values, but we do need to be able to parse past them.
      
      This fixes a bug in Go 1.2 rc2 reported via private mail using
      a near-tip version of clang.
      
      R=golang-dev, iant, dvyukov
      CC=golang-dev
      https://golang.org/cl/18460043
      7dbbb53f
    • Andrew Gerrand's avatar
      doc: update front page summary text · 8b0fad11
      Andrew Gerrand authored
      R=rsc
      CC=golang-dev
      https://golang.org/cl/18080045
      8b0fad11
    • Russ Cox's avatar
      cmd/cgo: stop using -fno-eliminate-unused-debug-types · adda3348
      Russ Cox authored
      This flag was added in January 2010, in CL 181102, to fix issue 497.
      (Numbers were just shorter back then.) The fix was for OS X machines
      and the llvm-gcc frontend.
      
      In July 2011 we had to change the way we get enum values, because
      there were no flags available to force Xcode's llvm-gcc to include the
      enum names and values in DWARF debug output.
      
      We now use clang, not llvm-gcc, on OS X machines.
      Earlier versions of clang printed a warning about not knowing the flag.
      Newer versions of clang now make that an error.
      
      That is:
       - The flag was added for OS X machines.
       - The flag is no longer necessary on OS X machines.
       - The flag now breaks some OS X machines.
      
      Remove it.
      
      I have run the original program from issue 497 successfully
      without the flag on both OS X and Linux machines.
      
      Fixes #6678.
      
      R=golang-dev, minux.ma
      CC=golang-dev
      https://golang.org/cl/18850043
      adda3348
  2. 28 Oct, 2013 2 commits
  3. 25 Oct, 2013 2 commits
  4. 24 Oct, 2013 3 commits
  5. 23 Oct, 2013 2 commits
  6. 22 Oct, 2013 6 commits
  7. 21 Oct, 2013 3 commits
  8. 20 Oct, 2013 1 commit
  9. 18 Oct, 2013 9 commits
    • Russ Cox's avatar
      cmd/cgo: fix line number in an error message · dbe2eacf
      Russ Cox authored
      Fixes #6563.
      
      R=golang-dev, iant
      CC=golang-dev
      https://golang.org/cl/14870046
      dbe2eacf
    • Russ Cox's avatar
      cmd/cgo: stop using compiler error message text to analyze C names · 06ad3b2d
      Russ Cox authored
      The old approach to determining whether "name" was a type, constant,
      or expression was to compile the C program
      
              name;
      
      and scan the errors and warnings generated by the compiler.
      This requires looking for specific substrings in the errors and warnings,
      which ties the implementation to specific compiler versions.
      As compilers change their errors or drop warnings, cgo breaks.
      This happens slowly but it does happen.
      Clang in particular (now required on OS X) has a significant churn rate.
      
      The new approach compiles a slightly more complex program
      that is either valid C or not valid C depending on what kind of
      thing "name" is. It uses only the presence or absence of an error
      message on a particular line, not the error text itself. The program is:
      
              // error if and only if name is undeclared
              void f1(void) { typeof(name) *x; }
      
              // error if and only if name is not a type
              void f2(void) { name *x; }
      
              // error if and only if name is not an integer constant
              void f3(void) { enum { x = (name)*1 }; }
      
      I had not been planning to do this until Go 1.3, because it is a
      non-trivial change, but it fixes a real Xcode 5 problem in Go 1.2,
      and the new code is easier to understand than the old code.
      It should be significantly more robust.
      
      Fixes #6596.
      Fixes #6612.
      
      R=golang-dev, r, james, iant
      CC=golang-dev
      https://golang.org/cl/15070043
      06ad3b2d
    • Russ Cox's avatar
      cmd/gc: shorten name used for map bucket type · 20f99ffa
      Russ Cox authored
      Before:
      type.struct { buckets *struct { overflow *struct { overflow *struct { overflow *struct { overflow *struct { overflow *<...>; keys [8]string; values [8]*"".RangeTable }; keys [8]string; values [8]*"".RangeTable }; keys [8]string; values [8]*"".RangeTable }; keys [8]string; values [8]*"".RangeTable }; keys [8]string; values [8]*"".RangeTable }; oldbuckets *struct { overflow *struct { overflow *struct { overflow *struct { overflow *struct { overflow *<...>; keys [8]string; values [8]*"".RangeTable }; keys [8]string; values [8]*"".RangeTable }; keys [8]string; values [8]*"".RangeTable }; keys [8]string; values [8]*"".RangeTable }; keys [8]string; values [8]*"".RangeTable } }
      
      After:
      type.map.bucket[string]*"".RangeTable
      
      This makes debugging maps a little nicer, and it takes up less space in the binary.
      
      R=golang-dev, r
      CC=golang-dev, khr
      https://golang.org/cl/15110044
      20f99ffa
    • Russ Cox's avatar
      net: make sure failed Dial returns nil Conn · 66f49f78
      Russ Cox authored
      Fixes #6614.
      
      R=golang-dev, bradfitz, mikioh.mikioh
      CC=golang-dev
      https://golang.org/cl/14950045
      66f49f78
    • Dmitriy Vyukov's avatar
      runtime: remove nomemprof · f6329700
      Dmitriy Vyukov authored
      Nomemprof seems to be unneeded now, there is no recursion.
      If the recursion will be re-introduced, it will break loudly by deadlocking.
      Fixes #6566.
      
      R=golang-dev, minux.ma, rsc
      CC=golang-dev
      https://golang.org/cl/14695044
      f6329700
    • Andrew Gerrand's avatar
      misc/dist: build race packages when os suffix present · f5d25fd6
      Andrew Gerrand authored
      The "darwin-amd64-osx10.8" target was not matching "darwin-amd64".
      
      R=golang-dev
      CC=golang-dev
      https://golang.org/cl/14930043
      f5d25fd6
    • Andrew Gerrand's avatar
      tag go1.2rc2 · 7e4af6d9
      Andrew Gerrand authored
      R=golang-dev, dsymonds
      CC=golang-dev
      https://golang.org/cl/14910043
      7e4af6d9
    • Andrew Gerrand's avatar
      api: add go1.2.txt, use in tests · 04e95a1a
      Andrew Gerrand authored
      R=golang-dev, iant
      CC=golang-dev
      https://golang.org/cl/14860043
      04e95a1a
    • Andrew Gerrand's avatar
      misc/dist: set default go.tools tag · 73d7d12e
      Andrew Gerrand authored
      Fixes #6607.
      
      R=dsymonds
      CC=golang-dev
      https://golang.org/cl/14830043
      73d7d12e
  10. 17 Oct, 2013 5 commits