1
0
mirror of https://github.com/golang/go synced 2024-10-04 11:11:21 -06:00
Commit Graph

3175 Commits

Author SHA1 Message Date
Charles L. Dorian
e1c347ca59 8g: fix 386 floating point stack bug
Also fixes issue 310 comment 5 error.
Fixes #310.

R=rsc
https://golang.org/cl/163042
2009-12-01 15:53:50 -08:00
Rob Pike
a0f742d343 more gob bugs
1) need to send slice and array types (was only sending element types)
2) compatibleType needs to use decoder's type map

R=rsc
CC=golang-dev
https://golang.org/cl/164062
2009-12-01 15:31:28 -08:00
Robert Griesemer
749da968e4 make test.sh work again
R=rsc
https://golang.org/cl/164059
2009-12-01 13:08:36 -08:00
Rob Pike
67dc2ae3a6 a couple of usage fixups in prof
R=rsc
https://golang.org/cl/161050
2009-12-01 11:35:34 -08:00
Fazlul Shahriar
db18ce2f53 gofmt: use os.Stdin instead of opening /dev/stdin
Opening /dev/stdin can sometimes fail. For example, in the acme editor,
executing "Edit ,|gofmt" fails with:

	open /dev/stdin: no such device or address

Executing "Edit ,|ls -l /dev/stdin /proc/self/fd/0" gives:

	lrwxrwxrwx 1 root root  15 2009-09-07 02:17 /dev/stdin -> /proc/self/fd/0
	lrwx------ 1 fhs  users 64 2009-11-26 22:05 /proc/self/fd/0 -> socket:[5528230]

(This is my first change, and I've signed the individual contributor license agreement.)

R=rsc, gri
CC=golang-dev
https://golang.org/cl/162041
2009-12-01 09:32:22 -08:00
Robert Griesemer
9e450880e9 some godoc cleanup:
- simplified dealing with parse errors: no need to intersperse them in the source
- improve visibility of highlighted identifiers by showing them in bold

R=rsc
https://golang.org/cl/163051
2009-12-01 09:15:05 -08:00
Tor Andersson
598f3e284e A first stab at porting the XCB X11 protocol bindings to go.
The python script needs a checkout of xcb/proto to generate
an xproto.go file, which together with xgb.go provide functions
to access all of the core X11 protocol requests. I have included the
generated file.

Extensions and authentication methods are not implemented.

R=r, rsc, nigeltao_golang
https://golang.org/cl/162053
2009-11-30 14:25:50 -08:00
Sergey 'SnakE' Gromov
9d50b468a1 json: Decode into native Go data structures
This patch adds an ability to convert JSON-encoded data into
a hierarchy of Go's native data types.

R=rsc
CC=golang-dev
https://golang.org/cl/161060
2009-11-30 13:55:09 -08:00
Robert Griesemer
c1767dbdda Typo in comment.
Fixes #358.

R=rsc
CC=r
https://golang.org/cl/164043
2009-11-30 12:50:02 -08:00
Péter Szabó
12206f64dd sync.RWMutex: rewritten to add support for concurrent readers.
Also made sync.xadd public to help testing sync.RWMutex.

Also added unit tests for sync.RWMutex.

R=rsc
https://golang.org/cl/162044
2009-11-30 12:10:56 -08:00
Jonathan Wills
229807c8c3 Added a method on UDPConn so they can actually send broadcast packets.
R=rsc
https://golang.org/cl/162046
2009-11-30 12:03:55 -08:00
Christopher Wedgwood
a85c258e67 a[b:len(a)] -> a[b:]
R=r, rsc
CC=agl1
https://golang.org/cl/161070
2009-11-30 12:03:43 -08:00
Andrew Skiba
68d3b6e51a Handle \r as a whitespace when parsing JSON string.
Fixes #272.

R=rsc
https://golang.org/cl/161061
2009-11-30 12:03:26 -08:00
Christopher Wedgwood
c78710f53e Add trivial whitespace to CorruptInputError strings.
R=r, rsc
https://golang.org/cl/161058
2009-11-30 12:03:10 -08:00
Christopher Wedgwood
f0c9719540 Minimise bitrot: bytes.Copy -> copy
(compile tested only)

R=r, rsc
https://golang.org/cl/161069
2009-11-30 11:57:21 -08:00
Hector Chu
cd9d72ba9e Ports of lib9, libbio and libmach to Windows.
R=rsc
https://golang.org/cl/157159
2009-11-30 11:53:11 -08:00
Russ Cox
ed62d27a52 template: two bug fixes / nits
* diagnose template not created with New
    (current code just crashes)
  * write []byte uninterpreted
    (current code writes fmt format: "[65 65 65 65]")

R=r
CC=golang-dev
https://golang.org/cl/161075
2009-11-30 10:29:14 -08:00
Russ Cox
be98bc488e websocket: avoid $GOROOT in case it has spaces
Fixes #115.

R=r, ukai, sergio
https://golang.org/cl/162057
2009-11-29 20:30:02 -08:00
Sergio Luis O. B. Correia
46892656c7 crypto/md4, exp/draw/x11: fix makefile to build when GOROOT has whitespaces
this is the exact same thing issue #115 is about. fix makefiles to use relative
path to work in the case we have whitespaces as part of GOROOT.

R=rsc
https://golang.org/cl/162055
2009-11-29 18:14:49 -08:00
Eden Li
354b100567 cgo: use C type void for opaque types if dwarf.Common().Type returns nothing
Ideally, the C name would come from the typedef or pointer that
references the Size<0 type, but we can't easily generate this without
performing a look-ahead to see if any referencing type will become opaque.

Fixes #334.
Fixes #281.

R=rsc
https://golang.org/cl/161056
2009-11-29 18:14:39 -08:00
Fumitoshi Ukai
f9f0184e13 Add WebSocket server framework hooked into http.
R=r, rsc
https://golang.org/cl/156071
2009-11-29 14:22:44 -08:00
Robert Griesemer
f3e0f214f8 Correct expression level for argument lists.
Fixes #352.

R=rsc
https://golang.org/cl/161073
2009-11-29 14:11:52 -08:00
Rob Pike
b5358e0630 a few utf8 benchmarks. on my mac:
utf8_test.BenchmarkRuneCountTenASCIIChars	20000000	       108 ns/op
utf8_test.BenchmarkRuneCountTenJapaneseChars	10000000	       199 ns/op
utf8_test.BenchmarkEncodeASCIIRune	500000000	         6 ns/op
utf8_test.BenchmarkEncodeJapaneseRune	100000000	        10 ns/op
utf8_test.BenchmarkDecodeASCIIRune	100000000	        13 ns/op
utf8_test.BenchmarkDecodeJapaneseRune	100000000	        21 ns/op

R=gri
CC=golang-dev
https://golang.org/cl/161049
2009-11-25 13:30:30 -08:00
Rob Pike
773e77981d rewrite RuneCountInString to use range.
R=gri
CC=golang-dev
https://golang.org/cl/160069
2009-11-25 11:39:34 -08:00
Nigel Tao
f65427a8be Initial exp/draw/x11 implementation.
This provides an experimental X11 backend for the exp/draw interface.
It does not aim to provide a complete implementation of the X11 client protocol.

This works for me (Ubuntu Hardy 8.04, GOARCH=386). Your mileage my vary.

R=r, rsc, r1
CC=golang-dev
https://golang.org/cl/156109
2009-11-25 18:31:34 +11:00
Rob Pike
a0c55432f3 fix weird all.bash failures by running deps.bash before make clean runs in pkg directory.
before this change, if pkg/Make.deps is missing or broken, clean.bash fails and the build dies
but not until much later.

add freebsd to error message about valid values of $GOOS

TODO: would be nice if this process exited when an error occurred. subshells make it hard

R=rsc
CC=golang-dev
https://golang.org/cl/160065
2009-11-24 21:07:05 -08:00
Robert Griesemer
28f1914023 Handle presence of illegal semicolon after package clause better.
R=r, r1
https://golang.org/cl/157167
2009-11-24 17:34:08 -08:00
Robert Griesemer
a38ec58df0 Replace sort.Sort call with heapify algorithm in Init.
Fixed package comment.
Renamed some variables for symmetry, added more internal comments and more tests.
Fixes #304.

R=rsc
https://golang.org/cl/157166
2009-11-24 17:20:13 -08:00
Russ Cox
b7c4314ecb gc: correct type check for x, ok map assignment
Fixes #288.

R=ken2
https://golang.org/cl/157162
2009-11-24 16:11:48 -08:00
Russ Cox
6c827cb412 make.bash: clear CDPATH to avoid output from cd
Fixes #306.

R=r, r1
https://golang.org/cl/160060
2009-11-24 16:01:35 -08:00
Ken Thompson
bd80b5a835 test case for large angles in trig functions
R=rsc
https://golang.org/cl/157160
2009-11-24 15:42:46 -08:00
Ken Thompson
b2bc1db9ac bad sin/cos for large angles.
fixes #326.

R=rsc
https://golang.org/cl/160059
2009-11-24 15:01:44 -08:00
Robert Griesemer
c6f8df0827 fix for broken build (built-in new was invisible due to a parameter called 'new')
R=iant
https://golang.org/cl/160057
2009-11-24 14:11:53 -08:00
Robert Griesemer
001a8b11ff Change to container/vector interface:
- removed New(len int) in favor of new(Vector).Resize(len, cap)
- removed Init(len int) in favor of Resize(len, cap)
- runs all.bash

Fixes #294.

R=rsc, r, r1
https://golang.org/cl/157143
2009-11-24 13:43:18 -08:00
Russ Cox
7c9acae2f1 godoc: plug file descriptor leak
R=gri
CC=r
https://golang.org/cl/157149
2009-11-24 13:21:14 -08:00
Michael Hoisie
9da8d88499 A quick fix to ensure that json.Marshal returns errors correctly, as well as some error-related tests
R=rsc
https://golang.org/cl/157151
2009-11-24 13:18:44 -08:00
Russ Cox
5f484ec118 http: redirect to correct URL
R=r, r1
https://golang.org/cl/157154
2009-11-24 11:47:53 -08:00
Michael Elkins
b320cf5bf4 add Take, TakeWhile, Drop, DropWhile to exp/iterable
R=dsymonds1, rsc
https://golang.org/cl/156079
2009-11-24 11:31:11 -08:00
Rob Pike
c14e265c59 print error's string when panicking.
R=rsc
https://golang.org/cl/157156
2009-11-24 10:55:50 -08:00
Trevor Strohman
f586870ec2 Add benchmarks for commonly used routines.
R=rsc, r, r1
https://golang.org/cl/160046
2009-11-24 00:21:50 -08:00
Eden Li
a9d0da75f1 cgo translates empty function arguments into void instead of dying with 'unexpected type: ...'.
Fixes #162.

R=rsc
https://golang.org/cl/157147
2009-11-23 22:02:12 -08:00
Russ Cox
c95c27a91f json: expose map in generic representation
R=r, r1
https://golang.org/cl/157146
2009-11-23 18:11:00 -08:00
Chris Lennert
8ebd7f7167 Provides implementation of MD4 hashing algorithm.
See IETF RFC 1320, http://tools.ietf.org/html/rfc1320.
Fixes #279.

R=rsc
https://golang.org/cl/159051
2009-11-23 17:44:44 -08:00
Sergio Luis O. B. Correia
6fc820729e go: makes it build for the case $GOROOT has whitespaces
the bash scripts and makefiles for building go didn't take into account
the fact $GOROOT / $GOBIN could both be directories containing whitespaces,
and was not possible to build it in such a situation.

this commit adjusts the various makefiles/scripts to make it aware of that
possibility, and now it builds successfully when using a path with whitespaces
as well.

Fixes #115.

R=rsc, dsymonds1
https://golang.org/cl/157067
2009-11-23 17:32:51 -08:00
Sergio Luis O. B. Correia
2b1133ff86 cmd/cc: change getquoted() to accept whitespaces.
getquoted() currently checks for whitespaces and returns nil
if it finds one. this prevents us from having go in a path
containing whitespaces, as the #pragma dynld directives are
processed through the said function.

this commit makes getquoted() accept whitespaces, and this is
also needed for solving issue #115.

R=rsc
https://golang.org/cl/157066
2009-11-23 16:00:26 -08:00
Russ Cox
edf7485a6e gofmt -r: documentation and minor fixes
fix a few paren insertion bugs in the printer too.

R=gri, r
CC=golang-dev
https://golang.org/cl/157119
2009-11-23 15:44:27 -08:00
Vish Subramanian
9e95d970cc Fix crash in xml.Unmarshal. Occasionally while running a scrape of some xml with many goroutines
I see a crash with the following stack trace:

	SIGSEGV: segmentation violation
	Faulting address: 0x44
	PC=0x44e510

	runtime·mapaccess2+0x18 /home/vish/go/src/pkg/runtime/hashmap.c:790
       	 runtime·mapaccess2(0x0, 0x0)
	xml·*Parser·text+0x922 /home/vish/go/src/pkg/xml/xml.go:765
       	 xml·*Parser·text(0xe44c9870, 0x7fa3, 0xffffffff, 0x7f00, 0x44b5c4, ...)
	xml·*Parser·RawToken+0x174 /home/vish/go/src/pkg/xml/xml.go:405
         xml·*Parser·RawToken(0xe44c9870, 0x7fa3, 0x0, 0x0)
	xml·*Parser·Token+0x625 /home/vish/go/src/pkg/xml/xml.go:205
       	 xml·*Parser·Token(0xe44c9870, 0x7fa3, 0x0, 0x0, 0x0, ...)
	xml·*Parser·Skip+0x27 /home/vish/go/src/pkg/xml/read.go:371
       	 xml·*Parser·Skip(0xe44c9870, 0x7fa3, 0x8, 0x0)
	xml·*Parser·unmarshal+0xae6 /home/vish/go/src/pkg/xml/read.go:328
       	 xml·*Parser·unmarshal(0xe44c9870, 0x7fa3, 0xe8127120, 0x7fa3, 0xdc94bc40, ...)
	xml·Unmarshal+0xda /home/vish/go/src/pkg/xml/read.go:121
       	 xml·Unmarshal(0xe65724b0, 0x7fa3, 0xdc94bc00, 0x7fa3, 0x4bcfc0, ...)
	scraper·DoSearch+0x3d1 /home/vish/my-go-src/google3/experimental/users/vish/go_http/scraper.go:95
       	 scraper·DoSearch(0xe7dc28c0, 0x7fa3, 0x33, 0x3, 0x6d2510, ...)
	main·scrapeQueries+0x202 /home/vish/my-go-src/google3/experimental/users/vish/go_http/scrape.go:251
       	 main·scrapeQueries(0xe7da2600, 0x7fa3, 0x64, 0x1db0, 0xe7e10000, ...)
	goexit /home/vish/go/src/pkg/runtime/proc.c:135
       	 goexit()
	0x7fa3e7da2600 unknown pc

	Clearly xml.Parser is accessing an uninitialized map. Add a check for a nil map before accessing it.

R=r, rsc
https://golang.org/cl/159050
2009-11-23 14:26:30 -08:00
Russ Cox
e69f12ae1d two more if(h<0) that gcc 4.3 -O2 miscompiles
R=r
https://golang.org/cl/160044
2009-11-23 14:23:14 -08:00
Russ Cox
b90f673290 io.ReadWriter: fix doc comment (ReadWrite -> ReadWriter)
R=r
CC=eds
https://golang.org/cl/160045
2009-11-23 14:22:56 -08:00
Rob Pike
3b7f552fbb fix bug in prefix code: must stop one character before any potential match of an empty string
Fixes #308.

R=rsc
CC=golang-dev
https://golang.org/cl/157142
2009-11-23 14:06:21 -08:00
Rob Pike
b050a1b223 Fix doc striing for NewReadLogger.
Fixes #315.

R=rsc
https://golang.org/cl/157140
2009-11-23 13:51:10 -08:00
Russ Cox
dc30800c28 8g: call throwindex for array out of bounds
R=ken2
https://golang.org/cl/160043
2009-11-23 12:58:28 -08:00
Adam Langley
6e0842db8b crypto/tls: add initial client implementation.
R=rsc, agl
CC=golang-dev
https://golang.org/cl/157076
2009-11-21 15:53:03 -08:00
Russ Cox
28e392d4bd gofmt: add -r flag to rewrite source code according to pattern
a little slow, but usable (speed unchanged when not using -r)

tweak go/printer to handle nodes without line numbers
more gracefully in a couple cases.

R=gri
https://golang.org/cl/156103
2009-11-20 15:09:54 -08:00
William Josephson
1444f1bb1d Missed a reference to sc instead of mc in 157065.
R=rsc, dho
https://golang.org/cl/157116
2009-11-20 13:46:47 -08:00
Devon H. O'Dell
7ada6018a7 FreeBSD's mcontext isn't exactly the same as sigcontext, so
we can't use them interchangably.

R=rsc, wjosephson
CC=golang-dev
https://golang.org/cl/156113
2009-11-20 13:08:16 -08:00
Robert Griesemer
7763345379 Support for basic try-catch style exception handling.
Meant as illustration of the Go pattern that is using
goroutines and channels to handle exceptional situations.

Note: There is no need for "Finally" since the
"try block" (the function f supplied to Try)
cannot do a Smalltalk-style non-local return
and terminate the function surrounding Try.

Replaces CL 157083.

R=r, rsc
https://golang.org/cl/157087
2009-11-20 11:50:11 -08:00
Russ Cox
9ac4449cb2 gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
R=r, gri
CC=golang-dev
https://golang.org/cl/156115
2009-11-20 11:45:05 -08:00
Russ Cox
aa4c638b7b x[y:] for strings
R=ken2
https://golang.org/cl/157114
2009-11-20 11:42:28 -08:00
Rob Pike
3e8bb54c2f fix build
R=rsc
https://golang.org/cl/159044
2009-11-20 11:26:40 -08:00
Rob Pike
d324a851c4 slight simplification made possible by the code now processing match states
in order of discovery.

R=rsc
https://golang.org/cl/157112
2009-11-20 11:16:57 -08:00
Rob Pike
542e5b8ade add unimplemented %+ and % (space) flags to floating-point print.
fix %E: was same as %e.
add tests.

Fixes #278.

R=rsc
CC=golang-dev
https://golang.org/cl/157111
2009-11-20 11:04:51 -08:00
Russ Cox
652f55672d x[lo:] - gc and runtime.
* add runtime sliceslice1 for x[lo:]
  * remove runtime arraytoslice, rewriting &arr into arr[0:len(arr)].
  * port cgen_inline into 8g, 5g.
  * use native memmove in maps

R=ken2
https://golang.org/cl/157106
2009-11-20 09:11:46 -08:00
Russ Cox
9bc6a404d5 cgo: allow .so in subdirectories
R=r
https://golang.org/cl/157103
2009-11-20 00:31:03 -08:00
Rob Pike
c62069cc1f add a match arena to regexp to avoid generating garbage.
simple regexps run 20x faster.
the regex-dna benchmark goes 3x faster.

R=rsc
CC=golang-dev
https://golang.org/cl/156108
2009-11-19 23:12:01 -08:00
Eden Li
b30f753dc3 cgo now renders types with unknown size as [0]byte instead of raising a
fatal error.
Fixes #126.

R=rsc
https://golang.org/cl/157101
2009-11-19 22:09:01 -08:00
Russ Cox
6e0767bb04 reflect fixes
R=r
https://golang.org/cl/156104
2009-11-19 22:06:32 -08:00
Russ Cox
7fce5ad011 fix arm build.
once more with feeling.

TBR=kaib
https://golang.org/cl/157100
2009-11-19 21:16:26 -08:00
James Meneghello
bfbb31595b Map support for template.Execute().
Allows the developer to pass a map either by itself for
evaluation, or inside a struct. Access to data inside
maps is identical to the current system for structs, ie.

-Psuedocode-

mp map[string]string = {
	"header" : "A fantastic header!",
	"footer" : "A not-so-fantastic footer!",
}
template.Execute(mp)

...can be accessed using {header} and {footer} in
the template. Similarly, for maps inside structs:

type s struct {
	mp map[string]string,
}
s1 = new s
s1.mp["header"] = "A fantastic header!";
template.Execute(s1)

...is accessed using {mp.header}. Multi-maps, ie.
map[string](map[string]string) and maps of structs
containing more maps are unsupported, but then, I'm
not even sure if that's supported by the language.

Map elements can be of any type that can be written
by the formatters. Keys should really only be strings.

Fixes #259.

R=r, rsc
https://golang.org/cl/157088
2009-11-19 21:08:05 -08:00
Michael Hoisie
ce88bfa585 Add json.Marshal to json package
R=rsc
CC=golang-dev
https://golang.org/cl/157068
2009-11-19 20:45:03 -08:00
Evan Shaw
4db3a166b2 archive/tar: Make Reader and Writer more closely follow io.Reader and io.Writer interfaces
There's no functional change here. io gives the Read and Write methods byte slice arguments, but tar called them uint8. It's the same thing, but I think this is clearer and it matches what other packages do.

R=rsc
CC=golang-dev
https://golang.org/cl/157099
2009-11-19 20:43:30 -08:00
Russ Cox
ec30932124 big: fix arm build - forgot how to spell JMP
Fixes #269.

TBR=kaib
https://golang.org/cl/156107
2009-11-19 20:32:09 -08:00
Russ Cox
d116a32727 gc: reject large channel values at compile time
Fixes #144.

R=ken2
CC=agl1
https://golang.org/cl/156102
2009-11-19 18:20:06 -08:00
Rob Pike
a6e1ad2733 two easy optimizations for regexp:
1) if char class contains a single character, make it a single character.
		(this is used to quote, e.g. [.] rather than \.
	2) if regexp begins with ordinary text substring, use plain string match to start engine

R=rsc
CC=golang-dev
https://golang.org/cl/157095
2009-11-19 16:45:50 -08:00
Robert Griesemer
398927e63b update test.sh for gofmt
R=rsc
https://golang.org/cl/157096
2009-11-19 16:42:49 -08:00
Robert Griesemer
b48f71213a Permit omission of hi bound in slices.
R=r, rsc
https://golang.org/cl/157082
2009-11-19 16:42:05 -08:00
Trevor Strohman
61660adc63 Adds benchmark support to gotest.
No benchmarks are run unless the --benchmarks=<regexp> flag
is specified on the gotest command line.  This change includes
sample benchmarks for regexp.

% gotest --benchmarks=.*
(standard test output redacted)
testing.BenchmarkSimpleMatch	200000	      7799 ns/op
testing.BenchmarkUngroupedMatch	20000	     76898 ns/op
testing.BenchmarkGroupedMatch	50000	     38148 ns/op

R=r, rsc
https://golang.org/cl/154173
2009-11-19 16:35:34 -08:00
Russ Cox
69039e5a5a build Make.deps during make.bash instead
of keeping a checked-in copy.  doesn't
slow down make.bash appreciably.

R=r
https://golang.org/cl/156099
2009-11-19 16:27:13 -08:00
Ken Thompson
d9014dc98a put copy into goyacc
R=rsc
https://golang.org/cl/156100
2009-11-19 15:34:11 -08:00
Rob Pike
4e201c7f20 os.ReadAt doesn't return EOF at EOF.
thanks to lionkov for the fix.

Fixes #262.

R=rsc
CC=golang-dev
https://golang.org/cl/156097
2009-11-19 11:51:23 -08:00
Russ Cox
4aaf948f90 runtime: mask signals during signal handler on OS X
Fixes #265.

R=r
CC=golang-dev
https://golang.org/cl/157084
2009-11-19 11:01:16 -08:00
Rob Pike
02df7db868 replace custom findByte with bytes.IndexByte
R=rsc
https://golang.org/cl/156093
2009-11-18 19:58:32 -08:00
Adam Langley
bf1f63a273 big: fix large division.
I missed a case.

R=rsc, agl
CC=golang-dev
https://golang.org/cl/156092
2009-11-18 19:26:12 -08:00
Rob Pike
8c1a627e5c add bytes.IndexByte; common case we can make fast later.
also pick off the special case in strings.Index.   don't want strings.IndexByte
because the call site will very rarely need to allocate and we can handle the
test in the code itself.   bytes.IndexByte can avoid a common allocation.

R=rsc
CC=golang-dev
https://golang.org/cl/156091
2009-11-18 19:23:08 -08:00
Russ Cox
e1c5c3df77 runtime: fix bug on darwin/amd64 - bad g in bsdthread_start
R=r
https://golang.org/cl/157077
2009-11-18 18:17:11 -08:00
Devon H. O'Dell
60b1a17b9e More FreeBSD-touchups. Thundercats are GOOOOO!
R=rsc
CC=golang-dev
https://golang.org/cl/157074
2009-11-18 16:51:59 -08:00
Adam Langley
eac41e7eba crypto/x509: RawContents -> RawContent
TBR=rsc

R=rsc
https://golang.org/cl/157075
2009-11-18 16:38:30 -08:00
Adam Langley
3ab331ed29 asn1: add support for RawContent
R=rsc
CC=golang-dev
https://golang.org/cl/157056
2009-11-18 16:32:44 -08:00
Adam Langley
cc56fc3860 crypto/x509: add certificate support.
R=rsc
CC=golang-dev
https://golang.org/cl/156054
2009-11-18 16:08:24 -08:00
Russ Cox
dc43b74eb1 6l, 8l: add trivial hash table for dynamic symbols
R=r
https://golang.org/cl/156085
2009-11-18 15:58:44 -08:00
Rob Pike
e70cedfaec remove bytes.Copy
replace all calls with calls to copy
use copy in regexp and bytes.Buffer

R=rsc
CC=golang-dev
https://golang.org/cl/157073
2009-11-18 15:24:24 -08:00
Rob Pike
093493c6a5 bugs in memmove:
- has arguments (no stack split)
	- MOVL does not set condition

R=ken2, rsc
https://golang.org/cl/156086
2009-11-18 15:00:02 -08:00
Russ Cox
9be56adf3c gc: allow implicit conversion of *[10]int -> []int
when used as arg to copy.

R=ken2
https://golang.org/cl/157071
2009-11-18 14:26:28 -08:00
Russ Cox
91cf0af181 ld: move interpreter string into first block of ELF file
necessary on freebsd.

R=r, dho
CC=golang-dev
https://golang.org/cl/157069
2009-11-18 13:51:05 -08:00
Rob Pike
7518613430 slicecopy was always using 16 (sizeof slice) for the size instead of size of element.
R=rsc
CC=ken2, golang-dev
https://golang.org/cl/156083
2009-11-18 13:43:48 -08:00
Adam Langley
ef8f483c60 net: remove race condition on Close.
Previously a netFd could be queued for reading/writing in the channel,
but close(2)'ed before pollServer got to it. In this case, the kernel
would consider the descriptor closed and the attempt to add it to the
epoll set would fail and panic.

This patch makes Close a roundtrip to the pollServer, although the
actual close(2) still occurs elsewhere to avoid blocking the
pollServer.

Fixes #143.

R=rsc
CC=golang-dev
https://golang.org/cl/152130
2009-11-18 13:18:34 -08:00
Eden Li
652bb7c2be Mangle C struct fields that happen to be named after Go keywords by prefixing them with _. Collisions with existing fields are resolved by prefixing the new Go identifier with _ until it matches nothing else in the struct.
Fixes #36.

R=rsc
https://golang.org/cl/157061
2009-11-18 09:59:10 -08:00
Russ Cox
a274099340 big: implement 386 assembly routines
7x speedup on big and crypto/rsa unit tests.
also dropped useAsm in favor of making the
asm stubs jump to the Go versions.

R=agl1
CC=golang-dev, gri
https://golang.org/cl/157062
2009-11-18 09:54:51 -08:00
William Josephson
4c0f262a2d Remove unnecessary execute bits.
R=rsc
https://golang.org/cl/156077
2009-11-18 09:19:29 -08:00
William Josephson
72e7444ad4 Missing flags for FreeBSD shared link as used by cgo in default build.
R=rsc
https://golang.org/cl/157065
2009-11-18 09:18:51 -08:00
Devon H. O'Dell
659780b643 Add an intptr type to runtime; needed in FreeBSD
In thread.c, we need to cast to whatever the native
size of intptr is on the system, but we only have
uintptr available. They're the same size, but can't
do signed casts without this one :).

R=rsc
CC=golang-dev
https://golang.org/cl/156073
2009-11-18 09:11:39 -08:00
Devon H. O'Dell
b3f538a4fd FreeBSD/i386 work
This patchset gets Go to pretty much the same state that
FreeBSD/amd64 is in.

R=rsc
https://golang.org/cl/157055
2009-11-17 23:58:51 -08:00
Eden Li
2115f514d0 cgo no longer translates function args that are void* into
unsafe.Pointer.
Fixes #254.

R=rsc
https://golang.org/cl/157060
2009-11-17 23:42:21 -08:00
Russ Cox
744d5ae48a runtime: add ARM memmove
R=ken2
https://golang.org/cl/156063
2009-11-17 22:54:20 -08:00
Russ Cox
ed0beea27b copy tweaks
* move memmove to arch-specific subdirectories
  * add memmove for arm
  * add copyright notices marking them as copied from Inferno

R=ken2
https://golang.org/cl/156061
2009-11-17 22:16:55 -08:00
Rob Pike
ea5cc6c021 add a test for %+v in nested structures.
threw in an embedded one for good measure.

R=rsc
CC=golang-dev
https://golang.org/cl/157058
2009-11-17 22:14:34 -08:00
Ken Thompson
01c2de0c15 allow copy to be used without a return value
R=rsc
https://golang.org/cl/156060
2009-11-17 22:00:59 -08:00
Russ Cox
41554e2528 runtime: two trivial but important bug fixes
R=r
https://golang.org/cl/156059
2009-11-17 22:00:30 -08:00
Ken Thompson
948f3e77e1 bug in copy
R=rsc
https://golang.org/cl/156056
2009-11-17 20:44:35 -08:00
Ken Thompson
c4606d05da install copy predefined
did not test 386, but should work
shouldnt matter if copy is not used

R=rsc
https://golang.org/cl/156055
2009-11-17 20:41:44 -08:00
Adam Langley
a8ba40823c crypto/rsa: add PKCS#1 v1.5 signature support.
R=rsc
CC=golang-dev
https://golang.org/cl/156051
2009-11-17 18:21:47 -08:00
Adam Langley
80b7f6a8d4 asn1:
* add Marshal
  * add BitString.RightAlign
  * change to using a *time.Time (from time.Time) since that's what
    the time package uses.
  * return the unparsed data from Unmarshal.

R=rsc
CC=golang-dev
https://golang.org/cl/156047
2009-11-17 18:09:41 -08:00
Russ Cox
1dbd3c8d3d reflect: document that PkgPath and Name return
empty string for unnamed types.

Fixes #249.

R=r
https://golang.org/cl/156052
2009-11-17 16:03:14 -08:00
Russ Cox
849e6f99b8 http: do not crash accessing r.Form if ParseForm fails
Fixes #233.

R=dsymonds1
https://golang.org/cl/154179
2009-11-17 14:45:10 -08:00
Russ Cox
4dfd7fdde5 runtime: do not create new threads during malloc.
the signal handling stack is a different size than
	the normal stack, so it cannot be allocated using
	the backup stack allocator.

Fixes #250.

R=agl1
CC=golang-dev
https://golang.org/cl/157044
2009-11-17 14:42:08 -08:00
Ken Thompson
26b55e44d9 fix botch
R=rsc
https://golang.org/cl/157046
2009-11-17 14:11:50 -08:00
Ken Thompson
8a6da2f6a0 change a n^2 algorithm in
data initialization to n*log(n)

R=rsc
https://golang.org/cl/158041
2009-11-17 13:59:38 -08:00
Rob Pike
6240b0110a improve documentation of runtime. there was no mention of types.
R=rsc
CC=golang-dev
https://golang.org/cl/157042
2009-11-17 11:44:15 -08:00
Aron Nopanen
c51ee432d1 Make non-errored RPC calls return 'nil' error to caller.
Error information is carried from RPC server to client in the string
'Error' field of rpc.Response. An empty string is sent in the success
case. This empty string was being returned to the caller (of Client.Call
or Client.Go), resulting in a non-nil error response.

This change detects an empty-string Response.Error at the client, and
translates it into a nil value in Call.Error.

Tests updated to check error return in success cases.

R=r, rsc
https://golang.org/cl/154159
2009-11-17 11:29:02 -08:00
Sergio Luis O. B. Correia
bae4f5085e cmd/cc: Fix -I switch to handle a path with blankspaces correctly
Currently, -I switch can't deal with a path containing spaces.
This commit simplify setinclude(), by removing the special case
of a string that had spaces. After this change, setinclude() will
merely add the given directories to the include path, if it does
not yet exist, and this approach works.

Will be needed for solving issue 115.

R=agl1, rsc, iant2, r
https://golang.org/cl/155059
2009-11-17 09:02:47 -08:00
Russ Cox
b4586a7429 math: fix argument names in Atan2
(error introduced converting from arg1, arg2)

Fixes #220.

R=r
https://golang.org/cl/156041
2009-11-17 08:39:56 -08:00
Russ Cox
c0e1ccf3ff Make.pkg: have "make coverage" invoke 6cov with correct binary
Fixes #239.

R=r
https://golang.org/cl/154176
2009-11-17 08:39:26 -08:00
Russ Cox
6e788e0f0f net: enforce timeouts for ReadFrom/WriteTo
Fixes #153.

R=r
https://golang.org/cl/154177
2009-11-17 08:39:17 -08:00
Russ Cox
a65bf95dd8 syscall: use correct pointer in recvfrom/sendto.
linux/386 stack trace: use 32-bit hex.

Fixes #159.

R=r
https://golang.org/cl/154178
2009-11-17 08:39:04 -08:00
Devon H. O'Dell
0489a260da FreeBSD-specific porting work.
cgo/libmach remain unimplemented. However, compilers, runtime,
and packages are 100%. I still need to go through and implement
missing syscalls (at least make sure they're all listed), but
for all shipped functionality, this is done. Ship! ;)

R=rsc, VenkateshSrinivas
https://golang.org/cl/152142
2009-11-17 08:20:58 -08:00
Rob Pike
30b1b9a36a Rework gobs to fix bad bug related to sharing of id's between encoder and decoder side.
Fix is to move all decoder state into the decoder object.

Fixes #215.

R=rsc
CC=golang-dev
https://golang.org/cl/155077
2009-11-16 23:32:30 -08:00
Rob Pike
50c04132ac fix bug causing empty strings to be become non-nil errors on client side of rpc connection.
R=rsc
CC=golang-dev
https://golang.org/cl/155078
2009-11-16 23:32:16 -08:00
Russ Cox
597b2a91a6 runtime: make signal handler work on 386
R=r
https://golang.org/cl/154171
2009-11-16 17:51:47 -08:00
Russ Cox
1ee83f851d gc: change "can we const evaluate this" from blacklist to whitelist
R=ken2
https://golang.org/cl/155074
2009-11-16 17:40:47 -08:00
Russ Cox
44e51fad28 6l: fix divide by zero in glibc linker.
repeats 8l change http://code.google.com/p/go/source/detail?r=7594e16b5cf9

Fixes #179.

R=iant
https://golang.org/cl/154145
2009-11-16 17:40:03 -08:00
Adam Langley
1cdfe9fa28 unsafe: documentation typo.
Fixes #236.

R=r
CC=golang-dev
https://golang.org/cl/155072
2009-11-16 15:39:04 -08:00
Robert Griesemer
e86afaf456 Don't emit line tags when source code is printed as part of
package documentation using templates. The line tag interferes
with the anchor tag introduces by the template.

This fixes an an issue where some headers lost their ability
to link to the respective source code.

R=rsc
https://golang.org/cl/154166
2009-11-16 14:26:29 -08:00
David Symonds
affcfe5a75 Add some primitive type aliases to exp/iterable and define Iter on them.
R=rsc
https://golang.org/cl/155065
2009-11-16 13:39:59 -08:00
David G. Andersen
37f71e8ad6 An asked-for-in #go-nuts extension to quickly create a repeated
copy of a string or a byte array.
        strings.Repeat("-", 50)
	bytes.Repeat(b, 99)

R=rsc
https://golang.org/cl/155063
2009-11-16 12:40:01 -08:00
Kai Backman
c3cf8d663a s/AJMP/AB/ to fix build breakage.
R=rsc
https://golang.org/cl/155069
2009-11-16 11:58:28 -08:00
Russ Cox
ef46a9ddac gc: fix up floating point NaN comparisons
Fixes #167.

R=ken2
https://golang.org/cl/155062
2009-11-15 17:24:14 -08:00
Adam Langley
391e082ca9 crypto/md5: fix comment typo.
Fixes #210.

R=rsc
CC=golang-dev
https://golang.org/cl/155057
2009-11-15 14:00:46 -08:00
Russ Cox
39f64bed52 godefs: avoid gcc 4'isms in command line.
Fixes #97.

R=r
https://golang.org/cl/155054
2009-11-15 12:57:39 -08:00
Russ Cox
cc3524fb06 makefiles: use correct gcc order in case --as-needed is in use.
Suggested by eostapets.
Fixes #141.

R=r
https://golang.org/cl/155049
2009-11-15 12:57:28 -08:00
Russ Cox
0238fd836f cgo: arrange for English error messages
Fixes #21.

R=r
https://golang.org/cl/155048
2009-11-15 12:57:21 -08:00
Russ Cox
091191336a runtime: avoid crash in Caller
Fixes #176.

R=r
https://golang.org/cl/154146
2009-11-15 12:57:15 -08:00
Russ Cox
a338231526 gc: five bug fixes, one better error.
* check for struct literal assignment to private fields.
* record, fix crash involving parallel map assignment.
* avoid infinite recursion in exportassignok.
* make floating point bounds check precise.
* avoid crash on invalid receiver.

* add context to error about implicit assignment.

Fixes #86.
Fixes #88.
Fixes #158.
Fixes #174.
Fixes #201.
Fixes #204.

R=ken2
https://golang.org/cl/154144
2009-11-15 12:57:09 -08:00
Russ Cox
a967f57d19 http.URLEscape: escape all bytes required by RFC 2396
Fixes #125.

R=r
https://golang.org/cl/154143
2009-11-15 12:56:50 -08:00
Russ Cox
2a6bb2c63e gotest: show the test file pattern in "no test files" error
Fixes #190.

R=r
https://golang.org/cl/154142
2009-11-15 12:56:39 -08:00
Rob Pike
27779dd6cb fix bug in bytes.Map and add test cases for Map in both strings and bytes packages.
thanks to ulrik.sverdrup for the test case.

Fixes #191.

R=rsc
CC=golang-dev
https://golang.org/cl/155056
2009-11-15 12:07:27 -08:00
Russ Cox
b18bee948e cc: drop redundant strcpy
Fixes #192.

R=ken2
https://golang.org/cl/155047
2009-11-15 00:00:05 -08:00
Russ Cox
139a053733 cc: eliminate two fixed-size buffers
Fixes bug 168.
Alternative to https://golang.org/cl/152143.

R=ken2
https://golang.org/cl/155042
2009-11-14 23:25:55 -08:00
Kai Backman
529216fa83 complain if GOARCH != arm. fix build break caused by gomake
introduction.

R=rsc
https://golang.org/cl/152109
2009-11-14 23:08:22 -08:00
Adam Langley
ad05d29103 crypto/rsa: handle the case of non-coprime blinds.
We are dealing with the multiplicative group ℤ/pqℤ. Multiples of
either p or q are not members of the group since they cannot have an
inverse. (Such numbers are 0 in the subgroup ℤ/pℤ.)

With p and q of typical size (> 512 bits), the probability of a random
blind [1..pq-1] being a multiple of p or q is negligible. However, in
the unit tests, much smaller sizes are used and the event could occur.

This change checks the result of the ext GCD and deals with this case.

It also increases the size of p and q in the unit test as a large
number of the keys selected were p, q = 227,169.

R=rsc
CC=golang-dev
https://golang.org/cl/154141
2009-11-14 20:38:00 -08:00
Devon H. O'Dell
553be8427e Build changes to support work on the BSDs.
This does still contain some FreeBSD-specific bits, but
it's a pain to do partial diffs.

R=rsc
https://golang.org/cl/152138
2009-11-14 15:29:09 -08:00
Môshe van der Sterre
a54684f8da encoding/binary: implemented the Write function
The ByteOrder.Put* methods are already available, this change uses
them to implement the Write function.

R=golang-dev, agl1, rsc, r
https://golang.org/cl/152141
2009-11-14 14:42:22 -08:00
Russ Cox
4b13d1b9b5 gc: do not try to constant-evaluate (interface{})("bar")
Fixes #183.

R=ken
https://golang.org/cl/154139
2009-11-14 14:14:27 -08:00
Rob Pike
0263103a05 move evaluation of null-matching instructions one iteration earlier.
performance hit of about 20% but more intuitive results for submatches.
we need a good regexp package at some point.

Fixes #110.

R=rsc
CC=golang-dev
https://golang.org/cl/152131
2009-11-14 12:23:24 -08:00
Abhinav Gupta
bad9738be6 xml: Fixed CDATA parsing.
Fixes #128.

R=r, rsc
https://golang.org/cl/154126
2009-11-14 11:46:09 -08:00
Russ Cox
933d1850ce typos
Fixes #171.
Fixes #172.

R=agl1
https://golang.org/cl/154136
2009-11-14 10:28:53 -08:00
David Titarenco
aebae2577a Created new Conn.Flush() public method so the fd pipeline can be drained arbitrarily by the user.
Commented both flush methods so people know what they are looking at.

This is a necessary fix for streaming and long polling HTTP services.
Fixes #93.

R=r, rsc, david.titarenco
https://golang.org/cl/154099
2009-11-13 18:06:47 -08:00
Nigel Tao
75829b3c51 Remove unnecessary int(h) casts in image.go.
R=rsc
https://golang.org/cl/154125
2009-11-13 17:40:20 -08:00
Adam Langley
a070722340 json: minor comment fix.
I screwed up and didn't write one of the code review changes to disk
before submitting.

TBR=rsc

R=rsc
https://golang.org/cl/154122
2009-11-13 14:59:04 -08:00
Rob Pike
f9919ba323 Explain why
-flag true
does not work although
	-flag=true
does.

Fixes #139.

R=iant
CC=golang-dev
https://golang.org/cl/154118
2009-11-13 13:15:18 -08:00
Adam Langley
bccc337084 json: allow one to unmarshal a top-level JSON array.
Fixies issue 114.

R=rsc
CC=golang-dev
https://golang.org/cl/154121
2009-11-13 13:00:45 -08:00
Russ Cox
e7b8f5faca path.TestWalk: disable error case if root
(chmod 0 doesn't cause errors for root)

Fixes #22.

R=gri
https://golang.org/cl/152120
2009-11-13 11:34:33 -08:00
Adam Langley
87bc9b53fd json: fix addressing of slice indexes that are multiples of 8.
Fixes #147.

R=rsc
CC=golang-dev
https://golang.org/cl/152123
2009-11-13 11:29:13 -08:00
Adam Langley
3f7a32405d runtime: warn about SELinux based mmap failures on Linux.
SELinux will cause mmap to fail when we request w+x memory unless the
user has configured their policies. We have a warning in make.bash,
but it's quite likely that the policy will be reset at some point and
then all their binaries start failing.

This patch prints a warning on Linux when mmap fails with EACCES.

R=rsc
CC=golang-dev
https://golang.org/cl/152086
2009-11-13 10:08:51 -08:00
Russ Cox
593ccd1d44 yet another attempt to avoid conflicts with
<stdio.h>, which we weren't even #including

R=r
https://golang.org/cl/154108
2009-11-12 23:38:48 -08:00
Rob Pike
845276ae68 remove dead code from test
R=rsc
CC=golang-dev
https://golang.org/cl/152118
2009-11-12 23:35:45 -08:00
Rob Pike
00093011e6 sudo.bash tries to install acid and db, which don't exist any more
R=rsc
CC=golang-dev
https://golang.org/cl/152117
2009-11-12 23:19:12 -08:00
Robert Griesemer
511772c888 Remove -align flag from gofmt.
(Making it work correctly with -spaces is a bit of work and the output
won't make much sense as it is intended as input to tabwriter.)
Fixes #100.

R=rsc
https://golang.org/cl/154102
2009-11-12 18:26:45 -08:00
Kai Backman
a23746ea65 fix style nit ignored in previous cl
R=rsc
https://golang.org/cl/152110
2009-11-12 16:12:28 -08:00
Kai Backman
6a48aab747 add support for pre arm v6 cas. set GOARM=5 to enable.
R=rsc
https://golang.org/cl/154101
2009-11-12 15:23:23 -08:00
Russ Cox
b0c7d68052 os.TestSeek: use a smaller but still 64-bit seek offset.
Might fix issue 91.

R=r
https://golang.org/cl/152108
2009-11-12 14:55:04 -08:00
Rob Pike
ce0a4bae41 produce helpful error when gotest doesn't find a Makefile
Fixes #117.

R=rsc, agl1
CC=golang-dev
https://golang.org/cl/152107
2009-11-12 14:28:45 -08:00
Adam Langley
454c621d91 exp/draw: correct Makefile.
Thanks to Allister Macleod

Fixes #112.

R=rsc
CC=golang-dev
https://golang.org/cl/152102
2009-11-12 13:55:20 -08:00
Russ Cox
6634e3432d cc, ld: fix more gcc 4.3 -O2 compile bugs
same as https://golang.org/cl/152088
in more files.

Fixes #83.

R=r, r1
https://golang.org/cl/152091
2009-11-12 00:22:45 -08:00
Kai Backman
6dbd142951 add cache flushing call after generating closure.
go/test: passes 88% (306/347)

R=rsc
https://golang.org/cl/152089
2009-11-11 23:23:11 -08:00
Russ Cox
e5636d6e27 avoid seg fault when return type is unknown
Fixes #80.

R=ken
https://golang.org/cl/154079
2009-11-11 22:20:05 -08:00
Russ Cox
8b95720918 gopack: work around gcc bug in hash function
Fixes #48.  (this time for sure!)

R=r, r1
https://golang.org/cl/152088
2009-11-11 22:19:58 -08:00
David Symonds
9e829c42d6 Fix capitalisation of "Git".
R=rsc
https://golang.org/cl/154071
2009-11-11 17:31:28 -08:00
Robert Griesemer
23843fa49e vector: s/Element/interface{}/
Fixes #74.

R=rsc
https://golang.org/cl/154073
2009-11-11 17:25:51 -08:00
Adam Langley
3b092fec36 json: support \u escaping in strings
Fixes #73.

R=rsc
CC=golang-dev
https://golang.org/cl/154072
2009-11-11 17:13:14 -08:00
Russ Cox
ae3341476d cgo: add more information about gcc output parsing failures
R=r
https://golang.org/cl/152084
2009-11-11 16:58:27 -08:00
Russ Cox
c3343ef62c fix BUFSIZ redeclaration warnings
R=r
https://golang.org/cl/152085
2009-11-11 16:33:23 -08:00
Russ Cox
2cda46dc82 fix TestRemoveAll again (tested as root this time).
Fixes #22.

R=r
https://golang.org/cl/154069
2009-11-11 15:48:38 -08:00
Adam Langley
2643f742a5 make.bash: detect and warn about SELinux policy that crashes us.
The default SELinux policy on Fedora 12 (at least) disallows stack
pages to be +x. This causes all binaries written by 6g/6l to segfault
immedately. The 'true' way to fix this issue is to mark binaries with
the correct type. However, that assumes that 6l is going to detect
SELinux, figure out the correct type for the current distribution and
set the type (without libselinux).

For now we'll warn users and point them towards the way to enable
execstack for the whole system.

http://code.google.com/p/go/issues/detail?id=47

R=rsc
CC=golang-dev
http://codereview.prom.corp.google.com/1026041
2009-11-11 15:02:15 -08:00
Russ Cox
f07a9e43e8 os test: do not use symlink > 255 bytes.
Fixes #62.

R=r
https://golang.org/cl/152080
2009-11-11 14:52:29 -08:00
Russ Cox
ae39a1d8ec cc: correct handling of allocn(0, 1, d)
Fixes #29.

R=r
https://golang.org/cl/152076
2009-11-11 14:52:21 -08:00
Russ Cox
d38630fe3d gotest: add LC_ALL=C
R=r
https://golang.org/cl/154067
2009-11-11 14:52:15 -08:00
Russ Cox
e9ac56fb99 getc/ungetc in assemblers; BUFSIZ everywhere.
Fixes #67.

R=r
https://golang.org/cl/154068
2009-11-11 14:52:08 -08:00
Russ Cox
a174987a7c two gopack nits.
1. allocate an extra byte for use by write.
2. throw away the code trying to translate
   uid and gid to names.  i suspect it of causing
   seg faults in some situations, and it is
   not needed by the compilers.

Fixes #48.  (I hope.)

R=r
https://golang.org/cl/152077
2009-11-11 14:48:33 -08:00
Adam Langley
9188b1f000 Revert make.bash which slipped into the previous revision.
R=rsc
http://codereview.prom.corp.google.com/1024051
2009-11-11 13:30:47 -08:00
Adam Langley
1941855730 Reland a112249da741, this time with missing file. 2009-11-11 13:21:37 -08:00
Russ Cox
8c3d2f015b avoid clash with stdio's getc, ungetc.
Fixes #50.

R=r
https://golang.org/cl/154064
2009-11-11 13:08:35 -08:00
Russ Cox
8515a9f4e2 log test: don't assume a fixed set of letters for $GOROOT
Fixes #27.

R=r
https://golang.org/cl/152075
2009-11-11 13:07:46 -08:00
Russ Cox
ed86d0e70a roll back 3985: build is broken
TBR=agl1
CC=golang-dev
https://golang.org/cl/154065
2009-11-11 12:54:52 -08:00
Adam Langley
af1fa43a81 big:
Turn methods that don't store the result in their receiver into
    functions in order to preserve the convention.
  Re-jig Exp and Div by moving their guts into nat.go.
  Add ProbablyPrime to perform Miller-Rabin primality tests.
crypto/rsa: reenable key generation since we now have ProbablyPrime.

R=gri
CC=go-dev
http://codereview.prom.corp.google.com/1024038
2009-11-11 12:34:46 -08:00
Russ Cox
384932589d work with GNU Make 3.80
Fixes #30.

R=r1, r
https://golang.org/cl/154061
2009-11-11 12:00:50 -08:00
Russ Cox
7932950844 gc: increase maximum path size in getwd from 100 to 1000.
Fixes #31.

To try the fix before the next release:
	hg pull -u

R=r1, r
https://golang.org/cl/154058
2009-11-11 12:00:41 -08:00
Russ Cox
1971e1bd21 os: do not test error case of TestRemoveAll when root
Fixes #22.

R=r1, r
https://golang.org/cl/152073
2009-11-11 12:00:34 -08:00
Russ Cox
364e564e3d use fully qualified names for hash interfaces
Fixes #38.

R=r1, r
https://golang.org/cl/152072
2009-11-11 12:00:15 -08:00
Adam Langley
5281869fac gopack: convert long to time_t before taking a pointer.
Fixes #40.

R=rsc, r1
CC=golang-dev
https://golang.org/cl/154057
2009-11-11 11:19:33 -08:00
Russ Cox
cd0cbd3ed2 lib9: rip out platform specific code that breaks on pclinuxos
R=r
CC=golang-dev
https://golang.org/cl/154049
2009-11-10 23:42:21 -08:00
Russ Cox
fe1e49241c update old comment: things are much better now
R=r
https://golang.org/cl/152057
2009-11-10 19:59:22 -08:00
Russ Cox
9604f7b009 gotest: avoid problems with grepping for ·
Fixes #7.

R=r
CC=golang-dev
https://golang.org/cl/154043
2009-11-10 19:56:32 -08:00
Russ Cox
9ff712ecd1 make.bash: check $PATH indirectly via which quietgcc
R=agl1
CC=golang-dev
https://golang.org/cl/152056
2009-11-10 19:20:34 -08:00
Russ Cox
2d70d60392 sanity check environment variables better.
Fixes #12.

R=agl1
CC=golang-dev
https://golang.org/cl/152055
2009-11-10 19:12:22 -08:00
Russ Cox
92a9ddf0fa net: fix error for connect to /etc/ on some systems
R=agl1
CC=golang-dev
https://golang.org/cl/152051
2009-11-10 18:27:26 -08:00
Russ Cox
d6c388616b test for invalid $GOBIN setting before trying to build
R=r
CC=golang-dev
https://golang.org/cl/153049
2009-11-10 18:00:48 -08:00
Russ Cox
e23f75b3c4 net: disable more ipv6 tests
R=agl, agl1
CC=golang-dev
https://golang.org/cl/153050
2009-11-10 18:00:27 -08:00
Russ Cox
b4a8b353c4 net: disable ipv6 test if we know kernel won't take it.
R=agl, agl1
CC=golang-dev
https://golang.org/cl/153048
2009-11-10 17:47:38 -08:00
Russ Cox
9dba695692 net: disable dns error test
some dns resolvers (opendns, for example)
are willing to make up results for any name.

R=agl, agl1
CC=golang-dev
https://golang.org/cl/152049
2009-11-10 17:39:01 -08:00
Russ Cox
484f46daea net: fix dns bug reported on irc.
if suffixes don't work, check for name directly.
also fixes short names like bit.ly when ndots>1.

tested by tossing domain and search lines from /etc/resolv.conf

Fixes #2.

R=agl, agl1
CC=golang-dev
https://golang.org/cl/152048
2009-11-10 17:09:33 -08:00
Robert Griesemer
9e0d2fa89b better code for a copy loop
R=rsc
https://golang.org/cl/152046
2009-11-10 15:33:59 -08:00
Ken Thompson
c90d392ce3 spell it with an "e"
R=rsc
http://go/go-review/1025037
2009-11-10 15:05:15 -08:00
Robert Griesemer
b27f05f63b minor adjustments to package comments for better synopsis.
R=rsc
CC=r
http://go/go-review/1026038
2009-11-10 10:55:53 -08:00
Russ Cox
b351113b50 make regexp comment not a package comment
R=r
http://go/go-review/1025036
2009-11-10 09:36:48 -08:00
Russ Cox
cb94b60cfb allow user agent to mention Go.
R=r
http://go/go-review/1024046
2009-11-10 09:10:08 -08:00
Russ Cox
da776791c4 drop output from nilptr tests;
too hard to make it the same everywhere.
still checking for non-zero exit status though.

disable core files while running tests

R=r
http://go/go-review/1026037
2009-11-09 23:11:36 -08:00
Robert Griesemer
3d668c1b5d - minor cleanups
- better debugging support
- gofmt -l src misc | wc -l is 0

R=rsc
http://go/go-review/1024042
2009-11-09 22:30:07 -08:00
Robert Griesemer
3bb0032cd6 - replaced gofmt expression formatting algorithm with
rsc's algorithm
- applied gofmt -w misc src
- partial CL (last chunk)

R=rsc, r
http://go/go-review/1024041
2009-11-09 21:23:52 -08:00
Robert Griesemer
baba292998 - replaced gofmt expression formatting algorithm with
rsc's algorithm
	- applied gofmt -w misc src
	- partial CL (remaining files in other CLs)

R=rsc, r
http://go/go-review/1026036
2009-11-09 21:13:17 -08:00
Robert Griesemer
1698934194 - replaced gofmt expression formatting algorithm with
rsc's algorithm
- applied gofmt -w misc src
- partial CL (remaining files in other CLs)

R=rsc, r
http://go/go-review/1024040
2009-11-09 21:09:34 -08:00
Russ Cox
9f42ccb781 error rewording suggested by robert.
update comment.

R=ken
http://go/go-review/1025031
2009-11-09 15:25:18 -08:00
Robert Griesemer
92743615fb TBR:
fix typo that prevented function bodies from being indexed (ouch!)

R=rsc
http://go/go-review/1024035
2009-11-09 14:44:16 -08:00
Robert Griesemer
40621d5c0d remove semis after statements in one-statement statement lists
R=rsc, r
http://go/go-review/1025029
2009-11-09 12:07:39 -08:00
Russ Cox
18ccbc69f8 tweak documentation of commands
so that first sentence is better for cmd page.

live at http://r45:3456/cmd/

R=gri, r
http://go/go-review/1024034
2009-11-09 11:45:15 -08:00
Robert Griesemer
81672e79e4 - rename Context to exprContext to remove it from public interface
(and to match the style of declContext)

R=rsc
http://go/go-review/1024033
2009-11-09 10:37:36 -08:00
Robert Griesemer
53f485813e fix for nodeSize computation, used to determine if
a node fits on one line:
- for purposes of measuring the node size in text,
  don't generate html or use a styler that could
  generate html as it will lead to overly large
  sizes

A consequence of this bug is that source code displayed
with godoc may show functions that fit on one line in
the source on multiple lines.

This change causes no difference to the gofmt formatting
of any files in src or misc.

R=rsc
http://go/go-review/1026034
2009-11-09 09:34:55 -08:00
Robert Griesemer
aae64f8c81 - exit godoc w/o crashing if negative tabwidth is provided
- minor related cleanups

R=rsc
http://go/go-review/1025026
2009-11-08 23:42:00 -08:00
Robert Griesemer
d731dc8e72 Addressing issue brought up by dsymonds:
- When providing alternative spellings to a query, do not
  prefix it with a package qualifier as the suggestion may
  not have any results. Correctly filtering is quite a bit
  of work, and clicking the alternative spelling will always
  also show the qualified hits if they exist (but also others).
  Seems good enough for now.
- Give user feedback when the query syntax was wrong.
- Package names in search results are now links to the respective
  package documentation.
- Experimented with excluding main packages and test files
  from index with inconclusive results. Code is present and
  can be enabled by changing a flag in the source. This needs
  some more work.

R=rsc
CC=r, dsymonds
http://go/go-review/1026033
2009-11-08 23:34:08 -08:00
Russ Cox
71983af4a1 bug212, bug213.
R=ken
http://go/go-review/1026032
2009-11-08 23:22:06 -08:00
Rob Pike
e02f2b51c5 delete a pointless todo in all_test.go.
address one in rpc/client.go

R=rsc
CC=go-dev
http://go/go-review/1026030
2009-11-08 21:57:59 -08:00
Robert Griesemer
c532940ecf improved sentence extraction:
- don't forget first periods
- look at capitalization of last char before periods

R=rsc
http://go/go-review/1024027
2009-11-08 21:48:51 -08:00
Russ Cox
ed6eb5b577 a nagging inconsistency: capitalization of
HTML vs Html, URL vs Url, HTTP vs Http,
current source is 6:1 in favor of the former,
so change instances of the latter.

R=r
CC=go-dev
http://go/go-review/1024026
2009-11-08 21:46:20 -08:00
Russ Cox
830813f019 assorted cleanup
R=r, iant
CC=go-dev
http://go/go-review/1025024
2009-11-08 21:08:27 -08:00
Rob Pike
ceb6031ecd delete TODO now that compiler is better at %
adjust an inconsistency in reflect/type.go's package comment

R=rsc
http://go/go-review/1026029
2009-11-08 20:45:39 -08:00
Robert Griesemer
7837dbfcb8 use grouping instead of colors to show non-global search hits:
- introduced a new run per file containing all spots belonging
  to the same kind (e.g. var decl, const decl, etc.)
- more comments, better index.go file organization

R=rsc
http://go/go-review/1026028
2009-11-08 20:17:04 -08:00
Robert Griesemer
e8b580c9aa fix sentence extraction
R=rsc
http://go/go-review/1026027
2009-11-08 18:19:06 -08:00
Robert Griesemer
202ede1240 - properly align package synopses
(this was surprisingly hard to get right in HTML)
- show modification times in source directory listings
- various tweaks

R=rsc
http://go/go-review/1024024
2009-11-08 16:47:32 -08:00
Rob Pike
40a7db3ee9 add top-level package comments for net, reflect, malloc.
reflect is a little more detailed than some because it affords an opportunity
to explain how to approach the library.

R=gri, rsc
CC=go-dev
http://go/go-review/1026026
2009-11-08 15:57:25 -08:00
Robert Griesemer
56b4515740 added package documentation
R=r, rsc
http://go/go-review/1025023
2009-11-08 15:04:30 -08:00
Robert Griesemer
a011480ff3 TBR
1st step of renaming dirList.html -> dirlist.html
(OS X filenames are not capitalization-sensitive)

R=rsc
http://go/go-review/1024021
2009-11-08 00:51:08 -08:00
Robert Griesemer
89d0e2dbe3 - better support for text files: show them nicely formatted
instead of serving them raw
- path-related cleanups

R=rsc
http://go/go-review/1026021
2009-11-08 00:40:43 -08:00
Robert Griesemer
1a9805adcb - avoid division-by-zero crash in tabwriter
- correct tabwidth argument for some tabwriter test cases
- catch negative tabwidth flag in gofmt w/o crashing

R=rsc
http://go/go-review/1026022
2009-11-07 23:59:24 -08:00
Robert Griesemer
642caacfa3 - added link to sources
- renamed listing.html -> dirList.html
  (there is a dirs.html already, it should probably have a better name, too)

R=rsc
http://go/go-review/1025020
2009-11-07 21:24:48 -08:00
Robert Griesemer
171ef39949 nice directory listings
R=rsc
http://go/go-review/1026020
2009-11-07 21:12:46 -08:00
Vish Subramanian
379150c210 Add flags of type float to the flag package.
R=r, rsc
http://go/go-review/1026011
2009-11-07 15:52:27 -08:00
Robert Griesemer
1ac60ddd10 - support to extract one-line package synopsis for package listings
- formatting in dirs.html is crude, needs better html (open to suggestions),
  but shows the synopsis
- many package comments should probably be adjusted such that the first
  sentence is more concise

R=rsc, iant
http://go/go-review/1025014
2009-11-07 13:17:53 -08:00
Robert Griesemer
3317697df4 - blank before opening { for multi-line composite literals (as preferred by r)
- blank padding around composite literal contents for a less dense look
  (most if not all composite literals were written in that style before gofmt
  ran through them)
- corresponding (internal) flag: compositeLitBlank

- don't print a semi after a one-statement statement list (as preferred by r)
- corresponding (internal flag): fewerSemis

- the number of changes in nodes.go is huge because of the removed semis;
  hg mail requires that I gofmt the file before

With both flags set to false, this CL causes no gofmt formatting change. We
can turn them on if we like it (and then remove the flags). Will submit with
flags disabled.

R=rsc, r
http://go/go-review/1025015
2009-11-07 13:01:52 -08:00
David Symonds
6ea866c04b Typo fixes.
R=rsc
CC=go-dev
http://go/go-review/1026014
2009-11-06 18:43:57 -08:00
Ken Thompson
0eb2a79ff3 8g optimizer
R=rsc
http://go/go-review/1025011
2009-11-06 16:51:49 -08:00
Robert Griesemer
832ce7c1d2 format composite literal types that are "short" struct type literals
on one line for a more compact representation of some composite Literals

R=rsc
http://go/go-review/1025008
2009-11-06 16:34:19 -08:00
Robert Griesemer
a05a5465c8 - application of gofmt with one-line composite literal structs enabled
- this CL is dependent on CL 1025008

R=r, rsc
http://go/go-review/1025009
2009-11-06 16:33:53 -08:00
Robert Griesemer
368f8cbc75 - fine-tuning of one-line func heuristic (nodes.go)
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)

R=r, rsc
CC=go-dev
http://go/go-review/1026006
2009-11-06 14:24:38 -08:00
Robert Griesemer
5873598a97 updated godoc documentation
R=r
http://go/go-review/1026007
2009-11-06 14:00:49 -08:00
Kai Backman
fd7d803535 fix argument order bug for float
R=rsc
http://go/go-review/1025006
2009-11-06 13:51:17 -08:00
Kai Backman
de663b2d6b with rsc: argsize rounding to 8 smashes stack data on 32bit machines.
R=rsc
http://go/go-review/1024011
2009-11-06 13:50:58 -08:00
Adam Langley
db4e48ece9 big: fix carry error, add test case.
crypto/x509: reenable tests.

R=gri
CC=go-dev
http://go/go-review/1026004
2009-11-06 11:36:21 -08:00
Robert Griesemer
56eca9daed minor fixups by gofmt
R=agl
http://go/go-review/1024009
2009-11-06 11:00:06 -08:00
Adam Langley
ecf0690c01 crypto/x509: build fix for 32-bit
TBR=rsc

R=rsc
CC=go-dev
http://go/go-review/1024007
2009-11-06 09:23:40 -08:00
Adam Langley
17021f48f3 Fix add-back division test so that it triggers the add-back case on
both 64 and 32 bit platforms.

Also, uncomment some tests that were still commented out from
debugging.

R=gri, rsc
CC=go-dev
http://go/go-review/1026003
2009-11-06 09:05:19 -08:00
Kai Backman
52c549fc9b make 5g executables run on android/arm hardware. change OABI
usage to EABI.

        go/test: passes 85% (296/347) on random android phone.

R=rsc
http://go/go-review/1024003
2009-11-05 22:53:08 -08:00
Robert Griesemer
054354ebd4 gofmt src/cmd/goyacc
(with this change: gofmt -l src/cmd/ | wc
is 0 0 0)

R=ken, rsc
http://go/go-review/1024005
2009-11-05 22:29:29 -08:00
Robert Griesemer
79284cae32 gofmt'ed src/cmd
R=rsc
http://go/go-review/1024004
2009-11-05 22:25:46 -08:00
Robert Griesemer
07b6becc88 - fix elf.go manually so it is idempotent for gofmt
- with this change, `gofmt -l src/pkg | wc` is 0

R=rsc
http://go/go-review/1025002
2009-11-05 22:05:43 -08:00
Robert Griesemer
7151d2337b missing piece gofmt'ed in reflect
R=r, rsc
http://go/go-review/1025001
2009-11-05 18:27:30 -08:00
Robert Griesemer
45cba57e89 gofmt'ed more stragglers
R=rsc
http://go/go-review/1019004
2009-11-05 18:26:16 -08:00
Robert Griesemer
48b3156908 gofmt'ed big
R=agl
http://go/go-review/1022003
2009-11-05 18:25:23 -08:00
Robert Griesemer
7e92eedced gofmt'ed various stragglers
R=rsc
http://go/go-review/1022002
2009-11-05 18:24:53 -08:00
Robert Griesemer
183edddb9d gofmt'ed more stragglers
(now down to a handfull of files in pkg)

R=rsc
http://go/go-review/1019006
2009-11-05 18:24:24 -08:00
Robert Griesemer
0ea9dd815a gofmt the last outstanding files in src/pkg
- added a list of issues to printer/nodes.go

R=rsc
http://go/go-review/1024002
2009-11-05 18:14:47 -08:00
Robert Griesemer
39fd52d3a0 gofmt'ed missing regexp file
(one-line functions will be re-established once we have all
formatted uniformly)

R=r
http://go/go-review/1023004
2009-11-05 17:35:40 -08:00
Robert Griesemer
38006946e6 manual fix for better gofmt result
R=r
http://go/go-review/1019005
2009-11-05 17:27:02 -08:00
Robert Griesemer
8cd2e76404 - gofmt'ing of some stragglers, now with correct comment indentation
in special cases
- re-gofmt'ing of some files that are now improved

R=r, rsc
http://go/go-review/1023003
2009-11-05 17:02:55 -08:00
Robert Griesemer
6c13f8f10e fix a comment formatting bug:
- this ensures better comment formatting in template.go and codec_test.go
- it affects only 2 files of all files that have been gofmt'ed already,
  see separate CL (it fixes the same issue in those files)

R=rsc
http://go/go-review/1023002
2009-11-05 17:02:29 -08:00
Adam Langley
fa57417dbd crypto/tls (part 6/5)
Results of running gofmt again.

R=rsc
CC=go-dev
http://go/go-review/1022006
2009-11-05 16:59:39 -08:00
Adam Langley
eb48f83ae2 crypto/tls (part 5/5)
Make RSA and X509 build by using big. (This involves commenting out
key generation for now since I haven't written Miller-Rabin in big
yet.)

Add entries to the Makefile.

R=rsc
CC=go-dev
http://go/go-review/1022005
2009-11-05 16:44:02 -08:00
Adam Langley
950f2637c2 crypto/tls (part 4/5)
R=rsc
CC=go-dev
http://go/go-review/1019002
2009-11-05 16:43:29 -08:00
Robert Griesemer
10242e806f gofmt'ed parts of go
R=rsc
http://go/go-review/1023001
2009-11-05 15:58:28 -08:00
Adam Langley
65063bc61d big: add Div, Mod, Exp, GcdExt and several other fixes.
R=gri, rsc
CC=go-dev
http://go/go-review/1017036
2009-11-05 15:55:41 -08:00
Adam Langley
5e598c55dc crypto/tls (part 3)
(With hindsight, record_process might have been designed wrong, but it
works for now. It'll get redrawn when client support is added.)

R=rsc
CC=r
http://go/go-review/1018032
2009-11-05 15:44:32 -08:00
Robert Griesemer
d3d3accdb7 gofmt-ify io, json, runtime, encoding
R=rsc
http://go/go-review/1017056
2009-11-05 15:37:55 -08:00
Robert Griesemer
441e775dad gofmt'ed godefs
R=rsc
http://go/go-review/1020001
2009-11-05 15:35:53 -08:00
Robert Griesemer
6a4940ee23 gofmt'ed debug
(excluding debug/gosym/symtab.go which has a small issue)

R=rsc
http://go/go-review/1019001
2009-11-05 15:35:02 -08:00
Robert Griesemer
6f762f5410 gofmt'ed 6l 8l cgo
R=r
http://go/go-review/1020002
2009-11-05 15:33:26 -08:00
Robert Griesemer
b8d88a9913 gofmt-ify strings, template
R=r
http://go/go-review/1018064
2009-11-05 15:12:37 -08:00
Robert Griesemer
f65e42d039 gofmt-ify gob
(the one-line struct types used in composite literals will become
one line again in another cleanup round; don't worry about them now)

R=r
http://go/go-review/1016056
2009-11-05 14:53:42 -08:00
Russ Cox
790c9b59d6 codereview: new commands
* clpatch
	* download
	* submit, on behalf of clpatch

stir hgpatch to fix a few bugs

R=r
CC=go-dev
http://go/go-review/1016051
2009-11-05 14:44:57 -08:00
Robert Griesemer
9786b3f1bd gofmt-ify 4s, iterable
R=rsc
http://go/go-review/1016055
2009-11-05 14:43:03 -08:00
Robert Griesemer
2a89915485 gofmt-ify draw
R=rsc
http://go/go-review/1017055
2009-11-05 14:42:28 -08:00
Robert Griesemer
9e48df682c gofmt-ify eval
R=rsc
http://go/go-review/1016054
2009-11-05 14:41:56 -08:00
Robert Griesemer
d2af73136e gofmt-ify ogle
R=rsc
http://go/go-review/1016053
2009-11-05 14:30:18 -08:00
Robert Griesemer
6238964d7b gofmt-ify nacl
R=rsc
http://go/go-review/1018062
2009-11-05 14:29:38 -08:00
Robert Griesemer
77334b988c gofmt-ify reflect
- the single line structs can be fixed in another round

R=rsc
http://go/go-review/1016052
2009-11-05 14:23:20 -08:00
Robert Griesemer
666afa1c02 2nd attempt: no noIndent for string lists
- slightly better output in general
- extra indentation where we could do without
  (however that seems better for now that not having the indentation
  where it is needed)
- no information is lost, so a future better approach can fix these
  places up again

R=rsc
http://go/go-review/1017050
2009-11-05 14:03:56 -08:00
Ken Thompson
18cb960f3e forgot a piece of debugging
in previous change

R=rsc
http://go/go-review/1017052
2009-11-05 13:05:07 -08:00
Ken Thompson
505fd760a2 same speedup as 6l
R=rsc
http://go/go-review/1016050
2009-11-05 12:47:22 -08:00
Robert Griesemer
bd4f94057f gofmt-ify syscall
(replacement for CL 1018053)

R=r
http://go/go-review/1017047
2009-11-05 10:55:57 -08:00
Robert Griesemer
30c7088c95 gofmt-ify template, time, unsafe, flag, fmt
(replacement for CLs 1017039, 1017041, 1017040, 1018054)

R=r
http://go/go-review/1018060
2009-11-05 09:40:28 -08:00
Russ Cox
1329012a23 new command hgpatch, for use by codereview extension
R=r
http://go/go-review/1018059
2009-11-05 09:27:19 -08:00
Robert Griesemer
3630bfbe9f gofmt-ify math, expvar, exp/spacewar
R=rsc
http://go/go-review/1018061
2009-11-05 09:08:08 -08:00
Robert Griesemer
e57acdca4d gofmt-ify parts of xml
R=rsc
http://go/go-review/1017049
2009-11-05 08:59:03 -08:00
Robert Griesemer
12dbd06f0a gofmt-ify encoding
R=rsc
http://go/go-review/1017048
2009-11-05 08:55:18 -08:00
Robert Griesemer
ed494c6398 gofmt-ify sort, sync
R=rsc
http://go/go-review/1018057
2009-11-04 23:25:29 -08:00
Robert Griesemer
314b358ab7 gofmt-ify strconv
(and remove an empty line at the end of a file)

R=rsc
http://go/go-review/1017046
2009-11-04 23:20:49 -08:00
Robert Griesemer
5d37705416 gofmt-ify net
R=rsc
http://go/go-review/1017045
2009-11-04 23:16:46 -08:00
Robert Griesemer
7df45566db gofmt-ify image
R=rsc
http://go/go-review/1017044
2009-11-04 22:52:28 -08:00
Robert Griesemer
ca2a69ea06 gofmt-ify hash, http
(gofmt will be able to re-align map entries as in http nicely,
eventually)

R=rsc
http://go/go-review/1018055
2009-11-04 22:45:59 -08:00
Robert Griesemer
b16e6ab148 gofmt-ify tabwriter
R=rsc
http://go/go-review/1017042
2009-11-04 22:26:48 -08:00
Robert Griesemer
1fede304ff more comment formatting:
- preserve (some) indentation of comment text for /*-style comments
  even if the first comment line does not contain any text that might
  suggest the "correct" indentation
- enabled because otherwise existing larger comments get re-formatted
  (this will not introduce a lot of changes since comments of this
  kind - until now - were not changed with respect to indentation)

R=rsc
http://go/go-review/1016047
2009-11-04 22:07:13 -08:00
Robert Griesemer
841c18a95a gofmt-ify unicode
R=r
http://go/go-review/1018051
2009-11-04 21:39:55 -08:00
Kai Backman
55ba9d6a2c fixing (badly) linux_arm syscall.
R=rsc
http://go/go-review/1017037
2009-11-04 21:34:54 -08:00
Robert Griesemer
601ee4807b - add a blank before the opening { for multi-line composites
(request by r)
- feature temporarily disabled

R=rsc
CC=r
http://go/go-review/1018052
2009-11-04 21:15:47 -08:00
Robert Griesemer
398f220d5b gofmt-ify os
R=r
http://go/go-review/1017034
2009-11-04 20:42:40 -08:00
Ken Thompson
9c7535432a speed up 6l
hopefully no change

R=rsc
http://go/go-review/1017035
2009-11-04 18:17:57 -08:00
Russ Cox
cc1a979272 package patch
R=r
http://go/go-review/1018043
2009-11-04 17:55:06 -08:00
Robert Griesemer
5fca0bca61 gofmt-ify compress
R=rsc
http://go/go-review/1016045
2009-11-04 17:10:18 -08:00
Robert Griesemer
b6d0a22dc5 gofmt-ify ebnf
R=r
http://go/go-review/1018050
2009-11-04 17:05:01 -08:00
Robert Griesemer
646a2c5a42 gofmt-ify bufio
R=rsc
http://go/go-review/1018049
2009-11-04 17:04:21 -08:00
Robert Griesemer
03678f7417 gofmt-ify asn1
R=rsc
http://go/go-review/1018047
2009-11-04 17:03:08 -08:00
Robert Griesemer
517ebbb24a gofmt-ify src/pkg/archive
R=rsc
http://go/go-review/1018046
2009-11-04 17:02:47 -08:00
Robert Griesemer
eabcc981c5 gofmt-ify crypto
R=agl
CC=rsc
http://go/go-review/1017032
2009-11-04 17:02:30 -08:00
Robert Griesemer
2ce57ec10a gofmt-ify src/pkg/go (excluding printer directory due to pending CL,
and parser.go and scanner_test.go which have minor formatting issues)

R=rsc
http://go/go-review/1016042
2009-11-04 17:02:05 -08:00
Robert Griesemer
26c3f6c18d rename testfiles from .go -> .orig so that they won't be
picked up by gofmt (they should not be modified) or godoc
(testdata should not be considered a potential package
directory)

R=rsc
http://go/go-review/1018045
2009-11-04 16:50:13 -08:00
Robert Griesemer
688a6ff71d gofmt-ify bytes
R=r
http://go/go-review/1016044
2009-11-04 16:49:28 -08:00
Robert Griesemer
789b31a416 better placement of /*-style comments interspersed with code on one line
R=rsc
http://go/go-review/1017030
2009-11-04 15:33:28 -08:00
Russ Cox
5d436b9def bytes.SplitAfter and strings.SplitAfter
most common usage is:

	lines := strings.SplitAfter(text, "\n", 0)

R=r
http://go/go-review/1018042
2009-11-04 15:19:30 -08:00
Russ Cox
3de3af512d doc doc doc
R=r
http://go/go-review/1016039
2009-11-04 15:17:36 -08:00
Rob Pike
56cba8855e panic can't print interfaces well so use err.String()
R=rsc
http://go/go-review/1016041
2009-11-04 15:13:16 -08:00
Robert Griesemer
2f792d32be - always format blocks with closing } on a new line, even if empty
- at the moment this also affects single-line function declarations
  because we have disabled them at the moment (but not single-line
  function literals)

R=rsc
http://go/go-review/1016040
2009-11-04 13:31:20 -08:00
Rob Pike
98ac4c6e65 stylistic issues in a couple of cmd docs
R=rsc
http://go/go-review/1017028
2009-11-04 13:13:17 -08:00
Rob Pike
0d3dd3c950 document godoc and gofmt
R=rsc
http://go/go-review/1018036
2009-11-04 11:33:43 -08:00
Robert Griesemer
4bb0271a12 remove reference to /home/r
R=rsc
http://go/go-review/1018039
2009-11-04 11:15:19 -08:00
Robert Griesemer
6dbf7aa129 - complete html-escaping also in printer.go
R=rsc
http://go/go-review/1017027
2009-11-04 10:59:25 -08:00
Robert Griesemer
c8c3f1d5de - respect source line breaks in grouped declarations
- made ast.Spec nodes implement Node interface
- added extra test cases

R=rsc
http://go/go-review/1016038
2009-11-04 10:58:54 -08:00
Robert Griesemer
524ade9a58 fix bufio test case
R=rsc
http://go/go-review/1018038
2009-11-04 10:58:30 -08:00
Russ Cox
d441d545a9 two more regexp tweaks
TBR=r
http://go/go-review/1016037
2009-11-04 08:34:31 -08:00
Russ Cox
af2bc8f986 allow "no such host" and also "no answer from server";
seems to help on snow leopard.

TBR=r
http://go/go-review/1018035
2009-11-04 08:30:53 -08:00
Rob Pike
56a38f25a7 document gotest
R=rsc
CC=go-dev
http://go/go-review/1017026
2009-11-03 23:06:16 -08:00
Robert Griesemer
467c726eec add " and ' to list of html-escaped chars
R=rsc
http://go/go-review/1017025
2009-11-03 22:52:10 -08:00
Rob Pike
796e29ebfc add goyacc to the build
R=rsc
CC=go-dev
http://go/go-review/1018034
2009-11-03 22:48:48 -08:00
Rob Pike
472576c615 make goyacc and units.y work again (minor tweaks).
document goyacc a little.

R=rsc
CC=go-dev
http://go/go-review/1017024
2009-11-03 22:38:43 -08:00
Rob Pike
701440043b document gopack.
change string in usage message.

R=rsc
http://go/go-review/1017023
2009-11-03 22:36:31 -08:00
Rob Pike
c6dd8c18f0 document ebnflint
R=gri
http://go/go-review/1016034
2009-11-03 22:19:56 -08:00
Rob Pike
3fa379e797 document the gc go compilers.
fix the usage message.

R=rsc
CC=go-dev
http://go/go-review/1016033
2009-11-03 22:00:36 -08:00
Robert Griesemer
4818d346b6 support for command documentation:
- made package tree handler generic so it can work on any fs tree
- cleanups along the way

R=rsc
CC=r
http://go/go-review/1017020
2009-11-03 19:40:26 -08:00
Rob Pike
dc62c66c73 more command documentation, including nm and prof
R=rsc
http://go/go-review/1017022
2009-11-03 17:46:35 -08:00
Adam Langley
93253a870c encoding/*: reverse the order of src, dst so that dst is first.
R=rsc
CC=go-dev
http://go/go-review/1017021
2009-11-03 17:32:08 -08:00
Adam Langley
1542520a4a crypto/tls (part 2)
R=rsc
CC=go-dev
http://go/go-review/1018028
2009-11-03 17:25:13 -08:00
Adam Langley
bcce2987e0 crypto/rsa: fix blinding when using a null random source.
For testing it can be useful to use a null random source (one which
always returns zero) to remove non-determinism from the tests.
However, when performing RSA blinding, the random blind ends up being
zero and it's hard to reverse a multiplication by zero.

R=rsc
CC=go-dev
http://go/go-review/1018033
2009-11-03 17:23:50 -08:00
Rob Pike
b5ab5d4f12 document the assemblers.
add details about -d and -e flags in the loaders.

R=rsc
CC=go-dev
http://go/go-review/1018031
2009-11-03 16:29:32 -08:00
Rob Pike
2bc63f2367 First steps at command documentation: C compilers and linkers.
Each command gets a doc.go file for godoc to analyze. Its main
element is a package comment.

R=rsc
CC=go-dev
http://go/go-review/1018029
2009-11-03 16:05:47 -08:00