1. 03 Oct, 2017 11 commits
  2. 02 Oct, 2017 9 commits
  3. 01 Oct, 2017 2 commits
  4. 30 Sep, 2017 4 commits
    • Adam Langley's avatar
      encoding/asn1: respect “explicit” and “tag” when unmarshaling RawValues. · a82ee9c7
      Adam Langley authored
      Previously, any “explicit” and/or “tag” decorations on a RawValue would
      be ignored when unmarshaling. The RawValue would swallow whatever
      element was encountered.
      
      This change causes these decorations to be respected. Thus a field like:
        Foo asn1.RawValue `asn1:"explicit,tag:1,optional"`
      will only match if an explicit tag with value one is encountered.
      Otherwise the RawValue will get the default value and parsing will move
      onto the next element.
      
      Thanks to Martin Kreichgauer for reporting the issue.
      
      Change-Id: If6c4488685b9bd039cb5e352d6d75744f98dbb1f
      Reviewed-on: https://go-review.googlesource.com/34503
      Run-TryBot: Adam Langley <agl@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAdam Langley <agl@golang.org>
      a82ee9c7
    • Russ Cox's avatar
      cmd/go: stop creating nested temp directory trees · ee4fbbc6
      Russ Cox authored
      Now that we have -importcfg, there's no need for the
      temporary directory trees that mirror the import path structure,
      and we can drop a bunch of complex code that was building
      and maintaining that structure.
      
      This should fix "file name too long" errors on systems with low limits.
      (For example #10651 and #17070, although we fixed those by
      adding code to deal with very long file names on Windows instead.)
      
      Change-Id: I11e221c6c1edeb81c3b2f1d89988f5235aa2bbb9
      Reviewed-on: https://go-review.googlesource.com/56280Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      ee4fbbc6
    • Russ Cox's avatar
      cmd/go: hide work subdirectory names in gcc/clang object files · a1fb024a
      Russ Cox authored
      Until now the subdirectories under $WORK have had predictable
      names, so it was OK to strip just $WORK from the file names that
      end up in object files. In the future, those predictable names would
      cause predictable collisions when compiling one package in two
      different ways, so we're moving toward arbitrary, unpredictable
      subdirectory names instead. When we do that, if the names appear
      in the object files we won't get reproducible builds.
      
      Take the subdirectory names out now, to make the later change safe.
      
      Change-Id: I8057d1cc73f6e35c98b7718c9789c161dcbd87c0
      Reviewed-on: https://go-review.googlesource.com/67251
      Run-TryBot: Russ Cox <rsc@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a1fb024a
    • Russ Cox's avatar
      cmd/go: rename .o files going into final .a · 1409c287
      Russ Cox authored
      CL 64793 removed the collect step, which took all
      the generated .o files and merged them into a single _all.o.
      Now the generated .o files all go directly into the final .a.
      
      The only property of the _all.o approach that was lost
      in CL 64793 was that before we could be sure that the
      one name we used was "ar-compatible", that is, short
      enough not to be truncated.
      
      Now that the generated .o files are being kept directly,
      this CL gives them guaranteed ar-compatible names.
      
      This doesn't matter for nearly all uses today, but for some
      future processing it might help not to lose the .o suffix
      or not to end up with two identical entries with truncated
      names.
      
      I might not have bothered with this except that it's what's
      leftover after syncing my own CL disabling _all.o
      (necessary for reproducible builds on macOS) against
      Ian's CL 64793, which landed first.
      
      Change-Id: Ic86ed2a51432a5a4c58dc523e092a86d341f1997
      Reviewed-on: https://go-review.googlesource.com/67250
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      1409c287
  5. 29 Sep, 2017 7 commits
  6. 28 Sep, 2017 7 commits
    • Daniel Martí's avatar
      cmd/compile: add reflect to TestIntendedInlining · a2993456
      Daniel Martí authored
      Add the package to the table and start it off with a few small, basic
      functions. Inspired by CL 66331, which added flag.ro.
      
      Updates #21851.
      
      Change-Id: I3995cde1ff7bb09a718110473bed8b193c2232a5
      Reviewed-on: https://go-review.googlesource.com/66990
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIlya Tocar <ilya.tocar@intel.com>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      a2993456
    • Tim Cooper's avatar
      flag: align multi-line usage strings · 0828ec1e
      Tim Cooper authored
      Previously, a multi-line flag usage string would not be indented with the
      rest of the usage strings. This made long usage strings difficult to read.
      
      For example, the usage for flag.String("A", "", "1\n2\n3") would be printed
      as:
      
        -A	1
      2
      3
      
      But will now be printed as:
      
        -A	1
          	2
          	3
      
      Also fixes a slight error in the FlagSet.PrintDefaults documentation.
      
      Fixes #20799
      
      Change-Id: I4379c6b7590fdb93a2809a01046a0f6ae32c3e5d
      Reviewed-on: https://go-review.googlesource.com/66711
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      0828ec1e
    • Daniel Martí's avatar
      cmd/compile: simplify a few bits of the code · ded2c65d
      Daniel Martí authored
      Remove an unused type, a few redundant returns and replace a few slice
      append loops with a single append.
      
      Change-Id: If07248180bae5631b5b152c6051d9635889997d5
      Reviewed-on: https://go-review.googlesource.com/66851
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDave Cheney <dave@cheney.net>
      ded2c65d
    • Heschi Kreinick's avatar
      cmd/compile: cover control flow insns in location lists · 6bbe1bc9
      Heschi Kreinick authored
      The information that's used to generate DWARF location lists is very
      ssa.Value centric; it uses Values as start and end coordinates to define
      ranges. That mostly works fine, but control flow instructions don't come
      from Values, so the ranges couldn't cover them.
      
      Control flow instructions are generated when the SSA representation is
      converted to assembly, so that's the best place to extend the ranges
      to cover them. (Before that, there's nothing to refer to, and afterward
      the boundaries between blocks have been lost.) That requires block
      information in the debugInfo type, which then flows down to make
      everything else awkward. On the plus side, there's a little less copying
      slices around than there used to be, so it should be a little faster.
      
      Previously, the ranges for empty blocks were not very meaningful. That
      was fine, because they had no Values to cover, so no debug information
      was generated for them. But they do have control flow instructions
      (that's why they exist) and so now it's important that the information
      be correct. Introduce two sentinel values, BlockStart and BlockEnd, that
      denote the boundary of a block, even if the block is empty. BlockEnd
      replaces the previous SurvivedBlock flag.
      
      There's one more problem: the last instruction in the function will be a
      control flow instruction, so any live ranges need to be extended past
      it. But there's no instruction after it to use as the end of the range.
      Instead, leave the EndProg field of those ranges as nil and fix it up to
      point to past the end of the assembled text at the very last moment.
      
      Change-Id: I81f884020ff36fd6fe8d7888fc57c99412c4245b
      Reviewed-on: https://go-review.googlesource.com/63010Reviewed-by: 's avatarAlessandro Arzilli <alessandro.arzilli@gmail.com>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      Run-TryBot: Heschi Kreinick <heschi@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      6bbe1bc9
    • Matthew Dempsky's avatar
      reflect: fix method indexing for non-ASCII exported methods · 6f1724ff
      Matthew Dempsky authored
      Currently, methods are sorted by name. This happens to guarantee that
      exported ASCII methods appear before non-exported ASCII methods, but
      this breaks down when Unicode method names are considered.
      
      Type.Method already accounts for this by always indexing into the
      slice returned by exportedMethods. This CL makes Value.Method do the
      same.
      
      Fixes #22073.
      
      Change-Id: I9bfc6bbfb7353e0bd3c439a15d1c3da60d16d209
      Reviewed-on: https://go-review.googlesource.com/66770
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
      6f1724ff
    • Agniva De Sarker's avatar
      doc: fix minor capitalization typo · b3cae374
      Agniva De Sarker authored
      Updated page to Page to match with the sample code
      
      Fixes #21773
      
      Change-Id: Ia884a22fd587860c7a6148103b2b474425e45284
      Reviewed-on: https://go-review.googlesource.com/66790Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      b3cae374
    • Marvin Stenger's avatar
      runtime: delete unused function dumpbvtypes · 9ec5f5b3
      Marvin Stenger authored
      The function dumpbvtypes has no use case anymore, so we remove it with
      this change.
      
      Change-Id: I1e0323542be2bcc683b75dffde76b222e087c285
      Reviewed-on: https://go-review.googlesource.com/66370Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      9ec5f5b3