1. 12 Apr, 2016 13 commits
    • Michael Munday's avatar
      cmd/compile/internal/gc: minor Cgen_checknil cleanup · 7f5a063d
      Michael Munday authored
      Most architectures can only generate nil checks when the
      the address to check is in a register. Currently only
      amd64 and 386 can generate checks for addresses that
      reside in memory. This is unlikely to change so the architecture
      check has been inverted.
      
      Change-Id: I73697488a183406c79a9039c62823712b510bb6a
      Reviewed-on: https://go-review.googlesource.com/21861Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7f5a063d
    • Keith Randall's avatar
      cmd/compile: add x.Uses==1 test to load combiners · cd85f711
      Keith Randall authored
      We need to make sure that when we combine loads, we only do
      so if there are no other uses of the load.  We can't split
      one load into two because that can then lead to inconsistent
      loaded values in the presence of races.
      
      Add some aggressive copy removal code so that phantom
      "dead copy" uses of values are cleaned up promptly.  This lets
      us use x.Uses==1 conditions reliably.
      
      Change-Id: I9037311db85665f3868dbeb3adb3de5c20728b38
      Reviewed-on: https://go-review.googlesource.com/21853Reviewed-by: default avatarTodd Neal <todd@tneal.org>
      cd85f711
    • Dmitry Vyukov's avatar
      cmd/pprof/internal: move to cmd/internal/pprof · 204b6f48
      Dmitry Vyukov authored
      Make internal pprof packages available to cmd/trace.
      cmd/trace needs access to them to generate symbolized
      svg profiles (create and serialize Profile struct).
      And potentially generate svg programmatically instead
      of invoking go tool pprof.
      
      Change-Id: Iafd0c87ffdd4ddc081093be0b39761f19507907a
      Reviewed-on: https://go-review.googlesource.com/21870
      Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      204b6f48
    • Alexandru Moșoi's avatar
      cmd/compile: share dominator tree among many passes · 9743e4b0
      Alexandru Moșoi authored
      These passes do not modify the dominator tree too much.
      
      % benchstat old.txt new.txt
      name       old time/op     new time/op     delta
      Template       335ms ± 3%      325ms ± 8%    ~             (p=0.074 n=8+9)
      GoTypes        1.05s ± 1%      1.05s ± 3%    ~            (p=0.095 n=9+10)
      Compiler       5.37s ± 4%      5.29s ± 1%  -1.42%         (p=0.022 n=9+10)
      MakeBash       34.9s ± 3%      34.4s ± 2%    ~            (p=0.095 n=9+10)
      
      name       old alloc/op    new alloc/op    delta
      Template      55.4MB ± 0%     54.9MB ± 0%  -0.81%        (p=0.000 n=10+10)
      GoTypes        179MB ± 0%      178MB ± 0%  -0.89%        (p=0.000 n=10+10)
      Compiler       807MB ± 0%      798MB ± 0%  -1.10%        (p=0.000 n=10+10)
      
      name       old allocs/op   new allocs/op   delta
      Template        498k ± 0%       496k ± 0%  -0.29%          (p=0.000 n=9+9)
      GoTypes        1.42M ± 0%      1.41M ± 0%  -0.24%        (p=0.000 n=10+10)
      Compiler       5.61M ± 0%      5.60M ± 0%  -0.12%        (p=0.000 n=10+10)
      
      Change-Id: I4cd20cfba3f132ebf371e16046ab14d7e42799ec
      Reviewed-on: https://go-review.googlesource.com/21806
      Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      9743e4b0
    • Michael Munday's avatar
      cmd/compile/internal/s390x: add s390x support · a223ccae
      Michael Munday authored
      s390x does not require duffzero/duffcopy since it has
      storage-to-storage instructions that can copy/clear up to 256
      bytes at a time.
      
      peep contains several new passes to optimize instruction
      sequences that match s390x instructions such as the
      compare-and-branch and load/store multiple instructions.
      
      copyprop and subprop have been extended to work with moves that
      require sign/zero extension. This work could be ported to other
      architectures that do not used sized math however it does add
      complexity and will probably be rendered unnecessary by ssa in
      the near future.
      
      Change-Id: I1b64b281b452ed82a85655a0df69cb224d2a6941
      Reviewed-on: https://go-review.googlesource.com/20873
      Run-TryBot: Michael Munday <munday@ca.ibm.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBill O'Farrell <billotosyr@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      a223ccae
    • Dmitry Vyukov's avatar
      internal/trace: fix int overflow in timestamps · 944a0859
      Dmitry Vyukov authored
      Fixes #15102
      
      Change-Id: I7fdb6464afd0b7af9b6652051416f0fddd34dc9a
      Reviewed-on: https://go-review.googlesource.com/21730Reviewed-by: default avatarAustin Clements <austin@google.com>
      944a0859
    • Dmitri Shuralyov's avatar
      cmd/go: fix vcsFromDir returning bad root on Windows · b6cd6d7d
      Dmitri Shuralyov authored
      Apply golang/tools@5804fef4c0556d3e5e7d2440740a3d7aced7d58b.
      
      In the context of cmd/go build tool, import path is a '/'-separated path.
      This can be inferred from `go help importpath` and `go help packages`.
      vcsFromDir documentation says on return, root is the import path
      corresponding to the root of the repository. On Windows and other
      OSes where os.PathSeparator is not '/', that wasn't true since root
      would contain characters other than '/', and therefore it wasn't a
      valid import path corresponding to the root of the repository.
      Fix that by using filepath.ToSlash.
      
      Add test coverage for vcsFromDir, it was previously not tested.
      It's taken from golang.org/x/tools/go/vcs tests, and modified to
      improve style.
      
      Additionally, remove an unneccessary statement from the documentation
      "(thus root is a prefix of importPath)". There is no variable
      importPath that is being referred to (it's possible p.ImportPath
      was being referred to). Without it, the description of root value
      matches the documentation of repoRoot.root struct field:
      
      	// root is the import path corresponding to the root of the
      	// repository
      	root string
      
      Rename and change signature of vcsForDir(p *Package) to
      vcsFromDir(dir, srcRoot string). This is more in sync with the x/tools
      version. It's also simpler, since vcsFromDir only needs those two
      values from Package, and nothing more. Change "for" to "from" in name
      because it's more consistent and clear.
      
      Update usage of vcsFromDir to match the new signature, and respect
      that returned root is a '/'-separated path rather than a os.PathSeparator
      separated path.
      
      Fixes #15040.
      Updates #7723.
      Helps #11490.
      
      Change-Id: Idf51b9239f57248739daaa200aa1c6e633cb5f7f
      Reviewed-on: https://go-review.googlesource.com/21345Reviewed-by: default avatarAlex Brainman <alex.brainman@gmail.com>
      Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b6cd6d7d
    • Martin Möhrmann's avatar
      cmd/compile: cleanup pragcgo · 07669d27
      Martin Möhrmann authored
      Removes dynimport, dynexport, dynlinker cases since they can not
      be reached due to prefix check for "go:cgo_" in getlinepragma.
      
      Replaces the if chains for verb distinction by a switch statement.
      Replaces fmt.Sprintf by fmt.Sprintln for string concatenation.
      
      Removes the more, getimpsym and getquoted functions by introducing a
      pragmaFields function that partitions a pragma into its components.
      
      Adds tests for cgo pragmas.
      
      Change-Id: I43c7b9550feb3ddccaff7fb02198a3f994444123
      Reviewed-on: https://go-review.googlesource.com/21607Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      07669d27
    • Brad Fitzpatrick's avatar
      src: split nacltest.bash into naclmake.bash and keep nacltest.bash · e569b10e
      Brad Fitzpatrick authored
      Needed by the build system to shard tests. nacl was the last unsharded
      builder.
      
      (I considered also adding a -make-only flag to nacltest.bash, but that
      wouldn't fail fast when the file didn't exist.)
      
      Updates #15242
      
      Change-Id: I6afc1c1fe4268ab98c0724b5764c67d3784caebe
      Reviewed-on: https://go-review.googlesource.com/21851Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      e569b10e
    • David Benjamin's avatar
      crypto/tls: Enforce that version and cipher match on resume. · 73a0185a
      David Benjamin authored
      Per RFC 5246, 7.4.1.3:
      
         cipher_suite
            The single cipher suite selected by the server from the list in
            ClientHello.cipher_suites.  For resumed sessions, this field is
            the value from the state of the session being resumed.
      
      The specifications are not very clearly written about resuming sessions
      at the wrong version (i.e. is the TLS 1.0 notion of "session" the same
      type as the TLS 1.1 notion of "session"?). But every other
      implementation enforces this check and not doing so has some odd
      semantics.
      
      Change-Id: I6234708bd02b636c25139d83b0d35381167e5cad
      Reviewed-on: https://go-review.googlesource.com/21153Reviewed-by: default avatarAdam Langley <agl@golang.org>
      73a0185a
    • Dan Peterson's avatar
      io: document WriteString calls Write exactly once · c9b66bb3
      Dan Peterson authored
      Fixes #13849
      
      Change-Id: Idd7f06b547a0179fe15571807a8c48b7c3b78d7c
      Reviewed-on: https://go-review.googlesource.com/21852Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      c9b66bb3
    • Mikio Hara's avatar
      net: make IP.{String,MarshalText} return helpful information on address error · 1f54410a
      Mikio Hara authored
      This change makes String and MarshalText methods of IP return a
      hexadecial form of IP with no punctuation as part of error
      notification. It doesn't affect the existing behavior of ParseIP.
      
      Also fixes bad shadowing in ipToSockaddr and makes use of reserved
      IP address blocks for documnetation.
      
      Fixes #15052.
      Updates #15228.
      
      Change-Id: I9e9ecce308952ed5683066c3d1bb6a7b36458c65
      Reviewed-on: https://go-review.googlesource.com/21642Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      1f54410a
    • Alan Donovan's avatar
      go/importer: make For("gccgo", nil) not panic · a119f88f
      Alan Donovan authored
      Apparently we forgot to test this.
      
      Fixes #15092
      
      Change-Id: I33d4fef0f659dfbdfc1ebf8401e96610c8215592
      Reviewed-on: https://go-review.googlesource.com/21860Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      a119f88f
  2. 11 Apr, 2016 25 commits
  3. 10 Apr, 2016 2 commits