An error occurred fetching the project authors.
  1. 07 Apr, 2017 1 commit
    • Robert Griesemer's avatar
      cmd/compile: factor out Pkg, Sym, and Type into package types · f68f2928
      Robert Griesemer authored
      - created new package cmd/compile/internal/types
      - moved Pkg, Sym, Type to new package
      - to break cycles, for now we need the (ugly) types/utils.go
        file which contains a handful of functions that must be installed
        early by the gc frontend
      - to break cycles, for now we need two functions to convert between
        *gc.Node and *types.Node (the latter is a dummy type)
      - adjusted the gc's code to use the new package and the conversion
        functions as needed
      - made several Pkg, Sym, and Type methods functions as needed
      - renamed constructors typ, typPtr, typArray, etc. to types.New,
        types.NewPtr, types.NewArray, etc.
      
      Passes toolstash-check -all.
      
      Change-Id: I8adfa5e85c731645d0a7fd2030375ed6ebf54b72
      Reviewed-on: https://go-review.googlesource.com/39855Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      f68f2928
  2. 10 Feb, 2017 1 commit
  3. 02 Feb, 2017 1 commit
  4. 13 Jan, 2017 1 commit
  5. 09 Jan, 2017 2 commits
    • Robert Griesemer's avatar
      [dev.inline] cmd/internal/src: introduce compact source position representation · 472c792e
      Robert Griesemer authored
      XPos is a compact (8 instead of 16 bytes on a 64bit machine) source
      position representation. There is a 1:1 correspondence between each
      XPos and each regular Pos, translated via a global table.
      
      In some sense this brings back the LineHist, though positions can
      track line and column information; there is a O(1) translation
      between the representations (no binary search), and the translation
      is factored out.
      
      The size increase with the prior change is brought down again and
      the compiler speed is in line with the master repo (measured on
      the same "quiet" machine as for prior change):
      
      name       old time/op     new time/op     delta
      Template       256ms ± 1%      262ms ± 2%    ~             (p=0.063 n=5+4)
      Unicode        132ms ± 1%      135ms ± 2%    ~             (p=0.063 n=5+4)
      GoTypes        891ms ± 1%      871ms ± 1%  -2.28%          (p=0.016 n=5+4)
      Compiler       3.84s ± 2%      3.89s ± 2%    ~             (p=0.413 n=5+4)
      MakeBash       47.1s ± 1%      46.2s ± 2%    ~             (p=0.095 n=5+5)
      
      name       old user-ns/op  new user-ns/op  delta
      Template        309M ± 1%       314M ± 2%    ~             (p=0.111 n=5+4)
      Unicode         165M ± 1%       172M ± 9%    ~             (p=0.151 n=5+5)
      GoTypes        1.14G ± 2%      1.12G ± 1%    ~             (p=0.063 n=5+4)
      Compiler       5.00G ± 1%      4.96G ± 1%    ~             (p=0.286 n=5+4)
      
      Change-Id: Icc570cc60ab014d8d9af6976f1f961ab8828cc47
      Reviewed-on: https://go-review.googlesource.com/34506
      Run-TryBot: Robert Griesemer <gri@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      472c792e
    • Robert Griesemer's avatar
      [dev.inline] cmd/internal/src: replace src.Pos with syntax.Pos · 4808fc44
      Robert Griesemer authored
      This replaces the src.Pos LineHist-based position tracking with
      the syntax.Pos implementation and updates all uses.
      
      The LineHist table is not used anymore - the respective code is still
      there but should be removed eventually. CL forthcoming.
      
      Passes toolstash -cmp when comparing to the master repo (with the
      exception of a couple of swapped assembly instructions, likely due
      to different instruction scheduling because the line-based sorting
      has changed; though this is won't affect correctness).
      
      The sizes of various important compiler data structures have increased
      significantly (see the various sizes_test.go files); this is probably
      the reason for an increase of compilation times (to be addressed). Here
      are the results of compilebench -count 5, run on a "quiet" machine (no
      apps running besides a terminal):
      
      name       old time/op     new time/op     delta
      Template       256ms ± 1%      280ms ±15%  +9.54%          (p=0.008 n=5+5)
      Unicode        132ms ± 1%      132ms ± 1%    ~             (p=0.690 n=5+5)
      GoTypes        891ms ± 1%      917ms ± 2%  +2.88%          (p=0.008 n=5+5)
      Compiler       3.84s ± 2%      3.99s ± 2%  +3.95%          (p=0.016 n=5+5)
      MakeBash       47.1s ± 1%      47.2s ± 2%    ~             (p=0.841 n=5+5)
      
      name       old user-ns/op  new user-ns/op  delta
      Template        309M ± 1%       326M ± 2%  +5.18%          (p=0.008 n=5+5)
      Unicode         165M ± 1%       168M ± 4%    ~             (p=0.421 n=5+5)
      GoTypes        1.14G ± 2%      1.18G ± 1%  +3.47%          (p=0.008 n=5+5)
      Compiler       5.00G ± 1%      5.16G ± 1%  +3.12%          (p=0.008 n=5+5)
      
      Change-Id: I241c4246cdff627d7ecb95cac23060b38f9775ec
      Reviewed-on: https://go-review.googlesource.com/34273
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      4808fc44
  6. 08 Dec, 2016 1 commit
  7. 25 Oct, 2016 1 commit
  8. 15 Oct, 2016 2 commits
    • Austin Clements's avatar
      cmd/compile: add go:notinheap type pragma · 77527a31
      Austin Clements authored
      This adds a //go:notinheap pragma for declarations of types that must
      not be heap allocated. We ensure these rules by disallowing new(T),
      make([]T), append([]T), or implicit allocation of T, by disallowing
      conversions to notinheap types, and by propagating notinheap to any
      struct or array that contains notinheap elements.
      
      The utility of this pragma is that we can eliminate write barriers for
      writes to pointers to go:notinheap types, since the write barrier is
      guaranteed to be a no-op. This will let us mark several scheduler and
      memory allocator structures as go:notinheap, which will let us
      disallow write barriers in the scheduler and memory allocator much
      more thoroughly and also eliminate some problematic hybrid write
      barriers.
      
      This also makes go:nowritebarrierrec and go:yeswritebarrierrec much
      more powerful. Currently we use go:nowritebarrier all over the place,
      but it's almost never what you actually want: when write barriers are
      illegal, they're typically illegal for a whole dynamic scope. Partly
      this is because go:nowritebarrier has been around longer, but it's
      also because go:nowritebarrierrec couldn't be used in situations that
      had no-op write barriers or where some nested scope did allow write
      barriers. go:notinheap eliminates many no-op write barriers and
      go:yeswritebarrierrec makes it possible to opt back in to write
      barriers, so these two changes will let us use go:nowritebarrierrec
      far more liberally.
      
      This updates #13386, which is about controlling pointers from non-GC'd
      memory to GC'd memory. That would require some additional pragma (or
      pragmas), but could build on this pragma.
      
      Change-Id: I6314f8f4181535dd166887c9ec239977b54940bd
      Reviewed-on: https://go-review.googlesource.com/30939Reviewed-by: default avatarKeith Randall <khr@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      77527a31
    • Austin Clements's avatar
      cmd/compile, runtime: add go:yeswritebarrierrec pragma · a9e6cebd
      Austin Clements authored
      This pragma cancels the effect of go:nowritebarrierrec. This is useful
      in the scheduler because there are places where we enter a function
      without a valid P (and hence cannot have write barriers), but then
      obtain a P. This allows us to annotate the function with
      go:nowritebarrierrec and split out the part after we've obtained a P
      into a go:yeswritebarrierrec function.
      
      Change-Id: Ic8ce4b6d3c074a1ecd8280ad90eaf39f0ffbcc2a
      Reviewed-on: https://go-review.googlesource.com/30938Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      a9e6cebd
  9. 15 Sep, 2016 1 commit
    • Dave Cheney's avatar
      cmd/compile/internal/gc: unexport more helper functions · d7012ca2
      Dave Cheney authored
      After the removal of the old backend many types are no longer referenced
      outside internal/gc. Make these functions private so that tools like
      honnef.co/go/unused can spot when they become dead code. In doing so
      this CL identified several previously public helpers which are no longer
      used, so removes them.
      
      This should be the last of the public functions.
      
      Change-Id: I7e9c4e72f86f391b428b9dddb6f0d516529706c3
      Reviewed-on: https://go-review.googlesource.com/29134
      Run-TryBot: Dave Cheney <dave@cheney.net>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      d7012ca2
  10. 12 Sep, 2016 1 commit
  11. 31 Aug, 2016 1 commit
    • Matthew Dempsky's avatar
      cmd/compile: handle pragmas immediately with -newparser=1 · ee161e85
      Matthew Dempsky authored
      Instead of saving all pragmas and processing them after parsing is
      finished, process them immediately during scanning like the current
      lexer does.
      
      This is a bit unfortunate because it means we can't use
      syntax.ParseFile to concurrently parse files yet, but it fixes how we
      report syntax errors in the presence of //line pragmas.
      
      While here, add a bunch more gcCompat entries to syntax/parser.go to
      get "go build -toolexec='toolstash -cmp' std cmd" passing. There are
      still a few remaining cases only triggered building unit tests, but
      this seems like a nice checkpoint.
      
      Change-Id: Iaf3bbcf2849857a460496f31eea228e0c585ce13
      Reviewed-on: https://go-review.googlesource.com/28226
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      ee161e85
  12. 30 Aug, 2016 1 commit
  13. 16 Aug, 2016 1 commit
  14. 06 Jul, 2016 1 commit
    • Ian Lance Taylor's avatar
      cmd/compile, syscall: add //go:uintptrescapes comment, and use it · bbe5da42
      Ian Lance Taylor authored
      This new comment can be used to declare that the uintptr arguments to a
      function may be converted from pointers, and that those pointers should
      be considered to escape. This is used for the Call methods in
      dll_windows.go that take uintptr arguments, because they call Syscall.
      
      We can't treat these functions as we do syscall.Syscall, because unlike
      Syscall they may cause the stack to grow. For Syscall we can assume that
      stack arguments can remain on the stack, but for these functions we need
      them to escape.
      
      Fixes #16035.
      
      Change-Id: Ia0e5b4068c04f8d303d95ab9ea394939f1f57454
      Reviewed-on: https://go-review.googlesource.com/24551Reviewed-by: default avatarDavid Chase <drchase@google.com>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      bbe5da42
  15. 26 Apr, 2016 1 commit
    • Matthew Dempsky's avatar
      cmd/compile: lazily initialize litbuf · 8d075bee
      Matthew Dempsky authored
      Instead of eagerly creating strings like "literal 2.01" for every
      lexed number in case we need to mention it in an error message, defer
      this work to (*parser).syntax_error.
      
      name      old allocs/op  new allocs/op  delta
      Template      482k ± 0%      482k ± 0%  -0.12%   (p=0.000 n=9+10)
      GoTypes      1.35M ± 0%     1.35M ± 0%  -0.04%  (p=0.015 n=10+10)
      Compiler     5.45M ± 0%     5.44M ± 0%  -0.12%    (p=0.000 n=9+8)
      
      Change-Id: I333b3c80e583864914412fb38f8c0b7f1d8c8821
      Reviewed-on: https://go-review.googlesource.com/22480
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      8d075bee
  16. 14 Apr, 2016 1 commit
  17. 12 Apr, 2016 1 commit
    • 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
  18. 05 Apr, 2016 1 commit
  19. 24 Mar, 2016 1 commit
  20. 21 Mar, 2016 1 commit
  21. 11 Mar, 2016 4 commits
  22. 10 Mar, 2016 2 commits
  23. 09 Mar, 2016 1 commit
  24. 08 Mar, 2016 2 commits
  25. 06 Mar, 2016 1 commit
  26. 05 Mar, 2016 1 commit
  27. 04 Mar, 2016 1 commit
  28. 03 Mar, 2016 2 commits
  29. 02 Mar, 2016 2 commits
  30. 01 Mar, 2016 2 commits