]> Cypherpunks.ru repositories - gostls13.git/log
gostls13.git
13 years agorelease.2010-06-21 weekly.2010-06-21
Andrew Gerrand [Mon, 21 Jun 2010 22:16:38 +0000 (23:16 +0100)]
release.2010-06-21

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

13 years agosyslog: use local network for tests
Russ Cox [Mon, 21 Jun 2010 20:48:49 +0000 (13:48 -0700)]
syslog: use local network for tests

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

13 years agoreflect: add Type.Bits method, add tags to prohibit conversions
Russ Cox [Mon, 21 Jun 2010 20:19:29 +0000 (13:19 -0700)]
reflect: add Type.Bits method, add tags to prohibit conversions
gob: substitute slice for map

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

13 years agogc: include struct field tags in type equality
Russ Cox [Mon, 21 Jun 2010 20:06:39 +0000 (13:06 -0700)]
gc: include struct field tags in type equality

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

13 years agopkg/Makefile: allow DISABLE_NET_TESTS=1 to disable network tests
Russ Cox [Mon, 21 Jun 2010 20:05:38 +0000 (13:05 -0700)]
pkg/Makefile: allow DISABLE_NET_TESTS=1 to disable network tests

netchan, rpc, websocket: run test servers on 127.0.0.1,
to avoid conflict with OS X firewall.

TBR=r
CC=golang-dev
https://golang.org/cl/1689046

13 years agospec: struct tags must be identical for types to be identical
Russ Cox [Mon, 21 Jun 2010 19:42:33 +0000 (12:42 -0700)]
spec: struct tags must be identical for types to be identical

We didn't mention this explicitly during our discussions,
but I think it fits the "identical types are spelled identically"
rule that we used.

R=gri, iant, ken2, r, rsc1
CC=golang-dev
https://golang.org/cl/1698043

13 years agogoinstall: process dependencies for package main
Roger Peppe [Mon, 21 Jun 2010 18:01:20 +0000 (11:01 -0700)]
goinstall: process dependencies for package main

Currently to install a command, you have to manually
goinstall each of the remote packages that it depends on.
This patch lets goinstall P work where P is
contains files in package main.
It does not actually build the package, but
it installs all of its dependencies and prints a message
to that effect.

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

13 years agomisc/vim: clarifies syntax highlighting installation instructions
James Whitehead [Mon, 21 Jun 2010 05:35:24 +0000 (07:35 +0200)]
misc/vim: clarifies syntax highlighting installation instructions

Based on the review of CL 1723044, I've changed the installation instructions
for the vim syntax files to suggest symlinking the files rather than copying
the files. Also the wording has changed to be more consistent.

R=golang-dev, Kyle Lemons, adg
CC=golang-dev
https://golang.org/cl/1702045

13 years agoundo changes accidentally included in 09c5add99d50
Russ Cox [Sun, 20 Jun 2010 19:45:39 +0000 (12:45 -0700)]
undo changes accidentally included in 09c5add99d50

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

13 years agoreflect: add Kind, remove Int8Type, Int8Value, etc.
Russ Cox [Sun, 20 Jun 2010 19:16:25 +0000 (12:16 -0700)]
reflect: add Kind, remove Int8Type, Int8Value, etc.

update other code to match.

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

13 years agogc: delete debug print
Russ Cox [Sun, 20 Jun 2010 19:15:10 +0000 (12:15 -0700)]
gc: delete debug print

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

13 years agoerrchk: fix build - allow matches in multiline error messages
Russ Cox [Sun, 20 Jun 2010 19:05:43 +0000 (12:05 -0700)]
errchk: fix build - allow matches in multiline error messages

TBR=r
CC=golang-dev
https://golang.org/cl/1734042

13 years agogc: better error messages for interface failures, conversions
Russ Cox [Sun, 20 Jun 2010 18:45:53 +0000 (11:45 -0700)]
gc: better error messages for interface failures, conversions

x.go:13: cannot use t (type T) as type Reader in assignment:
T does not implement Reader (Read method requires pointer receiver)
x.go:19: cannot use q (type Q) as type Reader in assignment:
Q does not implement Reader (missing Read method)
have read()
want Read()
x.go:22: cannot use z (type int) as type Reader in assignment:
int does not implement Reader (missing Read method)

x.go:24: too many arguments to conversion to complex: complex(1, 3)

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

13 years agogc: fix build - subnode not addable in complexgen
Russ Cox [Sun, 20 Jun 2010 18:21:43 +0000 (11:21 -0700)]
gc: fix build - subnode not addable in complexgen

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

13 years agomisc/vim: reorganize plugin so it uses ftplugin and syntax
James Whitehead [Sun, 20 Jun 2010 09:46:12 +0000 (11:46 +0200)]
misc/vim: reorganize plugin so it uses ftplugin and syntax

This sets up vim to work out of the box with go programs as long as syntax
highlighting is enabled. Both files must be copied to the vim runtime
directory in order for the file-type detection and syntax loading to work.

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

13 years agonacl: fix build
Russ Cox [Sat, 19 Jun 2010 05:45:42 +0000 (22:45 -0700)]
nacl: fix build

TBR=r
CC=golang-dev
https://golang.org/cl/1706044

13 years agostrconv: add AtofN, FtoaN
Russ Cox [Sat, 19 Jun 2010 05:43:37 +0000 (22:43 -0700)]
strconv: add AtofN, FtoaN

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

13 years agotest: add missing import for zerodivide
Christopher Wedgwood [Sat, 19 Jun 2010 05:42:48 +0000 (22:42 -0700)]
test: add missing import for zerodivide

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

13 years agofmt.Scanf: improve error message when input does not match format
Rob Pike [Sat, 19 Jun 2010 03:37:03 +0000 (20:37 -0700)]
fmt.Scanf: improve error message when input does not match format

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

13 years agoEffective Go: minor change to correct a comment in an example
Rob Pike [Sat, 19 Jun 2010 03:33:03 +0000 (20:33 -0700)]
Effective Go: minor change to correct a comment in an example

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

13 years agocomplex divide: match C99 implementation
Russ Cox [Fri, 18 Jun 2010 22:46:00 +0000 (15:46 -0700)]
complex divide: match C99 implementation

R=iant, ken2, r, r2, ken3
CC=golang-dev
https://golang.org/cl/1686044

13 years agoEffective Go: panic and recover
Rob Pike [Fri, 18 Jun 2010 17:52:37 +0000 (10:52 -0700)]
Effective Go: panic and recover

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

13 years agoEffective Go: add a section on defer.
Rob Pike [Wed, 16 Jun 2010 20:47:36 +0000 (13:47 -0700)]
Effective Go: add a section on defer.

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

13 years agohttp: reply to Expect 100-continue requests automatically
Brad Fitzpatrick [Wed, 16 Jun 2010 17:15:39 +0000 (10:15 -0700)]
http: reply to Expect 100-continue requests automatically

This CL replaces my earlier https://golang.org/cl/1640044/show
in which Continue handling was explicit.  Instead, this CL makes
it automatic.  Reading from Body() is an implicit acknowledgement
that the request headers were fine and the body is wanted.  In that
case, the 100 Continue response is written automatically when the
request continues the "Expect: 100-continue" header.

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

13 years agocmd/gotest: Delete temporary _testmain.go files.
Nigel Tao [Wed, 16 Jun 2010 03:37:07 +0000 (13:37 +1000)]
cmd/gotest: Delete temporary _testmain.go files.

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

13 years agoimage: add an Alpha16 type, for completeness.
Nigel Tao [Wed, 16 Jun 2010 02:36:07 +0000 (12:36 +1000)]
image: add an Alpha16 type, for completeness.

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

13 years agofmt.Scan: fix %c in the case where the input does not implement ReadRune itself.
Rob Pike [Wed, 16 Jun 2010 00:41:11 +0000 (17:41 -0700)]
fmt.Scan: fix %c in the case where the input does not implement ReadRune itself.
While we're at it, clean up and test the code to guarantee we see every byte when
the text is erroneous UTF-8.

Fixes #866.

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

13 years agobytes.Buffer.ReadFrom: fix bug.
Rob Pike [Wed, 16 Jun 2010 00:40:47 +0000 (17:40 -0700)]
bytes.Buffer.ReadFrom: fix bug.
Fixes #852.

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

13 years agoEffective Go: update ... discussion.
Rob Pike [Tue, 15 Jun 2010 05:40:35 +0000 (22:40 -0700)]
Effective Go: update ... discussion.

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

13 years agoruntime: correct fault for 16-bit divide on Leopard
Russ Cox [Tue, 15 Jun 2010 01:07:17 +0000 (18:07 -0700)]
runtime: correct fault for 16-bit divide on Leopard

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

13 years agofmt.Printf: write tests for %T.
Rob Pike [Tue, 15 Jun 2010 00:42:31 +0000 (17:42 -0700)]
fmt.Printf: write tests for %T.
Fix a bug that caused it to ignore field widths.

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

13 years agofmt.Print*: reimplement to switch on type first.
Rob Pike [Tue, 15 Jun 2010 00:16:35 +0000 (17:16 -0700)]
fmt.Print*: reimplement to switch on type first.
This shortens, simplifies and regularizes the code significantly.
(Improvements to reflect could make another step.)
Passes all.bash.

One semantic change occurs: The String() method changes
behavior. It used to run only for string formats such as %s and %q.
Instead, it now runs whenever the item has the method and the
result is then processed by the format as a string. Besides the
regularization, this has three effects:

1) width is honored for String() items
2) %x works for String() items
3) implementations of String that merely recur will recur forever

Regarding point 3, example from the updated documentation:
type X int
func (x X) String() string { return Sprintf("%d", x) }
should cast the value before recurring:
func (x X) String() string { return Sprintf("%d", int(x)) }

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

13 years agohtml: sync testdata/webkit to match WebKit tip.
Nigel Tao [Mon, 14 Jun 2010 23:07:47 +0000 (09:07 +1000)]
html: sync testdata/webkit to match WebKit tip.

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

13 years agoAdd test for division by zero.
Rob Pike [Mon, 14 Jun 2010 22:00:19 +0000 (15:00 -0700)]
Add test for division by zero.
It fails with 6g. Once 6g is fixed up I will extend the value tests.

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

13 years agoAdd IndexFunc and LastIndexFunc.
Roger Peppe [Mon, 14 Jun 2010 21:54:48 +0000 (14:54 -0700)]
Add IndexFunc and LastIndexFunc.
Change TrimRight and TrimLeft to use these functions.
Incidentally fix minor bug in TrimRight.
Add some test cases for this.
YMMV whether it's worth saving the closure allocation.

R=r, r2
CC=golang-dev, hoisie, rsc
https://golang.org/cl/1198044

13 years agotutorial: update discussion of variadic functions
Rob Pike [Mon, 14 Jun 2010 19:27:22 +0000 (12:27 -0700)]
tutorial: update discussion of variadic functions

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

13 years agogc: no more ...
Russ Cox [Mon, 14 Jun 2010 18:24:51 +0000 (11:24 -0700)]
gc: no more ...
various cleanup, deleting unused code

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

13 years agoremove uses of ... from tree, add one test
Russ Cox [Mon, 14 Jun 2010 18:23:11 +0000 (11:23 -0700)]
remove uses of ... from tree, add one test

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

13 years agoexp/draw: small draw.drawGlyphOver optimization.
Nigel Tao [Mon, 14 Jun 2010 06:49:43 +0000 (16:49 +1000)]
exp/draw: small draw.drawGlyphOver optimization.
Make dpix variable names consistent.

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

13 years agospec: remove ... (keeping ...T)
Russ Cox [Sat, 12 Jun 2010 18:37:13 +0000 (11:37 -0700)]
spec: remove ... (keeping ...T)

R=gri, iant, ken2, r, r2
CC=golang-dev
https://golang.org/cl/1632041

13 years agogc: less aggressive name binding, for better line numbers in errors
Russ Cox [Sat, 12 Jun 2010 18:17:24 +0000 (11:17 -0700)]
gc: less aggressive name binding, for better line numbers in errors

Cleans up a few other corner cases too.

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

13 years agoruntime: fix 386 signal handler bug
Russ Cox [Sat, 12 Jun 2010 17:48:04 +0000 (10:48 -0700)]
runtime: fix 386 signal handler bug

Cannot assume that g == m->curg at time of signal.
Must save actual g and restore.

Fixes flaky crashes with messages like

throw: malloc mlookup
throw: malloc/free - deadlock
throw: unwindstack on self
throw: free mlookup

(and probably others) when running cgo.

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

13 years agogopack: add S flag to force marking a package as safe
Russ Cox [Sat, 12 Jun 2010 17:47:42 +0000 (10:47 -0700)]
gopack: add S flag to force marking a package as safe

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

13 years agospec: clarify that result parameters are always zeroed before the function executes.
Rob Pike [Sat, 12 Jun 2010 04:30:03 +0000 (21:30 -0700)]
spec: clarify that result parameters are always zeroed before the function executes.

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

13 years ago8l: correct test for sp == top of stack in 8l -K code
Russ Cox [Fri, 11 Jun 2010 23:17:47 +0000 (16:17 -0700)]
8l: correct test for sp == top of stack in 8l -K code

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

13 years agogopack: simplify go metadata code
Russ Cox [Fri, 11 Jun 2010 22:29:19 +0000 (15:29 -0700)]
gopack: simplify go metadata code

There's only one Go object file per package now,
so there's no need to parse the metadata and merge
metadata from multiple files.  Just save the original
and use it as __.PKGDEF verbatim.

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

13 years agogc: change -u to require imports to be marked safe
Russ Cox [Fri, 11 Jun 2010 22:28:43 +0000 (15:28 -0700)]
gc: change -u to require imports to be marked safe

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

13 years agoPad Go symbol table out to page boundary when linking dynamically.
Ian Lance Taylor [Fri, 11 Jun 2010 20:41:49 +0000 (13:41 -0700)]
Pad Go symbol table out to page boundary when linking dynamically.

This avoids a crash when using cgo where glibc's malloc thinks
that it can use some of the memory following the symbol table.
This fails because the symbol table is mapped read-only, which
affects the whole page.

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

13 years agoruntime: switch to OS stack during Windows syscall
Alex Brainman [Fri, 11 Jun 2010 08:38:12 +0000 (01:38 -0700)]
runtime: switch to OS stack during Windows syscall

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

13 years agoruntime: free lock handles on Windows
Alex Brainman [Fri, 11 Jun 2010 07:53:54 +0000 (00:53 -0700)]
runtime: free lock handles on Windows

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

13 years agotest: check that surrogate pair runes and huge rune values are rejected
Russ Cox [Thu, 10 Jun 2010 20:30:39 +0000 (13:30 -0700)]
test: check that surrogate pair runes and huge rune values are rejected

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

13 years ago.hgignore: ignore doc/htmlgen
Paolo Giarrusso [Thu, 10 Jun 2010 04:39:40 +0000 (21:39 -0700)]
.hgignore: ignore doc/htmlgen

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

13 years agocodereview: avoid exception in match
Paolo Giarrusso [Thu, 10 Jun 2010 04:37:11 +0000 (21:37 -0700)]
codereview: avoid exception in match

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

13 years agoA+C: James Whitehead and Paolo Giarrusso (both individual CLA)
Russ Cox [Thu, 10 Jun 2010 04:25:13 +0000 (21:25 -0700)]
A+C: James Whitehead and Paolo Giarrusso (both individual CLA)

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

13 years agoadd path.Base, analogous to Unix basename
Rob Pike [Thu, 10 Jun 2010 02:59:22 +0000 (19:59 -0700)]
add path.Base, analogous to Unix basename

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

13 years agoasn1: allow '*' in PrintableString.
Adam Langley [Thu, 10 Jun 2010 00:52:41 +0000 (20:52 -0400)]
asn1: allow '*' in PrintableString.

Although technically incorrect, we want this in order to parse X.509
certificates where a wildcard hostname ("*.example.com") has been put
into a PrintableString.

Fixes #850.

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

13 years agobug286: test case
Robert Griesemer [Wed, 9 Jun 2010 23:05:00 +0000 (16:05 -0700)]
bug286: test case

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

13 years agoexp/eval test: fix build
Robert Griesemer [Wed, 9 Jun 2010 22:52:42 +0000 (15:52 -0700)]
exp/eval test: fix build

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

13 years agogo/scanner: report illegal escape sequences
Robert Griesemer [Wed, 9 Jun 2010 22:19:22 +0000 (15:19 -0700)]
go/scanner: report illegal escape sequences

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

13 years agorelease.2010-06-09 tag
Andrew Gerrand [Wed, 9 Jun 2010 21:13:01 +0000 (23:13 +0200)]
release.2010-06-09 tag

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

13 years agorelease.2010-06-09 weekly.2010-06-09
Andrew Gerrand [Wed, 9 Jun 2010 21:10:28 +0000 (23:10 +0200)]
release.2010-06-09

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

13 years agogc: more cleanup
Russ Cox [Wed, 9 Jun 2010 18:00:55 +0000 (11:00 -0700)]
gc: more cleanup
 * disallow surrogate pair runes.
 * diagnose impossible type assertions
 * eliminate another static buffer.
 * do not overflow lexbuf.
 * add -u flag to disable package unsafe.

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

13 years agofix build: invalid character literals
Russ Cox [Wed, 9 Jun 2010 05:32:04 +0000 (22:32 -0700)]
fix build: invalid character literals

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

13 years agogc: new typechecking rules
Russ Cox [Wed, 9 Jun 2010 01:50:02 +0000 (18:50 -0700)]
gc: new typechecking rules

* Code for assignment, conversions now mirrors spec.
* Changed some snprint -> smprint.
* Renamed runtime functions to separate
  interface conversions from type assertions:
  convT2I, assertI2T, etc.
* Correct checking of \U sequences.

Fixes #840.
Fixes #830.
Fixes #778.

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

13 years agomisc cleanup: gofmt + &x -> x[0:] conversion
Russ Cox [Wed, 9 Jun 2010 00:51:57 +0000 (17:51 -0700)]
misc cleanup: gofmt + &x -> x[0:] conversion

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

13 years agogo/printer: deleted dead code
Robert Griesemer [Wed, 9 Jun 2010 00:46:04 +0000 (17:46 -0700)]
go/printer: deleted dead code

(remains of the semicolon conversion)

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

13 years agogofmt: update test script so it can run to completion again
Robert Griesemer [Wed, 9 Jun 2010 00:25:04 +0000 (17:25 -0700)]
gofmt: update test script so it can run to completion again

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

13 years agogo/parser: correct position of empty statement ';'
Robert Griesemer [Wed, 9 Jun 2010 00:06:26 +0000 (17:06 -0700)]
go/parser: correct position of empty statement ';'
(caused certain files to not be idempotent under gofmt)

- corrected golden files for go/printer
- slightly simplified some code in nodes.go (no impact on formatting)
- these changes have no impact on gofmt output of .go files under src, misc

fallthrough statement considered harmful!

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

13 years agofix build
Russ Cox [Tue, 8 Jun 2010 23:14:19 +0000 (16:14 -0700)]
fix build

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

13 years agodoc: add Google I/O talk and programs
Russ Cox [Tue, 8 Jun 2010 23:00:04 +0000 (16:00 -0700)]
doc: add Google I/O talk and programs

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

13 years agobug284: make conversion legal, fix error patterns
Russ Cox [Tue, 8 Jun 2010 22:51:31 +0000 (15:51 -0700)]
bug284: make conversion legal, fix error patterns

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

13 years agobug285: delete invalid map assignment
Russ Cox [Tue, 8 Jun 2010 22:50:53 +0000 (15:50 -0700)]
bug285: delete invalid map assignment

*T2 implements I2, but T2 does not.

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

13 years agogc: better error message when ~ operator is found
Robert Griesemer [Tue, 8 Jun 2010 01:27:26 +0000 (18:27 -0700)]
gc: better error message when ~ operator is found

Fixes #844.

R=ken2, rsc, ken3
CC=golang-dev
https://golang.org/cl/1593041

13 years agogc: backslash newline is not a legal escape sequence in strings
Robert Griesemer [Tue, 8 Jun 2010 01:10:48 +0000 (18:10 -0700)]
gc: backslash newline is not a legal escape sequence in strings

Fixes #827.

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

13 years agogo spec: rename "assignment compatible" -> "assignable"
Robert Griesemer [Tue, 8 Jun 2010 00:40:21 +0000 (17:40 -0700)]
go spec: rename "assignment compatible" -> "assignable"

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

13 years agohttp: add Head function for making HTTP HEAD requests
Andrew Gerrand [Mon, 7 Jun 2010 23:28:40 +0000 (01:28 +0200)]
http: add Head function for making HTTP HEAD requests

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

13 years agogo spec: clean-up and consolidation of spec with implementation
Robert Griesemer [Mon, 7 Jun 2010 22:49:39 +0000 (15:49 -0700)]
go spec: clean-up and consolidation of spec with implementation

Specifically:
- introduced notion of "underlying type"
- removed notion of type compatibility
- consolidated rules about assignment compatibility in
  assignment compatibility section
- be consistent with specyfing that nil is the value
  for uninitialized variables that can be nil (this
  was not specified clearly for pointers, functions, interfaces)
- added/fixed various related links throughout
- clarify language on conversions

R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/1536041

13 years agoruntime: finish pchw -> tiny, added gettime for tiny
Daniel Theophanes [Mon, 7 Jun 2010 21:18:42 +0000 (14:18 -0700)]
runtime: finish pchw -> tiny, added gettime for tiny

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

13 years agoA+C: add Daniel Theophanes (individual CLA)
Russ Cox [Mon, 7 Jun 2010 19:42:02 +0000 (12:42 -0700)]
A+C: add Daniel Theophanes (individual CLA)

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

13 years agohttp: fix erroneous comment
Andrew Gerrand [Sun, 6 Jun 2010 15:18:09 +0000 (17:18 +0200)]
http: fix erroneous comment

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

13 years agotutorial: fix one-word mistake in echo example
Rob Pike [Sat, 5 Jun 2010 19:06:18 +0000 (12:06 -0700)]
tutorial: fix one-word mistake in echo example

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

14 years agoHTML5 parser test data from WebKit.
Nigel Tao [Sat, 5 Jun 2010 00:47:22 +0000 (17:47 -0700)]
HTML5 parser test data from WebKit.

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

14 years agoFixes #836.
Nigel Tao [Sat, 5 Jun 2010 00:30:39 +0000 (17:30 -0700)]
Fixes #836.

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

14 years agodraw.Draw fast paths for the Over operator.
Nigel Tao [Fri, 4 Jun 2010 00:19:00 +0000 (17:19 -0700)]
draw.Draw fast paths for the Over operator.

Time (us) to draw a 200x200 src onto an image.RGBA dst with the Over
operator. Each case was measured three separate times, and the sorted
times are reported.

Fill case (where src is an image.ColorImage):
Before:
7438, 7511, 7526
After:
3073, 3087, 3102

Copy case (where src is an image.RGBA):
Before:
9506, 9510, 9563
After:
5262, 5300, 5344

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

14 years agoAdd Opaque method to the image types.
Nigel Tao [Fri, 4 Jun 2010 00:18:26 +0000 (17:18 -0700)]
Add Opaque method to the image types.

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

14 years agofmt.Scan: %c
Rob Pike [Fri, 4 Jun 2010 00:03:22 +0000 (17:03 -0700)]
fmt.Scan: %c

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

14 years agogo spec: Base comparison compatibility on assignment compatibility.
Robert Griesemer [Thu, 3 Jun 2010 23:55:50 +0000 (16:55 -0700)]
go spec: Base comparison compatibility on assignment compatibility.

Specifically:
- Simplified definition of comparison compatibility and folded into
  section on comparison operators since it's only used there.

This is a small language change/cleanup. As a consequence:
- An interface value may now be compared against a non-interface value.
- Channels with opposite directions cannot be compared directly anymore
  (per discussion with rsc).

R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/1462041

14 years agoio/ioutil: add TempFile
Russ Cox [Thu, 3 Jun 2010 23:29:34 +0000 (16:29 -0700)]
io/ioutil: add TempFile

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

14 years agoAdded regex-dna-parallel.go, a pretty trivial parallelization.
Kyle Consalus [Thu, 3 Jun 2010 23:20:54 +0000 (16:20 -0700)]
Added regex-dna-parallel.go, a pretty trivial parallelization.

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

14 years agohttp: handle status 304 correctly
Russ Cox [Thu, 3 Jun 2010 23:09:37 +0000 (16:09 -0700)]
http: handle status 304 correctly
  - cannot send body
  - should not send body-related headers

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

14 years agofmt.Scan: field widths
Rob Pike [Thu, 3 Jun 2010 23:06:41 +0000 (16:06 -0700)]
fmt.Scan: field widths
Also fix an interface bug: white-space-delimited doesn't work well for cases like "%d, %d" on "23, 23")

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

14 years agomath: fix typo in Exp2 benchmark
Charles L. Dorian [Thu, 3 Jun 2010 22:04:22 +0000 (15:04 -0700)]
math: fix typo in Exp2 benchmark

Was timing Exp, not Exp2.

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

14 years agobug285: assignment compatible map keys must be accepted
Robert Griesemer [Thu, 3 Jun 2010 21:58:00 +0000 (14:58 -0700)]
bug285: assignment compatible map keys must be accepted

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

14 years agonetchan: fix typo in test
Rob Pike [Thu, 3 Jun 2010 20:16:09 +0000 (13:16 -0700)]
netchan: fix typo in test

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

14 years agoFix typo in xml comments.
Nigel Tao [Thu, 3 Jun 2010 07:56:53 +0000 (00:56 -0700)]
Fix typo in xml comments.

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

14 years ago Optimization to regexp _CharClass: keep track of overall range of
Kyle Consalus [Thu, 3 Jun 2010 06:04:44 +0000 (23:04 -0700)]
Optimization to regexp _CharClass: keep track of overall range of
    charclass to avoid unnecessarily iterating over ranges.
    Also, use the fact that IntVector is an []int to avoid method calls.
    On my machine, this brings us from ~27500 ns/op to ~17500 ns/op in the benchmark I've added (it is also faster in the case where a range check
    doesn't help, added a benchmark for this too.)

    I'd also like to propose that "[]", and "[^]" be disallowed. They aren't useful as far as I can tell, they aren't widely supported, and they make reasoning about character classes a bit more complicated.

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

14 years agomath: Pow special cases (signed zero, IEEE 754-2008)
Charles L. Dorian [Thu, 3 Jun 2010 03:55:47 +0000 (20:55 -0700)]
math: Pow special cases (signed zero, IEEE 754-2008)

Also added more tests for acosh, hypot, log, log10, log2
in all_test.go.

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

14 years agodoc: codereview + Mercurial Queues
Peter Williams [Thu, 3 Jun 2010 00:11:52 +0000 (17:11 -0700)]
doc: codereview + Mercurial Queues

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

14 years agofmt.Scan: scan []byte arguments
Rob Pike [Wed, 2 Jun 2010 23:28:01 +0000 (16:28 -0700)]
fmt.Scan: scan []byte arguments

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

14 years agobufio: change ReadSlice to match description
Russ Cox [Wed, 2 Jun 2010 23:17:18 +0000 (16:17 -0700)]
bufio: change ReadSlice to match description

On error, ReadSlice is defined to return the available data
and advance past that data, but it was not behaving that
way for err == ErrBufferFull, making it harder for callers to
handle well.

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