1. 12 Nov, 2014 2 commits
  2. 11 Nov, 2014 3 commits
    • Robert Griesemer's avatar
      spec: method selectors don't auto-deref named pointer types · 40818cfe
      Robert Griesemer authored
      Language clarification.
      
      The existing rules for selector expressions imply
      automatic dereferencing of pointers to struct fields.
      They also implied automatic dereferencing of selectors
      denoting methods. In almost all cases, such automatic
      dereferencing does indeed take place for methods but the
      reason is not the selector rules but the fact that method
      sets include both methods with T and *T receivers; so for
      a *T actual receiver, a method expecting a formal T
      receiver, also accepts a *T (and the invocation or method
      value expression is the reason for the auto-derefering).
      
      However, the rules as stated so far implied that even in
      case of a variable p of named pointer type P, a selector
      expression p.f would always be shorthand for (*p).f. This
      is true for field selectors f, but cannot be true for
      method selectors since a named pointer type always has an
      empty method set.
      
      Named pointer types may never appear as anonymous field
      types (and method receivers, for that matter), so this
      only applies to variables declared of a named pointer
      type. This is exceedingly rare and perhaps shouldn't be
      permitted in the first place (but we cannot change that).
      
      Amended the selector rules to make auto-deref of values
      of named pointer types an exception to the general rules
      and added corresponding examples with explanations.
      
      Both gc and gccgo have a bug where they do auto-deref
      pointers of named types in method selectors where they
      should not:
      
      See http://play.golang.org/p/c6VhjcIVdM , line 45.
      
      Fixes #5769.
      Fixes #8989.
      
      LGTM=r, rsc
      R=r, rsc, iant, ken
      CC=golang-codereviews
      https://golang.org/cl/168790043
      40818cfe
    • Rob Pike's avatar
      doc/gopher: add jpgs of the 5th anniversary image · 0f8cd143
      Rob Pike authored
      LGTM=adg
      R=golang-codereviews, adg
      CC=golang-codereviews
      https://golang.org/cl/172980043
      0f8cd143
    • Nigel Tao's avatar
      doc: update go1.4.html's minor library changes. · e522a477
      Nigel Tao authored
      LGTM=r
      R=r
      CC=golang-codereviews
      https://golang.org/cl/173920043
      e522a477
  3. 10 Nov, 2014 9 commits
  4. 09 Nov, 2014 7 commits
  5. 08 Nov, 2014 1 commit
  6. 07 Nov, 2014 3 commits
  7. 06 Nov, 2014 11 commits
  8. 05 Nov, 2014 2 commits
  9. 04 Nov, 2014 2 commits
    • Ian Lance Taylor's avatar
      test: comment out failing cases from sinit.go · c6e53fea
      Ian Lance Taylor authored
      One failing case this removes is:
      
      var bytes = []byte("hello, world")
      var copy_bytes = bytes
      
      We could handle this in the compiler, but it requires special
      case for a variable that is initialized to the value of a
      variable that is initialized to a string literal converted to
      []byte.  This seems an unlikely case--it never occurs in the
      standrd library--and it seems unnecessary to write the code to
      handle it.
      
      If we do want to support this case, one approach is
      https://golang.org/cl/171840043.
      
      The other failing cases are of the form
      
      var bx bool
      var copy_bx = bx
      
      The compiler used to initialize copy_bx to false.  However,
      that led to issue 7665, since bx may be initialized in non-Go
      code.  The compiler no longer assumes that bx must be false,
      so copy_bx can not be statically initialized.
      
      We can fix these with https://golang.org/cl/169040043
      if we also pass -complete to the compiler as part of this
      test.  This is OK but it's too late in the release cycle.
      
      Fixes #8746.
      
      LGTM=rsc
      R=rsc
      CC=golang-codereviews
      https://golang.org/cl/165400043
      c6e53fea
    • Austin Clements's avatar
      gc: abort if given an unknown debug (-d) flag · 516d9ef5
      Austin Clements authored
      The check for unknown command line debug flags in gc was
      incorrect: the loop over debugtab terminates when it reaches a
      nil entry, but it was only reporting an error if the parser
      had passed the last entry of debugtab (which it never did).
      Fix this by reporting the usage error if the loop reaches a
      nil entry.
      
      LGTM=rsc
      R=rsc
      CC=golang-codereviews
      https://golang.org/cl/166110043
      516d9ef5