net/http: add If-None-Match and If-Range support to ServeContent

Also, clear Content-Type and Content-Length on Not Modified
responses before server.go strips them and spams the logs with
warnings.

R=rsc
CC=golang-dev
http://codereview.appspot.com/6503090
6l/8l: emit correct opcodes to F(SUB|DIV)R?D.

When the destination was not F0, 6l and 8l swapped FSUBD/FSUBRD and
FDIVD/FDIVRD.

R=golang-dev, dave, rsc
CC=golang-dev
http://codereview.appspot.com/6498092
undo CL 6498092 / 4ff71bc1a199

Broke tests on 386.

««« original CL description
6l/8l: emit correct opcodes to F(SUB|DIV)R?D.

When the destination was not F0, 6l and 8l swapped FSUBD/FSUBRD and
FDIVD/FDIVRD.

R=golang-dev, dave, rsc
CC=golang-dev
http://codereview.appspot.com/6498092
»»»

R=golang-dev
CC=golang-dev
http://codereview.appspot.com/6492100
gc: initial BOM is legal.
Fixes issue 4040.

R=rsc
CC=golang-dev
http://codereview.appspot.com/6497098
exp/types/staging: typechecker API

First set of type checker files for review.
The primary concern here is the typechecker
API (types.go).

R=rsc, adonovan, r, rogpeppe
CC=golang-dev
http://codereview.appspot.com/6490089
net: rename files to clarify platform dependency

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6489056
doc: Don't imply incorrect guarantees about data races.

A race between
        a = "hello, world"
and
        print(a)
is not guaranteed to print either "hello, world" or "".
Its behaviour is undefined.

Fixes issue 4039.

R=rsc
CC=dvyukov, gobot, golang-dev, r
http://codereview.appspot.com/6489075
net: delete unused IP-level socket option helpers

R=rsc, dave
CC=bradfitz, gobot, golang-dev
http://codereview.appspot.com/6497044
C: add Brian Slesinsky (Google CLA)

R=golang-dev, dsymonds
CC=golang-dev
http://codereview.appspot.com/6496103
doc css: topbar sticks to the top of large windows.
Rationale: for large screens, the convenience of not having to scroll
to the top of the page to do a search outweighs having less vertical
space.
Tested with Chrome, Firefox, Safari with various window and text sizes.

R=adg
CC=gobot, golang-dev
http://codereview.appspot.com/6493071

Committer: Andrew Gerrand <adg@golang.org>
encoding/json: handle anonymous fields

Fixes issue 3069.

R=golang-dev, n13m3y3r
CC=golang-dev
http://codereview.appspot.com/6460044
misc/cgo/life: disable it temporarily on windows, because go builder fails

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6506096
C: spell Brian's name correctly

R=iant, nigeltao
CC=golang-dev
http://codereview.appspot.com/6492102
strings: more thorough Replacer tests.

This verifies existing behavior. Some replacements are arguably wrong
(these are marked with TODO) but changing behavior is left for a
follow-up CL.

Also fix that BenchmarkGenericMatch wasn't actually matching anything.

R=rsc, eric.d.eisner
CC=bradfitz, golang-dev
http://codereview.appspot.com/6488110
cmd/6g, cmd/8g: eliminate extra agen for nil comparisons.

Removes an extra LEAL/LEAQ instructions there and usually saves
a useless temporary in the idiom
    if err := foo(); err != nil {...}

Generated code is also less involved:
    MOVQ err+n(SP), AX
    CMPQ AX, $0
(potentially CMPQ n(SP), $0) instead of
    LEAQ err+n(SP), AX
    CMPQ (AX), $0

Update issue 1914.

R=daniel.morsing, nigeltao, rsc
CC=golang-dev, remy
http://codereview.appspot.com/6493099
cmd/6g, cmd/8g: do not LEA[LQ] interfaces when calling methods.

It is enough to load directly the data word and the itab word
from memory, so we save a LEA instruction for each method call,
and allow elimination of some extra temporaries.

Update issue 1914.

R=daniel.morsing, rsc
CC=golang-dev, remy
http://codereview.appspot.com/6501110
C: add Francesc Campoy (Google CLA)

R=golang-dev, dsymonds, campoy
CC=golang-dev
http://codereview.appspot.com/6490102
cmd/gc: recognize small TPTR64 values as small integer constants.

Given the following Go program:

func sum(s []int) int {
        ret := 0
        for _, x := range s {
                ret += x
        }
        return ret
}

6g would previously generate:

--- prog list "sum" ---
0000 (main.go:3) TEXT    sum+0(SB),$0-24
0001 (main.go:5) MOVQ    s+0(FP),CX
0002 (main.go:5) MOVL    s+8(FP),DI
0003 (main.go:5) MOVL    s+12(FP),BX
0004 (main.go:4) MOVL    $0,SI
0005 (main.go:5) MOVL    $0,AX
0006 (main.go:5) JMP     ,8
0007 (main.go:5) INCL    ,AX
0008 (main.go:5) CMPL    AX,DI
0009 (main.go:5) JGE     $0,16
0010 (main.go:5) MOVL    (CX),DX
0011 (main.go:5) MOVQ    $4,BX
0012 (main.go:5) ADDQ    CX,BX
0013 (main.go:5) MOVQ    BX,CX
0014 (main.go:6) ADDL    DX,SI
0015 (main.go:5) JMP     ,7
0016 (main.go:8) MOVL    SI,.noname+16(FP)
0017 (main.go:8) RET     ,

and now generates:

--- prog list "sum" ---
0000 (main.go:3) TEXT    sum+0(SB),$0-24
0001 (main.go:5) MOVQ    s+0(FP),CX
0002 (main.go:5) MOVL    s+8(FP),DI
0003 (main.go:5) MOVL    s+12(FP),BX
0004 (main.go:4) MOVL    $0,SI
0005 (main.go:5) MOVL    $0,AX
0006 (main.go:5) JMP     ,8
0007 (main.go:5) INCL    ,AX
0008 (main.go:5) CMPL    AX,DI
0009 (main.go:5) JGE     $0,14
0010 (main.go:5) MOVL    (CX),BP
0011 (main.go:5) ADDQ    $4,CX
0012 (main.go:6) ADDL    BP,SI
0013 (main.go:5) JMP     ,7
0014 (main.go:8) MOVL    SI,.noname+16(FP)
0015 (main.go:8) RET     ,

The key difference is that
0011 (main.go:5) MOVQ    $4,BX
0012 (main.go:5) ADDQ    CX,BX
0013 (main.go:5) MOVQ    BX,CX
has changed to
0011 (main.go:5) ADDQ    $4,CX

R=rsc, dave, remyoudompheng
CC=golang-dev
http://codereview.appspot.com/6506089