]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agocrypto/aes: eliminate some bounds checking and manual truncation.
Rémy Oudompheng [Mon, 5 Dec 2011 18:30:25 +0000 (13:30 -0500)]
crypto/aes: eliminate some bounds checking and manual truncation.

By converting array indices to uint8, they are automatically
constrained in the array range, and the binary AND with 0xff
is no longer needed anymore.

Before:  aes.BenchmarkEncrypt    363 ns/op
After:   aes.BenchmarkEncrypt    273 ns/op

R=golang-dev, gri, agl
CC=golang-dev, remy
https://golang.org/cl/5450084

13 years agoruntime: prep for type-specific algorithms
Russ Cox [Mon, 5 Dec 2011 14:40:22 +0000 (09:40 -0500)]
runtime: prep for type-specific algorithms

Equality on structs will require arbitrary code for type equality,
so change algorithm in type data from uint8 to table pointer.
In the process, trim top-level map structure from
104/80 bytes (64-bit/32-bit) to 24/12.

Equality on structs will require being able to call code generated
by the Go compiler, and C code has no way to access Go return
values, so change the hash and equal algorithm functions to take
a pointer to a result instead of returning the result.

R=ken
CC=golang-dev
https://golang.org/cl/5453043

13 years agogobuilder: use new dashboard protocol
Andrew Gerrand [Mon, 5 Dec 2011 05:44:10 +0000 (16:44 +1100)]
gobuilder: use new dashboard protocol
gobuilder: -commit mode for packages
gobuilder: cripple -package mode temporarily

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5450092

13 years agomisc/dashboard: init handler for bootstrapping
Andrew Gerrand [Mon, 5 Dec 2011 05:22:14 +0000 (16:22 +1100)]
misc/dashboard: init handler for bootstrapping
misc/dashboard: support unauthenticated GETs
misc/dashboard: add ?nukeonly=1 option to /buildtest

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5450091

13 years agomisc/dashboard/app: revert gofix of app engine file
Andrew Gerrand [Mon, 5 Dec 2011 02:44:22 +0000 (13:44 +1100)]
misc/dashboard/app: revert gofix of app engine file

R=dsymonds
CC=golang-dev
https://golang.org/cl/5451092

13 years agonet/mail: correctly compare parsed times in the test.
David Symonds [Sun, 4 Dec 2011 23:05:29 +0000 (10:05 +1100)]
net/mail: correctly compare parsed times in the test.

Fixes #2522.

R=golang-dev, bradfitz, alex.brainman
CC=golang-dev
https://golang.org/cl/5449084

13 years agogc: fix build (not sure how this edit got lost)
Russ Cox [Fri, 2 Dec 2011 20:05:45 +0000 (15:05 -0500)]
gc: fix build (not sure how this edit got lost)

R=ken2, ken
CC=golang-dev
https://golang.org/cl/5449072

13 years agogc: fix line number for redundant print
Russ Cox [Fri, 2 Dec 2011 19:58:26 +0000 (14:58 -0500)]
gc: fix line number for redundant print

R=ken2
CC=golang-dev
https://golang.org/cl/5434111

13 years agogc: use gofmt spacing when printing map type
Russ Cox [Fri, 2 Dec 2011 19:45:07 +0000 (14:45 -0500)]
gc: use gofmt spacing when printing map type

R=ken2
CC=golang-dev
https://golang.org/cl/5450071

13 years agogofmt -s misc src
Russ Cox [Fri, 2 Dec 2011 19:14:25 +0000 (14:14 -0500)]
gofmt -s misc src

R=golang-dev, bradfitz, gri
CC=golang-dev
https://golang.org/cl/5451079

13 years agogofmt: handle &T in composite literal simplify
Russ Cox [Fri, 2 Dec 2011 19:14:04 +0000 (14:14 -0500)]
gofmt: handle &T in composite literal simplify

R=gri
CC=golang-dev
https://golang.org/cl/5448086

13 years agogc: composite literals as per Go 1
Russ Cox [Fri, 2 Dec 2011 19:13:12 +0000 (14:13 -0500)]
gc: composite literals as per Go 1

R=ken2
CC=golang-dev
https://golang.org/cl/5450067

13 years agospec: additional composite literal shortenings per Go 1 plan
Russ Cox [Fri, 2 Dec 2011 19:12:53 +0000 (14:12 -0500)]
spec: additional composite literal shortenings per Go 1 plan

R=golang-dev, gri, r, r
CC=golang-dev
https://golang.org/cl/5449067

13 years agogoinstall: fix typo in comment
Robert Griesemer [Fri, 2 Dec 2011 18:30:35 +0000 (10:30 -0800)]
goinstall: fix typo in comment

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5449068

13 years agospec: pointer to array can be sliced
Russ Cox [Fri, 2 Dec 2011 18:11:30 +0000 (13:11 -0500)]
spec: pointer to array can be sliced

This has always been true, but we lost it from the spec
somewhere along the way, probably when we disallowed
the general 'pointer to anything sliceable' slice case.

R=gri
CC=golang-dev
https://golang.org/cl/5437121

13 years agogc: do not allow slice of array literal
Russ Cox [Fri, 2 Dec 2011 17:30:56 +0000 (12:30 -0500)]
gc: do not allow slice of array literal

R=ken2
CC=golang-dev
https://golang.org/cl/5440083

13 years agodoc: do not slice array literal
Russ Cox [Fri, 2 Dec 2011 17:30:37 +0000 (12:30 -0500)]
doc: do not slice array literal

The special case in the spec is that you can take the
address of a composite literal using the & operator.

A composite literal is not, however, generally addressable,
and the slice operator requires an addressable argument,
so [3]int{1,2,3}[:] is invalid.  This tutorial code and one bug
report are the only places in the tree where it appears.

R=r, gri
CC=golang-dev
https://golang.org/cl/5437120

13 years agospec: avoid slice of array literal
Russ Cox [Fri, 2 Dec 2011 17:30:20 +0000 (12:30 -0500)]
spec: avoid slice of array literal

R=gri
CC=golang-dev
https://golang.org/cl/5451078

13 years agoexp/ssh: allow for msgUserAuthBanner during authentication
Gustav Paul [Fri, 2 Dec 2011 15:34:42 +0000 (10:34 -0500)]
exp/ssh: allow for msgUserAuthBanner during authentication

The SSH spec allows for the server to send a banner message to the client at any point during the authentication process. Currently the ssh client auth types all assume that the first response from the server after issuing a userAuthRequestMsg will be one of a couple of possible authentication success/failure messages. This means that client authentication breaks if the ssh server being connected to has a banner message configured.

This changeset refactors the noneAuth, passwordAuth and publickeyAuth types' auth() function and allows for msgUserAuthBanner during authentication.

R=golang-dev, rsc, dave, agl
CC=golang-dev
https://golang.org/cl/5432065

13 years agoasn1: fix incorrect prints found by govet
Robert Hencke [Fri, 2 Dec 2011 15:13:02 +0000 (10:13 -0500)]
asn1: fix incorrect prints found by govet

R=golang-dev
CC=golang-dev
https://golang.org/cl/5449063

13 years agonet, syscall: remove BindToDevice API from UDPConn, IPConn
Mikio Hara [Fri, 2 Dec 2011 14:18:16 +0000 (23:18 +0900)]
net, syscall: remove BindToDevice API from UDPConn, IPConn

For now a pair of socket options SOL_SOCKET and SO_BINDTODEVICE
is supported on Linux only. I'd like to demote BindToDevice API
to syscall level because it's Linux dependent one.

In the near future, probably we may have a bit more portable
API that using IPROTO_IP/IPV6 level socket options to specify,
identify an inbound, outbound IP interface on incoming, outgoing
UDP and raw IP packets.

R=cw, golang-dev
CC=golang-dev
https://golang.org/cl/5447071

13 years agoencoding/gob: don't send type info for unexported fields
Rob Pike [Fri, 2 Dec 2011 08:02:24 +0000 (00:02 -0800)]
encoding/gob: don't send type info for unexported fields
Fixes #2517.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5440079

13 years agobuild: update .hgignore
Andrew Gerrand [Fri, 2 Dec 2011 05:24:12 +0000 (16:24 +1100)]
build: update .hgignore

R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5451073

13 years agodashboard: make response format consistent, implement commit GET mode
Andrew Gerrand [Fri, 2 Dec 2011 05:05:12 +0000 (16:05 +1100)]
dashboard: make response format consistent, implement commit GET mode

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5437113

13 years agoos/exec: make LookPath always search the current directory under Windows.
Benny Siegert [Fri, 2 Dec 2011 03:29:24 +0000 (14:29 +1100)]
os/exec: make LookPath always search the current directory under Windows.

cmd.exe implicitly looks in "." before consulting PATH.
LookPath should match this behavior.

R=alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/5434093

13 years agodoc: correct weekly snapshot notes on hash.Hash change
Andrew Gerrand [Fri, 2 Dec 2011 02:36:21 +0000 (13:36 +1100)]
doc: correct weekly snapshot notes on hash.Hash change

I had the wrong idea when I wrote this.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5437111

13 years agotemplate: move the empty check into parse, which needs it when constructing
Rob Pike [Fri, 2 Dec 2011 01:24:54 +0000 (17:24 -0800)]
template: move the empty check into parse, which needs it when constructing
tree sets.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5449062

13 years agohtml: allow whitespace between head and body
Andrew Balholm [Fri, 2 Dec 2011 00:46:24 +0000 (11:46 +1100)]
html: allow whitespace between head and body

Also ignore <head> tag after </head>.

Pass tests6.dat, test 0:
<!doctype html></head> <head>

| <!DOCTYPE html>
| <html>
|   <head>
|   " "
|   <body>

Also pass tests through test 6:
<body>
<div>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5447064

13 years agogo/doc: exclude lines ending in ':' from possible headings
Robert Griesemer [Thu, 1 Dec 2011 23:14:15 +0000 (15:14 -0800)]
go/doc: exclude lines ending in ':' from possible headings

This is a more conservative approach to heading detection and
removes 11 headings from the current repository (several in
fmt). The current headscan output is:

/home/gri/go3/src/cmd/goinstall (package documentation)
        Remote Repositories
        The GOPATH Environment Variable
/home/gri/go3/src/pkg/exp/gotype (package documentation)
        Examples
/home/gri/go3/src/pkg/html/template (package template)
        Introduction
        Contexts
        Errors
        A fuller picture
        Contexts
        Typed Strings
        Security Model
/home/gri/go3/src/pkg/text/template (package template)
        Actions
        Arguments
        Pipelines
        Variables
        Examples
        Functions
        Associated templates
        Nested template definitions
18 headings found

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/5437105

13 years agogodoc: improved output of examples in html.
Volker Dobler [Thu, 1 Dec 2011 22:52:31 +0000 (09:52 +1100)]
godoc: improved output of examples in html.

Fixes #2467.
Fixes #2464.

R=golang-dev, rsc, adg
CC=golang-dev
https://golang.org/cl/5447051

13 years agogofmt: applied gofmt -w -s src misc
Robert Griesemer [Thu, 1 Dec 2011 22:33:24 +0000 (14:33 -0800)]
gofmt: applied gofmt -w -s src misc

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5451070

13 years agogo/doc: switch ToHTML from []byte to string argument
Robert Griesemer [Thu, 1 Dec 2011 21:46:57 +0000 (13:46 -0800)]
go/doc: switch ToHTML from []byte to string argument

- this removes extra conversions from strings to bytes and vice versa
  for each comment
- minor cleanups

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5434096

13 years agotag weekly.2011-12-02
Andrew Gerrand [Thu, 1 Dec 2011 21:12:17 +0000 (08:12 +1100)]
tag weekly.2011-12-02

R=rsc
CC=golang-dev
https://golang.org/cl/5450062

13 years agoweekly.2011-12-02 weekly.2011-12-02
Andrew Gerrand [Thu, 1 Dec 2011 21:09:49 +0000 (08:09 +1100)]
weekly.2011-12-02

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5447067

13 years agogo/doc: better headscan
Robert Griesemer [Thu, 1 Dec 2011 19:50:15 +0000 (11:50 -0800)]
go/doc: better headscan

- scan all comments not just the package documentation
- declutter output so that false positives are more easily spotted
- count the number of headings to quickly see differences
- minor tweaks

R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/5450061

13 years agotime: update doc string for Error method
Rob Pike [Thu, 1 Dec 2011 19:44:17 +0000 (11:44 -0800)]
time: update doc string for Error method
Fixes #2512.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5449057

13 years agoos: add ModeType constant to mask file type bits
Gustavo Niemeyer [Thu, 1 Dec 2011 19:35:43 +0000 (17:35 -0200)]
os: add ModeType constant to mask file type bits

This covers the lack of IsRegular comfortably:

    if stat.Mode()&os.ModeType == 0 { ... }

R=golang-dev, r, rsc, r, gustavo
CC=golang-dev
https://golang.org/cl/5440075

13 years agoos: be consistent with receiver names for godoc TOC alignment
Brad Fitzpatrick [Thu, 1 Dec 2011 19:23:39 +0000 (11:23 -0800)]
os: be consistent with receiver names for godoc TOC alignment

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5449056

13 years agoexp/ssh: export type signal. Renamed to Signal
Gustav Paul [Thu, 1 Dec 2011 19:06:15 +0000 (14:06 -0500)]
exp/ssh: export type signal. Renamed to Signal

R=dave, agl, rsc, golang-dev, n13m3y3r
CC=golang-dev
https://golang.org/cl/5450059

13 years agogofix: add time+fileinfo fix
Russ Cox [Thu, 1 Dec 2011 18:59:57 +0000 (13:59 -0500)]
gofix: add time+fileinfo fix

R=adg, rogpeppe, r, cw
CC=golang-dev
https://golang.org/cl/5450050

13 years agogo/doc: Detect headings in comments and format them as h3 in html.
Volker Dobler [Thu, 1 Dec 2011 17:49:58 +0000 (09:49 -0800)]
go/doc: Detect headings in comments and format them as h3 in html.

To structure larger sections of comments in html output headings
are detected in comments and formated as h3 in the generated html.
A simple heuristic is used to detect headings in comments:
A heading is a non-blank, non-indented line preceded by a blank
line. It is followed by a blank and a non-blank, non-indented line.
A heading must start with an uppercase letter and end with a letter,
digit or a colon.  A heading may not contain punctuation characters.

R=jan.mercl, gri, adg, rsc, r
CC=golang-dev
https://golang.org/cl/5437056

13 years agocrypto/tls: cleanup certificate load on windows
Alex Brainman [Thu, 1 Dec 2011 17:38:00 +0000 (12:38 -0500)]
crypto/tls: cleanup certificate load on windows

- correct syscall.CertEnumCertificatesInStore so it returns error
- remove "reflect" dependency

R=hectorchu, agl, rsc
CC=golang-dev, krautz
https://golang.org/cl/5441052

13 years agoAdd a []byte argument to hash.Hash to allow an allocation to be saved.
Adam Langley [Thu, 1 Dec 2011 17:35:37 +0000 (12:35 -0500)]
Add a []byte argument to hash.Hash to allow an allocation to be saved.

This is the result of running `gofix -r hashsum` over the tree, changing
the hash function implementations by hand and then fixing a couple of
instances where gofix didn't catch something.

The changed implementations are as simple as possible while still
working: I'm not trying to optimise in this CL.

R=rsc, cw, rogpeppe
CC=golang-dev
https://golang.org/cl/5448065

13 years agogofix: add a fix for hash.Sum.
Adam Langley [Thu, 1 Dec 2011 17:25:09 +0000 (12:25 -0500)]
gofix: add a fix for hash.Sum.

This fix adds an output argument to hash.Sum.

Tree changes in https://golang.org/cl/5448065

R=rsc
CC=golang-dev
https://golang.org/cl/5450051

13 years agotext/template: replace Add with AddParseTree
Rob Pike [Thu, 1 Dec 2011 17:19:53 +0000 (09:19 -0800)]
text/template: replace Add with AddParseTree
Makes it clear we're adding exactly one tree and creating a
new template for it.

R=rsc
CC=golang-dev
https://golang.org/cl/5448077

13 years agogc: avoid re-genning ninit in branches involving float comparison.
Luuk van Dijk [Thu, 1 Dec 2011 13:46:32 +0000 (14:46 +0100)]
gc: avoid re-genning ninit in branches involving float comparison.

R=rsc
CC=golang-dev
https://golang.org/cl/5451050

13 years agoexp/ssh: add Std{in,out,err}Pipe methods to Session
Dave Cheney [Thu, 1 Dec 2011 10:30:16 +0000 (08:30 -0200)]
exp/ssh: add Std{in,out,err}Pipe methods to Session

R=gustav.paul, cw, agl, rsc, n13m3y3r
CC=golang-dev
https://golang.org/cl/5433080

13 years agodashboard: don't choke on weird builder names.
David Symonds [Thu, 1 Dec 2011 05:37:30 +0000 (16:37 +1100)]
dashboard: don't choke on weird builder names.

R=adg
CC=golang-dev
https://golang.org/cl/5447060

13 years agotag weekly.2011-12-01
Andrew Gerrand [Thu, 1 Dec 2011 05:18:14 +0000 (16:18 +1100)]
tag weekly.2011-12-01

R=r
CC=golang-dev
https://golang.org/cl/5448068

13 years agoweekly.2011-12-01 weekly.2011-12-01
Andrew Gerrand [Thu, 1 Dec 2011 05:17:24 +0000 (16:17 +1100)]
weekly.2011-12-01

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5448067

13 years agotime: fix windows build
Alex Brainman [Thu, 1 Dec 2011 04:26:28 +0000 (15:26 +1100)]
time: fix windows build

R=rsc
CC=golang-dev
https://golang.org/cl/5440071

13 years agohtml/template: make execution thread-safe
Rob Pike [Thu, 1 Dec 2011 04:11:57 +0000 (20:11 -0800)]
html/template: make execution thread-safe
The problem is that execution can modify the template, so it needs
interlocking to have the same thread-safe guarantee as text/template.
Fixes #2439.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5450056

13 years agohtml: implement fragment parsing algorithm
Andrew Balholm [Thu, 1 Dec 2011 01:47:57 +0000 (12:47 +1100)]
html: implement fragment parsing algorithm

Pass the tests in tests4.dat.

R=nigeltao
CC=golang-dev
https://golang.org/cl/5447055

13 years agosyscall: fix openbsd sysctl hostname/domainname workaround
Joel Sing [Wed, 30 Nov 2011 23:17:33 +0000 (10:17 +1100)]
syscall: fix openbsd sysctl hostname/domainname workaround

Fixes #2509.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5451055

13 years agohtml/template: update to new template API
Rob Pike [Wed, 30 Nov 2011 22:42:18 +0000 (17:42 -0500)]
html/template: update to new template API

Not quite done yet but enough is here to review.

Embedding is eliminated so clients can't accidentally reach
methods of text/template.Template that would break the
invariants.

TODO later: Add and Clone are unimplemented.
TODO later: address issue 2349

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5434077

13 years agoundo CL 5436056 / 03560deae933
Dave Cheney [Wed, 30 Nov 2011 22:14:03 +0000 (17:14 -0500)]
undo CL 5436056 / 03560deae933

Remove the accidentally exported net.Listener

««« original CL description
exp/ssh: remove unused forwarding methods in Server Listener

R=agl, rsc
CC=golang-dev
https://golang.org/cl/5436056

»»»

R=agl, rsc
CC=golang-dev
https://golang.org/cl/5437090

13 years agold: align ELF data sections
Ian Lance Taylor [Wed, 30 Nov 2011 21:24:16 +0000 (13:24 -0800)]
ld: align ELF data sections

fixes #2506

R=rsc, iant
CC=golang-dev
https://golang.org/cl/5440066

13 years agotime: fix windows build
Russ Cox [Wed, 30 Nov 2011 20:45:24 +0000 (15:45 -0500)]
time: fix windows build

TBR=brainman
CC=golang-dev
https://golang.org/cl/5447057

13 years agomath: faster Sincos
Charles L. Dorian [Wed, 30 Nov 2011 20:11:44 +0000 (15:11 -0500)]
math: faster Sincos

Sincos via sincos.go is 35.4 ns/op, via sincos_amd64.s is 37.4 ns/op on 2.53 GHz Intel Core 2 Duo (Mac OS X).

R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5447045

13 years agoos: fix path/filepath test on Windows
Russ Cox [Wed, 30 Nov 2011 18:42:14 +0000 (13:42 -0500)]
os: fix path/filepath test on Windows

This is not the right fix, but it is what used to happen
before the FileInfo conversion, and it should get the
build working again (at least that part).

TBR=brainman
CC=golang-dev
https://golang.org/cl/5434090

13 years agoencoding/asn1: fix test on OpenBSD
Russ Cox [Wed, 30 Nov 2011 18:36:25 +0000 (13:36 -0500)]
encoding/asn1: fix test on OpenBSD

time.Parse uses time.Local if it has the right zone offset,
otherwise it calls time.FixedZone.  The test's use of reflect.DeepEqual
meant that the test expected time.FixedZone always, failing
when the local time zone really would have used -0700 for
that time.  The fix is to format the time to display only the
pieces we intend to test.

R=golang-dev, agl, iant
CC=golang-dev
https://golang.org/cl/5437088

13 years agoos: fix windows build
Russ Cox [Wed, 30 Nov 2011 17:38:54 +0000 (12:38 -0500)]
os: fix windows build

TBR=brainman
CC=golang-dev
https://golang.org/cl/5449048

13 years agomath/big: fix destination leak into result value
Roger Peppe [Wed, 30 Nov 2011 17:29:58 +0000 (09:29 -0800)]
math/big: fix destination leak into result value
This code would panic:
z := big.NewInt(1)
z.SetBit(big.NewInt(0), 2, 1)
if z.Cmp(big.NewInt(1<<2)) != 0 {
        panic("fail")
}

R=rsc, gri
CC=golang-dev
https://golang.org/cl/5437081

13 years agoos: new FileInfo, FileMode types + update tree
Russ Cox [Wed, 30 Nov 2011 17:04:16 +0000 (12:04 -0500)]
os: new FileInfo, FileMode types + update tree

R=golang-dev, r, r, gri, bradfitz, iant, iant, nigeltao, n13m3y3r
CC=golang-dev
https://golang.org/cl/5416060

13 years agouse new time API
Russ Cox [Wed, 30 Nov 2011 17:01:46 +0000 (12:01 -0500)]
use new time API

R=bradfitz, gri, r, dsymonds
CC=golang-dev
https://golang.org/cl/5390042

13 years agotime: new Time, Duration, ZoneInfo types
Russ Cox [Wed, 30 Nov 2011 16:59:44 +0000 (11:59 -0500)]
time: new Time, Duration, ZoneInfo types

R=r, bradfitz, gri, dsymonds, iant
CC=golang-dev
https://golang.org/cl/5392041

13 years agohtml: clean up the z.rawTag calculation in the tokenizer.
Nigel Tao [Wed, 30 Nov 2011 06:00:37 +0000 (17:00 +1100)]
html: clean up the z.rawTag calculation in the tokenizer.

R=andybalholm
CC=golang-dev
https://golang.org/cl/5440064

13 years agohtml: parse <xmp> tags
Andrew Balholm [Wed, 30 Nov 2011 04:37:41 +0000 (15:37 +1100)]
html: parse <xmp> tags

Pass tests5.dat, test 10:
<p><xmp></xmp>

| <html>
|   <head>
|   <body>
|     <p>
|     <xmp>

Also pass the remaining tests in tests5.dat.

R=nigeltao
CC=golang-dev
https://golang.org/cl/5440062

13 years agohtml: parse the contents of <iframe> elements as raw text
Andrew Balholm [Wed, 30 Nov 2011 00:44:54 +0000 (11:44 +1100)]
html: parse the contents of <iframe> elements as raw text

Pass tests5.dat, test 4:
<iframe> <!---> </iframe>x

| <html>
|   <head>
|   <body>
|     <iframe>
|       " <!---> "
|     "x"

Also pass tests through test 9:
<style> <!</-- </style>x

R=nigeltao
CC=golang-dev
https://golang.org/cl/5450044

13 years agospec: update spacing to match gofmt, where reasonable.
David Symonds [Tue, 29 Nov 2011 23:47:36 +0000 (15:47 -0800)]
spec: update spacing to match gofmt, where reasonable.

R=gri, rsc
CC=golang-dev
https://golang.org/cl/5327053

13 years agoexp/ssh: Add Start(cmd string) and Signal(sig string) to Session. Rename Exec to...
Gustav Paul [Tue, 29 Nov 2011 17:26:39 +0000 (12:26 -0500)]
exp/ssh: Add Start(cmd string) and Signal(sig string) to Session. Rename Exec to Run.

Exec() has been renamed to Run() in keeping with the os/exec API.

Added func (*Session) Start(cmd string) which starts a remote process but unlike Run() doesn't wait for it to finish before returning.

Run() has been refactored to use Start internally. Its really just a refactoring, no new code but some extra functionality was won.

Also added func (*Session) Signal(sig signal) which sends a UNIX signal to a remote process. This is espcially useful in conjunction with Start() as the two allow you to start a remote process, monitor its stdout/stderr, and send it a TERM/HUP/etc signal when you want it to close.

R=dave, rsc, agl, bradfitz, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/5437058

13 years agocrypto/tls: add openbsd root certificate location
Joel Sing [Tue, 29 Nov 2011 14:20:59 +0000 (09:20 -0500)]
crypto/tls: add openbsd root certificate location

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5437079

13 years agogc: move typedcl2 into export.c
Luuk van Dijk [Tue, 29 Nov 2011 12:34:08 +0000 (13:34 +0100)]
gc: move typedcl2 into export.c

R=rsc
CC=golang-dev
https://golang.org/cl/5447043

13 years agodashboard: more tests, bug fixes, and /packages handler
Andrew Gerrand [Tue, 29 Nov 2011 08:24:57 +0000 (19:24 +1100)]
dashboard: more tests, bug fixes, and /packages handler

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5441053

13 years agohtml: spin doctype.go out of parse.go.
Nigel Tao [Tue, 29 Nov 2011 07:20:59 +0000 (18:20 +1100)]
html: spin doctype.go out of parse.go.

R=andybalholm
CC=golang-dev
https://golang.org/cl/5445049

13 years agocgo: fix incorrect print found by govet
Robert Hencke [Tue, 29 Nov 2011 03:40:34 +0000 (14:40 +1100)]
cgo: fix incorrect print found by govet

R=golang-dev
CC=golang-dev
https://golang.org/cl/5445052

13 years agoruntime: make sure windows/amd64 stack is 16-byte aligned on syscall entry (fixes...
Alex Brainman [Tue, 29 Nov 2011 01:57:20 +0000 (12:57 +1100)]
runtime: make sure windows/amd64 stack is 16-byte aligned on syscall entry (fixes build)

R=golang-dev, vcc.163
CC=golang-dev
https://golang.org/cl/5445051

13 years agohtml: detect quirks mode
Andrew Balholm [Tue, 29 Nov 2011 00:18:49 +0000 (11:18 +1100)]
html: detect quirks mode

Pass tests3.dat, test 23:
<p><table></table>

| <html>
|   <head>
|   <body>
|     <p>
|       <table>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5446043

13 years agosyscall: implement Syscall15
Alex Brainman [Mon, 28 Nov 2011 23:24:19 +0000 (10:24 +1100)]
syscall: implement Syscall15

Fixes #2251.

R=golang-dev, rsc
CC=golang-dev, jp
https://golang.org/cl/5440050

13 years agogoinstall: add -fix flag to run gofix on packages on build failure
Andrew Gerrand [Mon, 28 Nov 2011 22:28:58 +0000 (09:28 +1100)]
goinstall: add -fix flag to run gofix on packages on build failure
goinstall: better error handling and reporting

R=r, r, rsc, mattn.jp
CC=golang-dev
https://golang.org/cl/5421051

13 years agogc: remove funarg special case in structfield
Russ Cox [Mon, 28 Nov 2011 21:40:39 +0000 (16:40 -0500)]
gc: remove funarg special case in structfield

This should make CL 5431046 a little simpler.

R=ken2
CC=golang-dev
https://golang.org/cl/5444048

13 years agomath: update special-conditions comments to use ± symbol
Charles L. Dorian [Mon, 28 Nov 2011 21:04:52 +0000 (13:04 -0800)]
math: update special-conditions comments to use ± symbol

R=rsc, golang-dev, r
CC=golang-dev
https://golang.org/cl/5445046

13 years agoexp/ssh: move openChan to NewSession
Dave Cheney [Mon, 28 Nov 2011 20:42:47 +0000 (15:42 -0500)]
exp/ssh: move openChan to NewSession

openChan was only being called by NewSession, Dial has
its own version.

R=gustav.paul, agl, rsc
CC=golang-dev
https://golang.org/cl/5435071

13 years agocrypto/tls: don't rely on map iteration order.
Adam Langley [Mon, 28 Nov 2011 20:34:16 +0000 (15:34 -0500)]
crypto/tls: don't rely on map iteration order.

Previously we were using the map iteration order to set the order of
the cipher suites in the ClientHello.

R=bradfitz
CC=golang-dev
https://golang.org/cl/5440048

13 years agotext/template: address a couple of issues for html/template
Rob Pike [Mon, 28 Nov 2011 18:42:57 +0000 (10:42 -0800)]
text/template: address a couple of issues for html/template
- allow Lookup to work on uninitialized templates
- fix bug in add: can't error after parser is stopped
- add Add method for html/template

R=adg, rogpeppe, r, rsc
CC=golang-dev
https://golang.org/cl/5436080

13 years agostrings: fix test output
Christopher Wedgwood [Mon, 28 Nov 2011 17:51:03 +0000 (09:51 -0800)]
strings: fix test output

R=rsc, gri
CC=golang-dev
https://golang.org/cl/5445044

13 years agobytes: fix test output
Christopher Wedgwood [Mon, 28 Nov 2011 17:50:51 +0000 (09:50 -0800)]
bytes: fix test output

R=rsc, gri
CC=golang-dev
https://golang.org/cl/5441048

13 years agodoc/tmptohtml: output fix
Christopher Wedgwood [Mon, 28 Nov 2011 17:50:40 +0000 (09:50 -0800)]
doc/tmptohtml: output fix

R=r, gri
CC=golang-dev
https://golang.org/cl/5441047

13 years agoexp/ssh: add safeString error sanitiser
Dave Cheney [Mon, 28 Nov 2011 17:29:19 +0000 (12:29 -0500)]
exp/ssh: add safeString error sanitiser

R=huin, agl, gustav.paul, cw
CC=golang-dev
https://golang.org/cl/5399044

13 years agogc: don't inherit orig from subnodes in constant expression nodes.
Rémy Oudompheng [Mon, 28 Nov 2011 17:22:15 +0000 (12:22 -0500)]
gc: don't inherit orig from subnodes in constant expression nodes.

The wrong value made Nconv() show "1" for node "-1", and "2" from
node "2+3".
Fixes #2452.

R=gri, lvd, rsc
CC=golang-dev, remy
https://golang.org/cl/5435064

13 years agoexp/ssh: fix three shift bugs related to packet lengths
Dave Cheney [Mon, 28 Nov 2011 17:10:16 +0000 (12:10 -0500)]
exp/ssh: fix three shift bugs related to packet lengths

Thanks for Ke Lan for the initial report and investigation.

R=agl, gustav.paul, tg8866, rsc
CC=golang-dev
https://golang.org/cl/5443044

13 years agogc: fix copying of types
Maxim Pimenov [Mon, 28 Nov 2011 16:52:16 +0000 (11:52 -0500)]
gc: fix copying of types
reset xmethod during copytype

Fixes #2497

R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/5441045

13 years agohttp: fix sniffing bug causing short writes
Brad Fitzpatrick [Mon, 28 Nov 2011 16:51:34 +0000 (11:51 -0500)]
http: fix sniffing bug causing short writes

R=rsc
CC=golang-dev
https://golang.org/cl/5442045

13 years agoCONTRIBUTORS: add Maxim Pimenov (Google CLA)
Russ Cox [Mon, 28 Nov 2011 16:47:23 +0000 (11:47 -0500)]
CONTRIBUTORS: add Maxim Pimenov (Google CLA)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5443047

13 years agosql: add Tx.Stmt to use an existing prepared stmt in a transaction
Brad Fitzpatrick [Mon, 28 Nov 2011 16:00:32 +0000 (11:00 -0500)]
sql: add Tx.Stmt to use an existing prepared stmt in a transaction

R=rsc
CC=golang-dev
https://golang.org/cl/5433059

13 years agoexp/ssh: fix misleading spelling mistake in comment
Gustav Paul [Mon, 28 Nov 2011 15:45:52 +0000 (10:45 -0500)]
exp/ssh: fix misleading spelling mistake in comment

R=dave, agl, rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5431089

13 years agofilepath/path: fix Rel buffer sizing
Gustavo Niemeyer [Mon, 28 Nov 2011 02:28:52 +0000 (21:28 -0500)]
filepath/path: fix Rel buffer sizing

Fixes #2493.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5433079

13 years agomath: fix typo in Log1p comments
Charles L. Dorian [Mon, 28 Nov 2011 02:01:08 +0000 (18:01 -0800)]
math: fix typo in Log1p comments

Also note the special case of -0.0.

R=rsc, golang-dev, gri
CC=golang-dev
https://golang.org/cl/5435084

13 years agohtml: parse <nobr> elements
Andrew Balholm [Sun, 27 Nov 2011 23:55:31 +0000 (10:55 +1100)]
html: parse <nobr> elements

Pass tests3.dat, test 20:
<!doctype html><nobr><nobr><nobr>

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <nobr>
|     <nobr>
|     <nobr>

Also pass tests through test 22:
<!doctype html><html><body><p><table></table></body></html>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5438056

13 years agomath/big: use recursive subdivision for significant speedup
Michael T. Jones [Sun, 27 Nov 2011 19:10:59 +0000 (11:10 -0800)]
math/big: use recursive subdivision for significant speedup

This change adds the second aspect to the conversion code, the
use of large divisiors (powers of big base) to greatly speed up
the divsion of large numbers. Speedups of 30x are common in the
large cases. Also includes new tests and tuning code for the
key internal parameters.

R=gri
CC=golang-dev
https://golang.org/cl/5438058