1. 09 May, 2016 6 commits
    • Shenghou Ma's avatar
      cmd/compile: document -l in godoc · 5934523e
      Shenghou Ma authored
      Fixes #15607.
      
      Change-Id: I3e68ad00ebe72027d064238d4e77f1ad6a52f533
      Reviewed-on: https://go-review.googlesource.com/22940Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      5934523e
    • David Chase's avatar
      cmd/compile: correct sparseSet probes in regalloc to avoid index error · 3c090019
      David Chase authored
      In regalloc, a sparse map is preallocated for later use by
      spill-in-loop sinking.  However, variables (spills) are added
      during register allocation before spill sinking, and a map
      query involving any of these new variables will index out of
      bounds in the map.
      
      To fix:
      1) fix the queries to use s.orig[v.ID].ID instead, to ensure
      proper indexing.  Note that s.orig will be nil for values
      that are not eligible for spilling (like memory and flags).
      
      2) add a test.
      
      Fixes #15585.
      
      Change-Id: I8f2caa93b132a0f2a9161d2178320d5550583075
      Reviewed-on: https://go-review.googlesource.com/22911Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      3c090019
    • Mikhail Gusarov's avatar
      doc: update number of supported instruction sets · 149ac348
      Mikhail Gusarov authored
      Current  number was out-of-date since adding MIPS.
      
      Change-Id: I565342a92de3893b75cdfb76fa39f7fdf15672da
      Reviewed-on: https://go-review.googlesource.com/22952Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      149ac348
    • Russ Cox's avatar
      cmd/compile: add -linkobj flag to allow writing object file in two parts · feb6131b
      Russ Cox authored
      This flag is experimental and the semantics may change
      even after Go 1.7 is released. There are no changes to code
      not using the flag.
      
      The first part is for reading by future compiles.
      The second part is for reading by the final link step.
      Splitting the file this way allows distributed build systems
      to ship the compile-input part only to compile steps and
      the linker-input part only to linker steps.
      
      The first part is basically just the export data,
      and the second part is basically everything else.
      The overall files still have the same broad structure,
      so that existing tools will work with both halves.
      It's just that various pieces are empty in the two halves.
      
      This also copies the two bits of data the linker needed from
      export data into the object header proper, so that the linker
      doesn't need any export data at all. That eliminates a TODO
      that was left for switching to the binary export data.
      (Now the linker doesn't need to know about the switch.)
      
      The default is still to write out a combined output file.
      Nothing changes unless you pass -linkobj to the compiler.
      There is no support in the go command for -linkobj,
      since the go command doesn't copy objects around.
      The expectation is that other build systems (like bazel, say)
      might take advantage of this.
      
      The header adjustment and the option for the split output
      was intended as part of the zip archives, but the zip archives
      have been cut from Go 1.7. Doing this to the current archives
      both unblocks one step in the switch to binary export data
      and enables alternate build systems to experiment with the
      new flag using the Go 1.7 release.
      
      Change-Id: I8b6eab25b8a22b0a266ba0ac6d31e594f3d117f3
      Reviewed-on: https://go-review.googlesource.com/22500
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      feb6131b
    • Dmitry Vyukov's avatar
      runtime/race: deflake test · aeecee8c
      Dmitry Vyukov authored
      The test sometimes fails on builders.
      The test uses sleeps to establish the necessary goroutine
      execution order. If sleeps undersleep/oversleep
      the race is still reported, but it can be reported when the
      main test goroutine returns. In such case test driver
      can't match the race with the test and reports failure.
      
      Wait for both test goroutines to ensure that the race
      is reported in the test scope.
      
      Fixes #15579
      
      Change-Id: I0b9bec0ebfb0c127d83eb5325a7fe19ef9545050
      Reviewed-on: https://go-review.googlesource.com/22951
      Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      aeecee8c
    • Robert Griesemer's avatar
      cmd/compile: fix binary export of composite literals with implicit types · 87a2ae1f
      Robert Griesemer authored
      Also:
      - replaced remaining panics with Fatal calls
      - more comments
      
      Fixes #15572.
      
      Change-Id: Ifb27e80b66700f5692a84078764a1e928d4b310d
      Reviewed-on: https://go-review.googlesource.com/22935
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      87a2ae1f
  2. 08 May, 2016 3 commits
  3. 07 May, 2016 4 commits
    • Robert Griesemer's avatar
      cmd/compile: add and enable (internal) option to only track named types · 394ac818
      Robert Griesemer authored
      The new export format keeps track of all types that are exported.
      If a type is seen that was exported before, only a reference to
      that type is emitted. The importer maintains a list of all the
      seen types and uses that list to resolve type references.
      
      The existing compiler infrastructure's invariants assumes that
      only named types are referred to before they are fully set up.
      Referring to unnamed incomplete types causes problems. One of
      the issues was #15548.
      
      Added a new internal flag 'trackAllTypes' to enable/disable
      this type tracking. With this change only named types are
      tracked.
      
      Verified that this fix also addresses #15548, even w/o the
      prior fix for that issue (in fact that prior fix is turned
      off if trackAllTypes is disabled because it's not needed).
      
      The test for #15548 covers also this change.
      
      For #15548.
      
      Change-Id: Id0b3ff983629703d025a442823f99649fd728a56
      Reviewed-on: https://go-review.googlesource.com/22839
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      394ac818
    • Elias Naur's avatar
      cmd/go: add -shared to darwin/arm{,64} default build mode · fa270ad9
      Elias Naur authored
      Buildmode c-archive now supports position independent code for
      darwin/arm (in addition to darwin/arm64). Make PIC (-shared) the
      default for both platforms in the default buildmode.
      
      Without this change, gomobile will go install the standard library
      into its separate package directory without PIC support.
      
      Also add -shared to darwin/arm64 in buildmode c-archive, for
      symmetry (darwin/arm64 always generates position independent code).
      
      Fixes #15519
      
      Change-Id: If27d2cbea8f40982e14df25da2703cbba572b5c6
      Reviewed-on: https://go-review.googlesource.com/22920Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      fa270ad9
    • Tal Shprecher's avatar
      cmd/compile: properly handle map assignments for OAS2DOTTYPE · 9d7c9b43
      Tal Shprecher authored
      The boolean destination in an OAS2DOTTYPE expression craps out during
      compilation when trying to assign to a map entry because, unlike slice entries,
      map entries are not directly addressable in memory. The solution is to
      properly order the boolean destination node so that map entries are set
      via autotmp variables.
      
      Fixes #14678
      
      Change-Id: If344e8f232b5bdac1b53c0f0d21eeb43ab17d3de
      Reviewed-on: https://go-review.googlesource.com/22833Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      9d7c9b43
    • Elias Naur's avatar
      runtime: use entire address space on 32 bit · e6ec8206
      Elias Naur authored
      In issue #13992, Russ mentioned that the heap bitmap footprint was
      halved but that the bitmap size calculation hadn't been updated. This
      presents the opportunity to either halve the bitmap size or double
      the addressable virtual space. This CL doubles the addressable virtual
      space. On 32 bit this can be tweaked further to allow the bitmap to
      cover the entire 4GB virtual address space, removing a failure mode
      if the kernel hands out memory with a too low address.
      
      First, fix the calculation and double _MaxArena32 to cover 4GB virtual
      memory space with the same bitmap size (256 MB).
      
      Then, allow the fallback mode for the initial memory reservation
      on 32 bit (or 64 bit with too little available virtual memory) to not
      include space for the arena. mheap.sysAlloc will automatically reserve
      additional space when the existing arena is full.
      
      Finally, set arena_start to 0 in 32 bit mode, so that any address is
      acceptable for subsequent (additional) reservations.
      
      Before, the bitmap was always located just before arena_start, so
      fix the two places relying on that assumption: Point the otherwise unused
      mheap.bitmap to one byte after the end of the bitmap, and use it for
      bitmap addressing instead of arena_start.
      
      With arena_start set to 0 on 32 bit, the cgoInRange check is no longer a
      sufficient check for Go pointers. Introduce and call inHeapOrStack to
      check whether a pointer is to the Go heap or stack.
      
      While we're here, remove sysReserveHigh which seems to be unused.
      
      Fixes #13992
      
      Change-Id: I592b513148a50b9d3967b5c5d94b86b3ec39acc2
      Reviewed-on: https://go-review.googlesource.com/20471Reviewed-by: 's avatarAustin Clements <austin@google.com>
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      e6ec8206
  4. 06 May, 2016 27 commits