1
0
mirror of https://github.com/golang/go synced 2024-09-25 09:10:14 -06:00
Commit Graph

9613 Commits

Author SHA1 Message Date
Robert Griesemer
5987a4ad29 scanner: correct error position for illegal UTF-8 encodings
- added corresponding test cases
- re-grouped tests for better readability

Fixes #2138.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4815091
2011-08-08 13:54:32 -07:00
John Asmuth
ffc0830c75 container/vector: removed last instances of vector outside of container/vector itself from the core libs
R=gri
CC=golang-dev
https://golang.org/cl/4810078
2011-08-08 11:27:09 -07:00
Joel Sing
68fea34be3 syscall: move bsd mmap syscall
The mmap system call varies across BSDs. Move mmap and munmap into
the operating system dependent files. This will be needed to add
syscall support for OpenBSD.

R=rsc
CC=golang-dev
https://golang.org/cl/4822056
2011-08-08 09:56:45 -04:00
Joel Sing
f6fab25582 net: add support for openbsd
R=rsc
CC=golang-dev
https://golang.org/cl/4816060
2011-08-08 09:56:42 -04:00
Joel Sing
21ac258e07 runtime: openbsd amd64 runtime support
Add support for the go runtime on openbsd/amd64. This is based on
the existing freebsd runtime.

Threads are implemented using OpenBSD's rthreads, which are currently
disabled by default, however can be enabled via the kern.rthreads
sysctl.

For now, cgo is disabled.

R=rsc
CC=golang-dev
https://golang.org/cl/4815067
2011-08-08 09:56:38 -04:00
Joel Sing
604b91a43e os: add support for openbsd
R=rsc
CC=golang-dev
https://golang.org/cl/4798061
2011-08-08 09:56:36 -04:00
Rob Pike
9c2ebab826 exp/template: document that comments may span newlines.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4855045
2011-08-08 23:42:49 +10:00
Dmitriy Vyukov
54e9406ffb runtime: add more specialized type algorithms
The change adds specialized type algorithms
for slices and types of size 8/16/32/64/128.
It significantly accelerates chan and map operations
for most builtin types as well as user structs.

benchmark                   old,ns/op   new,ns/op
BenchmarkChanUncontended          226          94
(on Intel Xeon E5620, 2.4GHz, Linux 64 bit)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4815087
2011-08-08 09:35:32 -04:00
David Symonds
a09ba8b638 exp/template: url filter.
R=r
CC=golang-dev
https://golang.org/cl/4837063
2011-08-08 16:29:57 +10:00
David Symonds
ec010fddb5 exp/template: fix Must example.
R=r
CC=golang-dev
https://golang.org/cl/4839052
2011-08-08 15:38:37 +10:00
Rob Pike
3c10403784 time: parse and format fractional seconds
R=golang-dev, rogpeppe, r, dsymonds, bradfitz, fvbommel
CC=golang-dev
https://golang.org/cl/4830065
2011-08-08 07:50:17 +10:00
Robert Griesemer
4c268b335f gofmt: update test script so 'make test' succeeds
R=r, rsc
CC=golang-dev
https://golang.org/cl/4832055
2011-08-06 12:30:54 -07:00
Rob Pike
7d87f3d233 FAQ: variant types, unions
Fixes #1935.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4850044
2011-08-06 11:21:59 +10:00
Rob Pike
93c4a246a4 FAQ: lots of small tweaks plus a couple of new discussions.
Expand the conversations about pointers, memory, and
garbage collection.
Describe the lack of co/contravariant typing.

Fixes #1929.
Fixes #1930.

R=dsymonds, r, mirtchovski, edsrzf, hanwen, rsc
CC=golang-dev
https://golang.org/cl/4852041
2011-08-06 07:41:55 +10:00
Alex Brainman
be269b2f6d time: fix windows build
R=golang-dev, mattn.jp, dsymonds
CC=golang-dev
https://golang.org/cl/4849042
2011-08-05 17:19:17 +10:00
Rob Pike
88233e89db asn1: fix build
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4830061
2011-08-05 15:10:06 +10:00
Rob Pike
bfaa175e09 time: add nanoseconds to the Time structure.
R=golang-dev, dsymonds, bradfitz, kevlar, rsc, r
CC=golang-dev
https://golang.org/cl/4851041
2011-08-05 13:44:02 +10:00
Alex Brainman
5da14d1697 net: implement windows LookupMX and LookupAddr
Also sort SRV records before returning from LookupSRV.

R=rsc
CC=golang-dev
https://golang.org/cl/4817049
2011-08-05 10:27:51 +10:00
Mikio Hara
ba9833269d net: fix /proc/net/igmp,igmp6 reading bug on linux
Fixes #2130.

R=rsc, dave
CC=golang-dev
https://golang.org/cl/4846044
2011-08-05 09:20:13 +10:00
Rob Pike
5b1f159fb5 exp/norm: fix build by adding a test placeholder
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4838050
2011-08-05 08:25:49 +10:00
Marcel van Lohuizen
b35d49fca1 exp/norm: maketables tool for generating tables for normalization.
R=r, bsiegert, r, alex.brainman
CC=golang-dev
https://golang.org/cl/4662080
2011-08-04 23:15:19 +02:00
Dmitriy Vyukov
d770aadee5 runtime: faster chan creation on Linux/FreeBSD/Plan9
The change removes chan finalizer (Lock destructor)
if it is not required on the platform.

benchmark                    old ns/op    new ns/op    delta
BenchmarkChanCreation          1132.00       381.00  -66.34%
BenchmarkChanCreation-2        1215.00       243.00  -80.00%
BenchmarkChanCreation-4        1084.00       186.00  -82.84%
BenchmarkChanCreation-8        1415.00       154.00  -89.12%
BenchmarkChanCreation-16       1386.00       144.00  -89.61%
(on 2 x Intel Xeon E5620, 8 HT cores, 2.4 GHz, Linux)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4841041
2011-08-04 08:31:03 -04:00
Yasuhiro Matsumoto
62d4b8ebd2 http: correct path to serve index.html.
calling filepath.FromSlash(x) make invalid character to serve file.
Fixes #2128

R=golang-dev, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/4810064
2011-08-04 08:20:53 -04:00
David Symonds
4143491c4a http: add more MPEG-4 MIME types to sniffer, and disable MP4 sniffing.
R=rsc
CC=golang-dev
https://golang.org/cl/4808056
2011-08-04 22:10:17 +10:00
Rob Pike
583f72434f fmt: call UpdateMemStats in malloc counter
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4830059
2011-08-04 16:32:14 +10:00
David Symonds
bb8e36b4a1 gob: avoid a couple of init-time allocations.
R=r
CC=golang-dev
https://golang.org/cl/4806049
2011-08-04 16:22:22 +10:00
Rob Pike
19e80b0818 gob: add UpdateMemStats calls to malloc counter
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4808071
2011-08-04 15:56:25 +10:00
Rob Pike
ee9168d507 gob: don't invoke GobEncoder on zero values.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4801076
2011-08-04 14:39:44 +10:00
Mikio Hara
946cb0ece1 net: joined group addresses for a specific interface for darwin, freebsd, linux
This CL enables to list the multicast, joined group addresses
for a specific interface by using Interface.MulticastAddrs
method.

R=rsc
CC=golang-dev
https://golang.org/cl/4808062
2011-08-04 00:22:52 -04:00
Mikio Hara
dc7f82559d syscall: update routing message support for BSD variants
R=rsc
CC=golang-dev
https://golang.org/cl/4826056
2011-08-04 00:22:48 -04:00
Hector Chu
6500065543 runtime: remove unnecessary locking
R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/4819051
2011-08-04 00:22:39 -04:00
Rob Pike
6fe82e6b96 test/bench: note changes after recent improvements to locking and runtime
Some tests are significantly faster (50%), a few are slower (up to 30%).
Fannkuch is confusing: parallel code is a little slower for gc, non-parallel and all gccgo runs are faster.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4830058
2011-08-04 11:29:20 +10:00
Dmitriy Vyukov
a496c9eaa6 runtime: correct Note documentation
Reflect the fact that notesleep() can be called
by exactly one thread.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4816064
2011-08-03 15:51:55 -04:00
Yasuhiro Matsumoto
b32e210586 misc/vim: Godoc command.
vim command 'Godoc' to see godoc.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4815071
2011-08-03 16:46:35 +10:00
Russ Cox
16cdba8572 errchk: add -0 flag
R=lvd
CC=golang-dev
https://golang.org/cl/4837049
2011-08-02 15:19:44 -04:00
David Symonds
11e254e62c ld: fail linking if the top-level package is not main.
This makes {5,6,8}l conform to the spec more tightly.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4826063
2011-08-02 07:45:04 -04:00
Rob Pike
3dbe10c453 exp/template: return nil value from helpers on error, even methods.
R=rsc
CC=golang-dev
https://golang.org/cl/4835046
2011-08-01 20:02:52 -07:00
Andrew Gerrand
b0ef0294d2 go/build: use GOBIN as binary path for GOROOT
Fixes #2106.

R=golang-dev, dsymonds, rsc
CC=golang-dev
https://golang.org/cl/4836047
2011-08-01 19:17:23 -07:00
Andrew Gerrand
034711ed76 tag release.r59
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4841044
2011-08-01 14:20:02 -07:00
Roger Peppe
6ed27d4770 exp/template: make index function on maps return zero value when key not present.
R=r
CC=golang-dev
https://golang.org/cl/4808065
2011-08-01 09:03:35 -07:00
Roger Peppe
5c5ce6d24d exp/template: ensure that a valid Set is returned even on error.
R=r
CC=golang-dev
https://golang.org/cl/4838044
2011-08-01 09:02:06 -07:00
Dave Cheney
317911c9ff 5g: fix set but not used error
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4816061
2011-07-31 19:54:47 -07:00
Alex Brainman
8800f7cb55 http: correct format flags when printing errors during tests
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4809065
2011-08-01 11:50:50 +10:00
Lucio De Re
05f734c8b4 cmd/ld/pe.c: Corrected mismatched print formats and variables.
R=golang-dev, alex.brainman
CC=golang-dev, rsc
https://golang.org/cl/4839041
2011-08-01 11:12:50 +10:00
Nigel Tao
1d0c141d7d html: parse doctype tokens; merge adjacent text nodes.
The test case input is "<!DOCTYPE html><span><button>foo</span>bar".
The correct parse is:
| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <span>
|       <button>
|         "foobar"

R=gri
CC=golang-dev
https://golang.org/cl/4794063
2011-08-01 10:26:46 +10:00
Andrew Gerrand
4d2766e994 doc: document release.r59
R=golang-dev, dsymonds, r, r
CC=golang-dev
https://golang.org/cl/4835044
2011-07-31 15:29:10 -07:00
Andrew Gerrand
70f6133b84 doc: fix typo in Effective Go
Fixes #2120.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4810061
2011-07-31 15:25:26 -07:00
Alex Brainman
9d7e39340d syscall: delay load of dll functions until they are called
Before this change, syscall package would load
all dlls used anywhere in the go tree on startup.
For example, this program:

package main

import "fmt"

func main() {
       fmt.Printf("Hello world\n")
}

would load these dlls

kernel32.dll
advapi32.dll
shell32.dll
wsock32.dll
ws2_32.dll
dnsapi.dll
iphlpapi.dll

Most of these dlls are network related and are not used
in this program. Now the same program loads only

kernel32.dll
shell32.dll

This decreases start times somewhat.

This also relaxes the rules of which dlls can be included
in the standard library. We could now include system calls
that are not available on all versions of Windows, because
we could decide if we should call them during runtime.

R=rsc, vcc.163
CC=golang-dev
https://golang.org/cl/4815046
2011-07-31 20:07:04 +10:00
David Symonds
be96fa5a2e go_faq: drop a dramatic comma.
R=r
CC=golang-dev
https://golang.org/cl/4809064
2011-07-31 12:59:58 +10:00
Andrew Gerrand
ffccc026cb exp/norm: correct package doc comment
Fixes #2118.

R=golang-dev, r, iant
CC=golang-dev
https://golang.org/cl/4815073
2011-07-30 18:02:09 -07:00