1. 27 May, 2014 1 commit
  2. 26 May, 2014 1 commit
  3. 24 May, 2014 2 commits
  4. 23 May, 2014 1 commit
  5. 22 May, 2014 2 commits
    • Robert Griesemer's avatar
      spec: explicitly disallow blank methods in interface types · 2c83f1ea
      Robert Griesemer authored
      The spec was unclear about whether blank methods should be
      permitted in interface types. gccgo permits at most one, gc
      crashes if there are more than one, go/types permits at most
      one.
      
      Discussion:
      
      Since method sets of non-interface types never contain methods
      with blank names (blank methods are never declared), it is impossible
      to satisfy an interface with a blank method.
      
      It is possible to declare variables of assignable interface types
      (but not necessarily identical types) containing blank methods, and
      assign those variables to each other, but the values of those
      variables can only be nil.
      
      There appear to be two "reasonable" alternatives:
      
      1) Permit at most one blank method (since method names must be unique),
      and consider it part of the interface. This is what appears to happen
      now, with corner-case bugs. Such interfaces can never be implemented.
      
      2) Permit arbitrary many blank methods but ignore them. This appears
      to be closer to the handling of blank identifiers in declarations.
      However, an interface type literal is not a declaration (it's a type
      literal). Also, for struct types, blank identifiers are not ignored;
      so the analogy with declarations is flawed.
      
      Both these alternatives don't seem to add any benefit and are likely
      (if only slightly) more complicated to explain and implement than
      disallowing blank methods in interfaces altogether.
      
      Fixes #6604.
      
      LGTM=r, rsc, iant
      R=r, rsc, ken, iant
      CC=golang-codereviews
      https://golang.org/cl/99410046
      2c83f1ea
    • Russ Cox's avatar
      doc/go1.3.html: change uintptr to integer in unsafe.Pointer section · 8d8dab34
      Russ Cox authored
      The key property here is what the bit pattern represents,
      not what its type is. Storing 5 into a pointer is the problem.
      Storing a uintptr that holds pointer bits back into a pointer
      is not as much of a problem, and not what we are claiming
      the runtime will detect.
      
      Longer discussion at
      https://groups.google.com/d/msg/golang-nuts/dIGISmr9hw0/0jO4ce85Eh0J
      
      LGTM=r
      R=r
      CC=golang-codereviews
      https://golang.org/cl/98370045
      8d8dab34
  6. 21 May, 2014 18 commits
  7. 20 May, 2014 15 commits
    • Keith Randall's avatar
      reflect: don't panic on delete from nil map. · cb6cb42e
      Keith Randall authored
      Fixes #8051
      
      LGTM=bradfitz
      R=golang-codereviews, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/95560046
      cb6cb42e
    • Robert Griesemer's avatar
      spec: clarify section on package initialization · a4366984
      Robert Griesemer authored
      - split description of package initialization and
        program execution
      - better grouping of concerns in section on package
        initialization
      - more explicit definition of what constitues a
        dependency
      - removed language about constant dependencies -
        they are computed at compile-time and not
        initialized at run-time
      - clarified that independent variables are initialized
        in declaration order (rather than reference order)
      
      Note that the last clarification is what distinguishes
      gc and gccgo at the moment: gc uses reference order
      (i.e., order in which variables are referenced in
      initialization expressions), while gccgo uses declaration
      order for independent variables.
      
      Not a language change. But adopting this CL will
      clarify what constitutes a dependency.
      
      Fixes #6703.
      
      LGTM=adonovan, r, iant, rsc
      R=r, rsc, iant, ken, adonovan
      CC=golang-codereviews
      https://golang.org/cl/99020043
      a4366984
    • Rob Pike's avatar
      doc/go_spec.html: fix broken anchor tag · 4d36ad77
      Rob Pike authored
      LGTM=gri
      R=gri
      CC=golang-codereviews
      https://golang.org/cl/99420045
      4d36ad77
    • Rob Pike's avatar
      doc/install.html: fix duplicate id= tag · 87ef6e91
      Rob Pike authored
      LGTM=minux.ma
      R=adg, minux.ma
      CC=golang-codereviews
      https://golang.org/cl/95540045
      87ef6e91
    • Shenghou Ma's avatar
      all: fix "the the" typos. · ca6be91c
      Shenghou Ma authored
      LGTM=bradfitz
      R=golang-codereviews, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/93470043
      ca6be91c
    • Shenghou Ma's avatar
      runtime: revise the document of Version() · 8aa8348b
      Shenghou Ma authored
      Fixes #7701. (again, differently)
      
      LGTM=rsc
      R=iant, rsc
      CC=golang-codereviews
      https://golang.org/cl/94560043
      8aa8348b
    • Brad Fitzpatrick's avatar
      src: make nacltest.bash executable · 2fed8c76
      Brad Fitzpatrick authored
      TBR=rsc
      R=rsc
      CC=golang-codereviews
      https://golang.org/cl/98480043
      2fed8c76
    • Shenghou Ma's avatar
      undo CL 84040045 / 5302b4c58aa0 · dfbb2a95
      Shenghou Ma authored
      This idea was rejected in CL 5731059. We should fix the
      runtime docs instead.
      
      ««« original CL description
      cmd/dist: reflect local changes to tree in goversion
      
      runtime.Version() requires a trailing "+" when
      tree had local modifications at time of build.
      
      Fixes #7701
      
      LGTM=iant
      R=golang-codereviews, iant
      CC=golang-codereviews
      https://golang.org/cl/84040045
      
      »»»
      
      LGTM=rsc, mra
      R=iant, rsc, mra
      CC=golang-codereviews
      https://golang.org/cl/100520043
      dfbb2a95
    • David du Colombier's avatar
      debug/plan9obj: cleanup api · b28aa1f1
      David du Colombier authored
      - Don't export Prog structure.
      - Remove ProgHeader and ExecTable structures.
      - Add Magic, Bss and Entry fields in FileHeader.
      - Replace ?_MAGIC variables with constants.
      - Ignore final EOF from ReadAt.
      - Improve documentation.
      
      Fixes #7989.
      
      LGTM=rsc
      R=rsc, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/91400044
      b28aa1f1
    • Rob Pike's avatar
      cmd/go: document file types · 294f9b88
      Rob Pike authored
      Explain which files the go command looks at, and what they represent.
      Fixes #6348.
      
      LGTM=rsc
      R=rsc, minux.ma
      CC=golang-codereviews
      https://golang.org/cl/96480043
      294f9b88
    • Russ Cox's avatar
      doc/go1.3.html: mention cgo [0]byte bug fix fallout · 7ef0eb1c
      Russ Cox authored
      Fixes #7958.
      
      LGTM=r
      R=r
      CC=golang-codereviews
      https://golang.org/cl/91590044
      7ef0eb1c
    • Russ Cox's avatar
      build: make nacl pass · 0c2a7274
      Russ Cox authored
      Add nacl.bash, the NaCl version of all.bash.
      It's a separate script because it builds a variant of package syscall
      with a large zip file embedded in it, containing all the input files
      needed for tests.
      
      Disable various tests new since the last round, mostly the ones using os/exec.
      
      Fixes #7945.
      
      LGTM=dave
      R=golang-codereviews, remyoudompheng, dave, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/100590044
      0c2a7274
    • Russ Cox's avatar
      test: test issue 7884 (already fixed) · f374dd30
      Russ Cox authored
      I don't know when the bug was fixed, but empirically it was.
      Make sure it stays fixed by adding a test.
      
      Fixes #7884.
      
      LGTM=adg
      R=golang-codereviews, adg
      CC=golang-codereviews
      https://golang.org/cl/93500043
      f374dd30
    • Russ Cox's avatar
      syscall: fix Write(nil) on NaCl · 82854d7b
      Russ Cox authored
      Fixes #7050.
      
      LGTM=crawshaw, r
      R=golang-codereviews, crawshaw, r
      CC=golang-codereviews
      https://golang.org/cl/91590043
      82854d7b
    • Russ Cox's avatar
      cmd/ld: make lldb happy with Mach-O 6.out files · a4a1fadf
      Russ Cox authored
      Apparently all the __DWARF sections need addresses
      even though they are marked as "do not load from disk".
      Continue the address numbering from the data segment.
      
      With this change:
      
      g% lldb helloworld
      Current executable set to 'helloworld' (x86_64).
      (lldb) b main.main
      Breakpoint 1: where = helloworld`main.main + 25 at helloworld.go:12, address = 0x0000000000002019
      (lldb) r
      Process 68509 launched: '/Users/rsc/g/go/src/cmd/6l/helloworld' (x86_64)
      1 location added to breakpoint 1
      (lldb)
      [KProcess 68509 stopped
      * thread #1: tid = 0x8b7a27, 0x0000000000002019 helloworld`main.main + 25 at helloworld.go:12, stop reason = breakpoint 1.2
          frame #0: 0x0000000000002019 helloworld`main.main + 25 at helloworld.go:12
         9   	package main
         10
         11  	func main() {
      -> 12  		print("hello, world\n")
         13  	}
      (lldb) bt
      * thread #1: tid = 0x8b7a27, 0x0000000000002019 helloworld`main.main + 25 at helloworld.go:12, stop reason = breakpoint 1.2
        * frame #0: 0x0000000000002019 helloworld`main.main + 25 at helloworld.go:12
      (lldb) disas
      helloworld`main.main at helloworld.go:11:
         0x2000:  movq   %gs:0x8a0, %rcx
         0x2009:  cmpq   (%rcx), %rsp
         0x200c:  ja     0x2015                    ; main.main + 21 at helloworld.go:11
         0x200e:  callq  0x20da0                   ; runtime.morestack00_noctxt at atomic_amd64x.c:28
         0x2013:  jmp    0x2000                    ; main.main at helloworld.go:11
         0x2015:  subq   $0x10, %rsp
      -> 0x2019:  leaq   0x2c2e0, %rbx
         0x2021:  leaq   (%rsp), %rbp
         0x2025:  movq   %rbp, %rdi
         0x2028:  movq   %rbx, %rsi
         0x202b:  movsq
         0x202d:  movsq
         0x202f:  callq  0x10300                   ; runtime.printstring at compiler.go:1
         0x2034:  addq   $0x10, %rsp
         0x2038:  ret
         0x2039:  addb   %al, (%rax)
         0x203b:  addb   %al, (%rax)
         0x203d:  addb   %al, (%rax)
      (lldb) quit
      Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] y
      g%
      
      Fixes #7070.
      
      LGTM=iant
      R=golang-codereviews, iant
      CC=golang-codereviews
      https://golang.org/cl/93510043
      a4a1fadf