1. 24 Feb, 2014 28 commits
  2. 23 Feb, 2014 4 commits
  3. 21 Feb, 2014 5 commits
  4. 20 Feb, 2014 3 commits
    • Russ Cox's avatar
      runtime/debug: add SetPanicOnFault · e56c6e75
      Russ Cox authored
      SetPanicOnFault allows recovery from unexpected memory faults.
      This can be useful if you are using a memory-mapped file
      or probing the address space of the current program.
      
      LGTM=r
      R=r
      CC=golang-codereviews
      https://golang.org/cl/66590044
      e56c6e75
    • Russ Cox's avatar
      runtime: use goc2c as much as possible · 67c83db6
      Russ Cox authored
      Package runtime's C functions written to be called from Go
      started out written in C using carefully constructed argument
      lists and the FLUSH macro to write a result back to memory.
      
      For some functions, the appropriate parameter list ended up
      being architecture-dependent due to differences in alignment,
      so we added 'goc2c', which takes a .goc file containing Go func
      declarations but C bodies, rewrites the Go func declaration to
      equivalent C declarations for the target architecture, adds the
      needed FLUSH statements, and writes out an equivalent C file.
      That C file is compiled as part of package runtime.
      
      Native Client's x86-64 support introduces the most complex
      alignment rules yet, breaking many functions that could until
      now be portably written in C. Using goc2c for those avoids the
      breakage.
      
      Separately, Keith's work on emitting stack information from
      the C compiler would require the hand-written functions
      to add #pragmas specifying how many arguments are result
      parameters. Using goc2c for those avoids maintaining #pragmas.
      
      For both reasons, use goc2c for as many Go-called C functions
      as possible.
      
      This CL is a replay of the bulk of CL 15400047 and CL 15790043,
      both of which were reviewed as part of the NaCl port and are
      checked in to the NaCl branch. This CL is part of bringing the
      NaCl code into the main tree.
      
      No new code here, just reformatting and occasional movement
      into .h files.
      
      LGTM=r
      R=dave, alex.brainman, r
      CC=golang-codereviews
      https://golang.org/cl/65220044
      67c83db6
    • Russ Cox's avatar
      cmd/pack: fix match · 258c278e
      Russ Cox authored
      Match used len(ar.files) == 0 to mean "match everything"
      but it also deleted matched things from the list, so once you
      had matched everything you asked for, match returned true
      for whatever was left in the archive too.
      
      Concretely, if you have an archive containing f1, f2, then
              pack t foo.a f1
      would match f1 and then, because len(ar.files) == 0 after
      deleting f1 from the match list, also match f2.
      
      Avoid the problem by recording explicitly whether match
      matches everything.
      
      LGTM=r, dsymonds
      R=r, dsymonds
      CC=golang-codereviews
      https://golang.org/cl/65630046
      258c278e