1. 20 Feb, 2016 2 commits
    • Matthew Dempsky's avatar
      cmd/compile: refactor export data parsing · 7d3a4097
      Matthew Dempsky authored
      Merge push_parser and pop_parser into a single parse_import function
      and inline unimportfile. Shake out function boundaries a little bit so
      that the symmetry is readily visible.
      
      Move the import_package call into parse_import (and inline
      import_there into import_package).  This means importfile no longer
      needs to provide fake import data to be needlessly lexed/parsed every
      time it's called.
      
      Also, instead of indicating import success/failure by whether the next
      token is "package", import_spec can just check whether importpkg is
      non-nil.
      
      Tangentially, this somehow alters the diagnostics produced for
      test/fixedbugs/issue11610.go.  However, the new diagnostics are more
      consistent with those produced when the empty import statement is
      absent, which seems more desirable than maintaining the previous
      errors.
      
      Change-Id: I5cd1c22aa14da8a743ef569ff084711d137279d5
      Reviewed-on: https://go-review.googlesource.com/19650Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      7d3a4097
    • Ian Lance Taylor's avatar
      cmd/api: fix benchmark to ignore internal packages · 0d5e6a3f
      Ian Lance Taylor authored
      Change-Id: I8ee46287ae0744efa83ad343997ad6835520fa5c
      Reviewed-on: https://go-review.googlesource.com/19688
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      0d5e6a3f
  2. 19 Feb, 2016 20 commits
  3. 18 Feb, 2016 10 commits
  4. 17 Feb, 2016 5 commits
  5. 16 Feb, 2016 3 commits
    • Ian Lance Taylor's avatar
      cmd/go: avoid race on test environment · aa22c42d
      Ian Lance Taylor authored
      Fixes #14337.
      
      Change-Id: I58aef7e08d936b0712da577dd1ce5c9ed5d8bfd2
      Reviewed-on: https://go-review.googlesource.com/19513Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      aa22c42d
    • Austin Clements's avatar
      runtime: fix deadlock in TestCrashDumpsAllThreads · 7c22af83
      Austin Clements authored
      TestCrashDumpsAllThreads carefully sets the number of Ps to one
      greater than the number of non-preemptible loops it starts so that the
      main goroutine can continue to run (necessary because of #10958).
      However, if GC starts, it can take over that one spare P and lock up
      the system while waiting for the non-preemptible loops, causing the
      test to eventually time out. This deadlock is easily reproducible if
      you run the runtime test with GOGC=1.
      
      Fix this by forcing GOGC=off when running this test.
      
      Change-Id: Ifb22da5ce33f9a61700a326ea92fcf4b049721d1
      Reviewed-on: https://go-review.googlesource.com/19516
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      7c22af83
    • Russ Cox's avatar
      cmd/compile: print struct tags in var decl in inlined func body · feb2a5d6
      Russ Cox authored
      This bug was introduced in golang.org/cl/18217,
      while trying to fix #13777.
      
      Originally I wanted to just disable inlining for the case
      being handled incorrectly, but it's fairly difficult to detect
      and much easier just to fix. Since the case being handled
      incorrectly was inlined correctly in Go 1.5, not inlining it
      would also be somewhat of a regression.
      So just fix it.
      
      Test case copied from Ian's CL 19520.
      
      The mistake to worry about in this CL would be relaxing
      the condition too much (we now print the note more often
      than we did yesterday). To confirm that we'd catch this mistake,
      I checked that changing (!fmtbody || !t.Funarg) to (true) does
      cause fixedbugs/issue13777.go to fail. And putting it back
      to what is written in this CL makes that test pass again
      as well as the new fixedbugs/issue14331.go.
      So I believe that the new condition is correct for both constraints.
      
      Fixes #14331.
      
      Change-Id: I91f75a4d5d07c53af5caea1855c780d9874b8df6
      Reviewed-on: https://go-review.googlesource.com/19514
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      feb2a5d6