runtime: introduce entersyscallblock()
In preparation for the new scheduler.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7386044
runtime: prepare for M's running w/o mcache
Can not happen ATM. In preparation for the new scheduler.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7388043
go/types: support for customizable Alignof, Sizeof

(Offsetof is a function of Alignof and Sizeof.)

- removed IntSize, PtrSize from Context (set Sizeof instead)
- GcImporter needs a Context now (it needs to have
  access to Sizeof/Alignof)
- removed exported Size field from Basic (use Sizeof)
- added Offset to Field
- added Alignment, Size to Struct

R=adonovan
CC=golang-dev
https://codereview.appspot.com/7357046
bufio: new Scanner interface

Add a new, simple interface for scanning (probably textual) data,
based on a new type called Scanner. It does its own internal buffering,
so should be plausibly efficient even without injecting a bufio.Reader.
The format of the input is defined by a "split function", by default
splitting into lines. Other implemented split functions include single
bytes, single runes, and space-separated words.

Here's the loop to scan stdin as a file of lines:

        s := bufio.NewScanner(os.Stdin)
        for s.Scan() {
                fmt.Printf("%s\n", s.Bytes())
        }
        if s.Err() != nil {
                log.Fatal(s.Err())
        }

While we're dealing with spaces, define what space means to strings.Fields.

Fixes issue 4802.

R=adg, rogpeppe, bradfitz, rsc
CC=golang-dev
https://codereview.appspot.com/7322088
cmd/godoc: better console error message for example error

(per r's suggestion)

R=r
CC=golang-dev
https://codereview.appspot.com/7376045
regexp: use Scanner in exec_test

R=rsc
CC=golang-dev
https://codereview.appspot.com/7381046
strconv: use Scanner in fp_test

R=rsc
CC=golang-dev
https://codereview.appspot.com/7385045
A+C: add Robert Dinu (Individual CLA)

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7386045
fmt: fix width for nil values

Apply width when using Printf with nil values.
Fixes issue 4772.

R=r, adg
CC=golang-dev
https://codereview.appspot.com/7314114

Committer: Rob Pike <r@golang.org>
mime: use Scanner to read mime files during init
Also close the file when we're done.

R=bradfitz
CC=golang-dev
https://codereview.appspot.com/7363045
A+C: Olivier SAINGRE (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://codereview.appspot.com/7400045
encoding/xml: make sure Encoder.Encode reports Write errors.

Fixes issue 4112.

R=remyoudompheng, daniel.morsing, dave, rsc
CC=golang-dev
https://codereview.appspot.com/7085053

Committer: Brad Fitzpatrick <bradfitz@golang.org>
A+C: Steven Elliot Harris (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://codereview.appspot.com/7377045
misc/emacs: Present "godoc" documentation buffers using view-mode.

Mimic the Emacs convention of presenting read-only files meant
for browsing using view-mode, rather than Fundamental mode
which mistakenly allows editing of the "godoc" content.
Fixes issue 4322.

R=golang-dev, bradfitz, sameer
CC=golang-dev
https://codereview.appspot.com/7231055

Committer: Brad Fitzpatrick <bradfitz@golang.org>