]> Cypherpunks repositories - gostls13.git/log
gostls13.git
14 years agostrconv.Uitob64: allow conversion of 64-bit binaries (buffer was too small).
Rob Pike [Thu, 1 Jul 2010 21:44:21 +0000 (14:44 -0700)]
strconv.Uitob64: allow conversion of 64-bit binaries (buffer was too small).
panic if base is invalid.

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

14 years agostrings and bytes.Split: make count of 0 mean 0, not infinite.
Rob Pike [Thu, 1 Jul 2010 21:08:14 +0000 (14:08 -0700)]
strings and bytes.Split: make count of 0 mean 0, not infinite.
Use a count of -1 for infinity.  Ditto for Replace.

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

14 years ago6l: drop confusing comment
Russ Cox [Thu, 1 Jul 2010 19:51:00 +0000 (12:51 -0700)]
6l: drop confusing comment

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

14 years ago6a: assemble CMPPD as 6l expects
Russ Cox [Thu, 1 Jul 2010 19:36:29 +0000 (12:36 -0700)]
6a: assemble CMPPD as 6l expects
libmach: disassemble CMPPD as 6a expects

R=ken2
CC=Charlie Dorian, golang-dev
https://golang.org/cl/1704046

14 years ago6l: implement MOVLQZX as "mov", not "movsxd"
Russ Cox [Thu, 1 Jul 2010 19:18:35 +0000 (12:18 -0700)]
6l: implement MOVLQZX as "mov", not "movsxd"

(Here, quoted strings are the official AMD names.)

The amd64 "movsxd" instruction, when invoked
with a 64-bit REX prefix, moves and sign extends
a 32-bit value from register or memory into a
64-bit register.  6.out.h spells this MOVLQSX.

6.out.h also includes MOVLQZX, the zero extending
version, which it implements as "movsxd" without
the REX prefix.  Without the REX prefix it's only sign
extending 32 bits to 32 bits (i.e., not doing anything
to the bits) and then storing in a 32-bit register.
Any write to a 32-bit register zeros the top half of the
corresponding 64-bit register, giving the advertised effect.
This particular implementation of the functionality is
non-standard, because an ordinary 32-bit "mov" would
do the same thing.

Because it is non-standard, it is often mishandled or
not handled by binary translation tools like valgrind.
Switching to the standard "mov" makes the binaries
work better with those tools.

It's probably useful in 6c and 6g to have an explicit
instruction, though, so that the intent of the size
change is clear.  Thus we leave the concept of MOVLQZX
and just implement it by the standard "mov" instead of
the non-standard 32-bit "movsxd".

Fixes #896.

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

14 years agocmath: correct IsNaN for argument cmplx(Inf, NaN)
Charles L. Dorian [Thu, 1 Jul 2010 06:34:33 +0000 (23:34 -0700)]
cmath: correct IsNaN for argument cmplx(Inf, NaN)

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

14 years agotest: override gcc bug when preparing complex divide tables
Russ Cox [Thu, 1 Jul 2010 06:34:27 +0000 (23:34 -0700)]
test: override gcc bug when preparing complex divide tables

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

14 years agocodereview: allow multiple email addresses in CONTRIBUTORS
Russ Cox [Thu, 1 Jul 2010 06:34:11 +0000 (23:34 -0700)]
codereview: allow multiple email addresses in CONTRIBUTORS

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

14 years agogoinstall: support for Bazaar+Launchpad
Gustavo Niemeyer [Thu, 1 Jul 2010 06:33:49 +0000 (23:33 -0700)]
goinstall: support for Bazaar+Launchpad

With these changes, goinstall is now able to use branches
maintained with Bazaar located in Launchpad.

Project aliases such as /project and /project/series are
supported in addition to specific user or team branches
such as /~user/project/branch.  Temporary branches under
the +junk special project are also supported.

As a curious side effect, since Launchpad is able to import
code from other locations, they can be indirectly
accessible too if desired.

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

14 years agoA+C: add Gustavo Niemeyer (individual CLA)
Russ Cox [Thu, 1 Jul 2010 06:31:41 +0000 (23:31 -0700)]
A+C: add Gustavo Niemeyer (individual CLA)

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

14 years agocgo: use slash-free relative paths for .so references
Russ Cox [Thu, 1 Jul 2010 06:31:27 +0000 (23:31 -0700)]
cgo: use slash-free relative paths for .so references

The Makefile and cgo now rewrite / to _ when creating the path.
The .so for gosqlite.googlecode.com/hg/sqlite is named
cgo_gosqlite.googlecode.com_hg_sqlite.so, and then 6l and 8l
both include a default rpath of $GOROOT/pkg/$GOOS_$GOARCH.
This should make it easier to move binaries from one system
to another.

Fixes #857.

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

14 years ago8g: out of register bug fix
Russ Cox [Thu, 1 Jul 2010 03:45:50 +0000 (20:45 -0700)]
8g: out of register bug fix

Fixes #868.

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

14 years agogc: do not crash on bad [...]T
Russ Cox [Thu, 1 Jul 2010 03:34:31 +0000 (20:34 -0700)]
gc: do not crash on bad [...]T

Fixes #879.

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

14 years agotemplate: fix typo in doc comment
Daniel Fleischman [Thu, 1 Jul 2010 02:57:26 +0000 (19:57 -0700)]
template: fix typo in doc comment

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

14 years agobytes, strings: add Replace
Russ Cox [Thu, 1 Jul 2010 01:03:09 +0000 (18:03 -0700)]
bytes, strings: add Replace

This is the Replace I suggested in the review of CL 1114041.
It's true that we already have

regexp.MustCompile(regexp.QuoteMeta(old)).ReplaceAll(s, new)

but because this Replace is doing a simpler job it is
simpler to call and inherently more efficient.

I will add the bytes implementation and tests to the
CL after the strings one has been reviewed.

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

14 years ago x509: fix English.
Adam Langley [Wed, 30 Jun 2010 22:05:38 +0000 (18:05 -0400)]
x509: fix English.

        (addressing comments from 1741045)

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

14 years agox509: support non-self-signed certs.
Adam Langley [Wed, 30 Jun 2010 22:02:31 +0000 (18:02 -0400)]
x509: support non-self-signed certs.

For generating non-self-signed certs we need to be able to specify a
public key (for the signee) which is different from the private key (of
the signer).

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

14 years agosyscall: add socketpair
Ivan Krasin [Wed, 30 Jun 2010 21:58:21 +0000 (14:58 -0700)]
syscall: add socketpair

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

14 years agomath: amd64 versions of exp and fabs
Charles L. Dorian [Wed, 30 Jun 2010 21:44:27 +0000 (14:44 -0700)]
math: amd64 versions of exp and fabs

Benchmark of exp to 28 ns/op from 64 ns/op,
on 2.53GHz Intel Core 2 Duo.

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

14 years agoio/ioutil.TempFile for Windows
Peter Mundy [Wed, 30 Jun 2010 20:52:34 +0000 (13:52 -0700)]
io/ioutil.TempFile for Windows
Fixes #834.

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

14 years agoio: Avoid race condition in pipe.
Ian Lance Taylor [Wed, 30 Jun 2010 20:14:46 +0000 (13:14 -0700)]
io: Avoid race condition in pipe.

One goroutine started up and was waiting in rw.  Then another
goroutine decided to close the pipe.  The closing goroutine
stalled calling p.io.Lock() in pipeHalf.close.  (This happened
in gccgo).  If the closing goroutine had been able to set the
ioclosed flag, it would have gone on to tell the runner that
the pipe was closed, which would then send an EINVAL to the
goroutine sleeping in rw.  Unlocking p.io before sleeping in
rw avoids the race.

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

14 years agohttp: client_test nil pointer fix
Andrew Gerrand [Wed, 30 Jun 2010 08:57:27 +0000 (18:57 +1000)]
http: client_test nil pointer fix

Fixes #893.

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

14 years agogodoc: canonicalize codewalk paths
Andrew Gerrand [Wed, 30 Jun 2010 07:56:51 +0000 (17:56 +1000)]
godoc: canonicalize codewalk paths

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

14 years agodoc/codewalk: Share Memory By Communicating
Andrew Gerrand [Wed, 30 Jun 2010 06:56:30 +0000 (16:56 +1000)]
doc/codewalk: Share Memory By Communicating

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

14 years agotime: implement timezones for windows
Alex Brainman [Wed, 30 Jun 2010 05:29:09 +0000 (22:29 -0700)]
time: implement timezones for windows

Fixes #761.

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

14 years agoContributors: add Kirklin McDonald (a Google employee)
Andrew Gerrand [Wed, 30 Jun 2010 04:42:58 +0000 (14:42 +1000)]
Contributors: add Kirklin McDonald (a Google employee)

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

14 years agonet: initial attempt to implement windows version
Alex Brainman [Wed, 30 Jun 2010 03:23:39 +0000 (20:23 -0700)]
net: initial attempt to implement windows version

R=rsc, Mateusz Czaplinski
CC=golang-dev
https://golang.org/cl/1600041

14 years agold: fix implementation of -u
Russ Cox [Wed, 30 Jun 2010 01:59:48 +0000 (18:59 -0700)]
ld: fix implementation of -u

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

14 years ago net: add support for DNS SRV requests.
Kirklin McDonald [Wed, 30 Jun 2010 00:54:24 +0000 (10:54 +1000)]
net: add support for DNS SRV requests.

        Fixes #758.

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

14 years agoruntime: fix scheduling bug - world wasn't stopping
Russ Cox [Wed, 30 Jun 2010 00:47:27 +0000 (17:47 -0700)]
runtime: fix scheduling bug - world wasn't stopping

Fixes #886.

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

14 years agostrconv: fix %.1f, 0.09
Rob Pike [Tue, 29 Jun 2010 23:51:56 +0000 (16:51 -0700)]
strconv: fix %.1f, 0.09
Fixes #822.
Credit to https://golang.org/cl/1442041 by danielfleischman

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

14 years agostrconv: fix %.2g, 40
Rob Pike [Tue, 29 Jun 2010 23:39:17 +0000 (16:39 -0700)]
strconv: fix %.2g, 40
Fixes #845.

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

15 years agocode gen bug in len(nil) and cap(nil)
Ken Thompson [Tue, 29 Jun 2010 19:48:24 +0000 (12:48 -0700)]
code gen bug in len(nil) and cap(nil)
fixes #892

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

15 years agoMove the function Run() back into fd.go.
Vinu Rajashekhar [Tue, 29 Jun 2010 19:04:04 +0000 (12:04 -0700)]
Move the function Run() back into fd.go.

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

15 years agogob: a couple of tiny simplifications using Kind()
Rob Pike [Tue, 29 Jun 2010 17:14:32 +0000 (10:14 -0700)]
gob: a couple of tiny simplifications using Kind()

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

15 years agoruntime: fix windows build
Alex Brainman [Tue, 29 Jun 2010 14:12:14 +0000 (07:12 -0700)]
runtime: fix windows build

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

15 years agoexp/draw/x11: implement the mapping from keycodes to keysyms.
Nigel Tao [Tue, 29 Jun 2010 00:54:41 +0000 (10:54 +1000)]
exp/draw/x11: implement the mapping from keycodes to keysyms.

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

15 years agoOnly catch all signals if os/signal package imported.
Ian Lance Taylor [Tue, 29 Jun 2010 00:14:17 +0000 (17:14 -0700)]
Only catch all signals if os/signal package imported.

Fixes #776.

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

15 years agonetchan: use gob DecodeValue to eliminate the need for a pointer value
Rob Pike [Tue, 29 Jun 2010 00:12:09 +0000 (17:12 -0700)]
netchan: use gob DecodeValue to eliminate the need for a pointer value
in Import and Export.

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

15 years agogob: add DecodeValue and EncodeValue
Rob Pike [Tue, 29 Jun 2010 00:11:54 +0000 (17:11 -0700)]
gob: add DecodeValue and EncodeValue

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

15 years agoA+C for Peter Mundy (peterGo)
Andrew Gerrand [Mon, 28 Jun 2010 23:48:35 +0000 (09:48 +1000)]
A+C for Peter Mundy (peterGo)

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

15 years agocompiler fatal error in switch.
Ken Thompson [Mon, 28 Jun 2010 23:30:55 +0000 (16:30 -0700)]
compiler fatal error in switch.
fixes #867.

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

15 years agosyscall: Add syscall_bsd.go to zsycall_freebsd_386.go
Peter Mundy [Mon, 28 Jun 2010 23:11:02 +0000 (09:11 +1000)]
syscall: Add syscall_bsd.go to zsycall_freebsd_386.go

Revision: 5885c9d10f created syscall_bsd.go for code used
by Darwin and other *BSDs, which should have included
FreeBSD. mksyscall.sh to generate new zsyscall_freebsd_386.go.

Fixes #862.

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

15 years agorpc: allow non-struct args and reply (they must still be pointers)
Rob Pike [Mon, 28 Jun 2010 23:05:54 +0000 (16:05 -0700)]
rpc: allow non-struct args and reply (they must still be pointers)

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

15 years agonetchan: allow chan of basic types now that gob can handle such
Rob Pike [Mon, 28 Jun 2010 22:59:54 +0000 (15:59 -0700)]
netchan: allow chan of basic types now that gob can handle such

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

15 years agofmt.Printf: fix bug in handling of %#v.
Rob Pike [Mon, 28 Jun 2010 21:11:38 +0000 (14:11 -0700)]
fmt.Printf: fix bug in handling of %#v.
nice side effect: slices now obey their format verb. example:
fmt.Printf("%q\n", []string{"a"})

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

15 years agogob: allow transmission of things other than structs at the top level.
Rob Pike [Mon, 28 Jun 2010 21:09:47 +0000 (14:09 -0700)]
gob: allow transmission of things other than structs at the top level.
also fix a bug handling nil maps: before, would needlessly send empty map

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

15 years agoMove the functions, newPollServer and Run, from fd.go
Vinu Rajashekhar [Mon, 28 Jun 2010 20:58:56 +0000 (13:58 -0700)]
Move the functions, newPollServer and Run, from fd.go
to a new source file.

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

15 years ago8g compiler missing call to splitclean().
Ken Thompson [Mon, 28 Jun 2010 19:19:12 +0000 (12:19 -0700)]
8g compiler missing call to splitclean().
fixes #887.

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

15 years agooptimization of static initialization
Ken Thompson [Mon, 28 Jun 2010 00:37:01 +0000 (17:37 -0700)]
optimization of static initialization

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

15 years agofmt.Scan: fix handling of EOFs.
Rob Pike [Thu, 24 Jun 2010 22:24:25 +0000 (15:24 -0700)]
fmt.Scan: fix handling of EOFs.
Fixes #876.

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

15 years agogob: add support for complex numbers
Rob Pike [Thu, 24 Jun 2010 22:07:28 +0000 (15:07 -0700)]
gob: add support for complex numbers

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

15 years agogc: fix crash for nested complex division
Russ Cox [Wed, 23 Jun 2010 14:55:50 +0000 (10:55 -0400)]
gc: fix crash for nested complex division

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

15 years agogodashboard: add Projects page
Andrew Gerrand [Wed, 23 Jun 2010 14:27:51 +0000 (15:27 +0100)]
godashboard: add Projects page

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

15 years agoBuild draw/x11. Skip for test.
Christopher Wedgwood [Wed, 23 Jun 2010 05:08:27 +0000 (15:08 +1000)]
Build draw/x11.  Skip for test.

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

15 years agoregexp: restore accidentally deleted test item.
Rob Pike [Tue, 22 Jun 2010 23:11:21 +0000 (16:11 -0700)]
regexp: restore accidentally deleted test item.

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

15 years agoregexp: bug fix: need to track whether match begins with fixed prefix.
Rob Pike [Tue, 22 Jun 2010 23:02:14 +0000 (16:02 -0700)]
regexp: bug fix: need to track whether match begins with fixed prefix.
Fixes #872.

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

15 years agodebug/dwarf: update PDF link.
Rob Pike [Tue, 22 Jun 2010 21:56:16 +0000 (14:56 -0700)]
debug/dwarf: update PDF link.
Fixes #881.

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

15 years agomisc/vim: always override filetype detection for .go files
Andrew Gerrand [Tue, 22 Jun 2010 14:22:49 +0000 (15:22 +0100)]
misc/vim: always override filetype detection for .go files

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

15 years agoruntime: split extern.go into debug.go, extern.go, sig.go.
Russ Cox [Tue, 22 Jun 2010 03:53:49 +0000 (20:53 -0700)]
runtime: split extern.go into debug.go, extern.go, sig.go.
move mal next to the other malloc functions.

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

15 years agobig, bytes: move assembly externs to separate file
Russ Cox [Tue, 22 Jun 2010 02:53:08 +0000 (19:53 -0700)]
big, bytes: move assembly externs to separate file
to make it easier to build package without assembly.

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

15 years agonet: move Dial, Listen out of net.go.
Russ Cox [Tue, 22 Jun 2010 02:52:30 +0000 (19:52 -0700)]
net: move Dial, Listen out of net.go.
now net.go is only type definitions, not active code.

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

15 years agold: add -u flag to check safe bits; discard old -u, -x flags
Russ Cox [Tue, 22 Jun 2010 01:03:49 +0000 (18:03 -0700)]
ld: add -u flag to check safe bits; discard old -u, -x flags

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

15 years agoruntime: delete old types
Russ Cox [Tue, 22 Jun 2010 01:03:25 +0000 (18:03 -0700)]
runtime: delete old types

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

15 years agonet: Fix ICMP test.
Christopher Wedgwood [Mon, 21 Jun 2010 23:40:44 +0000 (16:40 -0700)]
net: Fix ICMP test.

Ping IDs should be limited to 16-bits.  Fix failure printing.

R=rsc
CC=golang-dev, jean-christophe smith <jeanchristophe.smith
https://golang.org/cl/1682043

15 years agotest: another listen on ":0" -> "127.0.0.1:0"
Russ Cox [Mon, 21 Jun 2010 23:34:55 +0000 (16:34 -0700)]
test: another listen on ":0" -> "127.0.0.1:0"

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

15 years agorelease.2010-06-21 tag
Andrew Gerrand [Mon, 21 Jun 2010 22:22:14 +0000 (23:22 +0100)]
release.2010-06-21 tag

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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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