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

2794 Commits

Author SHA1 Message Date
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
Russ Cox
96ea081c04 6l -e: emit external ELF symbol table.
enough to make nm and oprofile work.

R=r
http://go/go-review/1017016
2009-11-03 14:20:37 -08:00
Robert Griesemer
c56b366c28 Note: This is an exact replica and replacement of CL 1018027
(which I uploaded at home and thus can't upload from here).
CL 1018027 was reviewed.

- added comments to scope.go
- commented out some code that is not yet needed
  (and which showed up prominently in the documentation)

R=rsc
http://go/go-review/1017017
2009-11-03 14:05:18 -08:00
Robert Griesemer
38512d090c - don't loose extra line breaks in struct/interface declarations
- start new sections if a field/method declaration spans multiple lines;
  this avoids tabs from the previous line affecting the next field/method

R=rsc
http://go/go-review/1017015
2009-11-03 13:40:11 -08:00
Adam Langley
4f2ec03416 Add testing/script.
R=rsc, r
CC=go-dev
http://go/go-review/1016001
2009-11-03 12:47:06 -08:00
Robert Griesemer
12f8660d4c use default styler when there is no other given
(No visual change yet since the comments for
exported code snippets - as shown on the pkg
page - are not yet formatted using the standard
comment intersperse mechanism in the printer.
This is a TODO in the printer.)

R=rsc
http://go/go-review/1016031
2009-11-03 10:00:57 -08:00
Rob Pike
929e27e3d5 fix build
R=gri
http://go/go-review/1017014
2009-11-02 23:06:48 -08:00
Robert Griesemer
be56b95770 - show recursive package directory structure in package pages
- removed some underbars in section headings for better looks
- various minor tweaks

R=rsc
http://go/go-review/1018026
2009-11-02 22:44:01 -08:00
Robert Griesemer
6e98b7f0b2 split printer.go into two files; it has become too large:
- nodes.go implements ast node formatting
- printer.go implements the core printing functionality
  and public interface

No code changes except for updating the import clauses
and adding a top-level comment to nodes.go.

R=rsc
http://go/go-review/1016026
2009-11-02 20:55:40 -08:00
Rob Pike
120d0b50c6 forgot to count newlines when scanning white space.
also fix a error-printing bug in godoc.

R=gri
http://go/go-review/1016030
2009-11-02 20:35:52 -08:00
Russ Cox
c83b838641 package net cleanup
added ReadFrom/WriteTo for packet protocols like UDP.
simplified the net.Conn interface.
added new net.PacketConn interface for packet protocols.
implemented proper UDP listener.

cleaned up LocalAddr/RemoteAddr methods - cache in netFD.

threw away various unused methods.

an interface change:
introduced net.Addr as a network address interface,
to avoid conversion of UDP host:port to string and
back for every ReadFrom/WriteTo sequence.

another interface change:
since signature of Listener.Accept was changing anyway,
dropped the middle return value, because it is available
as c.RemoteAddr().  (the Accept signature predates the
existence of that method.)

Dial and Listen still accept strings, but the proto-specific
versions DialTCP, ListenUDP, etc. take net.Addr instead.

because the generic Dial didn't change and because
no one calls Accept directly (only indirectly via the http
server), very little code will be affected by these interface
changes.

design comments welcome.

R=p
CC=go-dev, r
http://go/go-review/1018017
2009-11-02 18:37:30 -08:00
Adam Langley
6e8184d8cd crypto/tls (part 1)
Rather than drop everything into a single, huge review, I've included
some simple bits of code here.

R=rsc
CC=go-dev
http://go/go-review/1016029
2009-11-02 18:25:20 -08:00
Russ Cox
6334b499e8 fix divide by zero in old glibc dynamic loader
R=r
CC=iant
http://go/go-review/1018024
2009-11-02 14:00:32 -08:00
Rob Pike
236a9de93f remove goroutines from template parsing.
fix up one usage to take advantage.

R=rsc
CC=go-dev
http://go/go-review/1018023
2009-11-02 13:09:31 -08:00
Ian Lance Taylor
f32cde88b6 Define constants for sizes of Sym structures.
R=rsc, agl
http://go/go-review/1016028
2009-11-02 12:53:06 -08:00
Adam Langley
72ec930fa7 Fix cgo for GCC 4.4
Firstly, with -Werror, GCC switched to printing warnings starting
with "error:". Widening the string matches solves this as the messages
are otherwise unchanged.

Secondly, GCC 4.4 outputs DWARF sections with with NUL bytes in all
the offsets and requires the relocation section for .debug_info to be
processed in order to result in valid DWARF data. Thus we add minimal
handling for relocation sections, which is sufficient for our needs.

BUG=1
Fixes #1.

R=rsc, iant
CC=go-dev
http://go/go-review/1017003
2009-11-02 12:02:16 -08:00
Rob Pike
a82465103f use the new routine regexp.MustCompile to clean up some code that uses global regexps.
R=rsc, gri
CC=go-dev
http://go/go-review/1016025
2009-11-02 11:37:52 -08:00
Rob Pike
cd82d490fc eliminate goroutine from testing/regexp too.
R=rsc
CC=go-dev
http://go/go-review/1018021
2009-11-02 11:24:47 -08:00
Adam Langley
ad67a86626 Split constant time functions into crypto/subtle.
R=rsc
CC=go-dev
http://go/go-review/1018020
2009-11-02 11:12:07 -08:00
Russ Cox
d00248980b do not emit USED for global x when compiling "_ = x;"
R=ken@golang.org
CC=r
http://go/go-review/1018019
2009-11-02 10:50:18 -08:00
Rob Pike
acc54b6c70 take goroutines out of regexp so they can be created
during initialization.

R=rsc
CC=go-dev
http://go/go-review/1016023
2009-11-02 10:08:22 -08:00
Robert Griesemer
49d295d592 - initial steps towards showing directory tree instead of
just a single directory
- all pieces present but not well integrated
- directory tree served at the moment under /tree

R=rsc
http://go/go-review/1018016
2009-11-02 09:25:39 -08:00
Robert Griesemer
b67352110f - collect line comments for methods in interfaces
(previously not shown in godoc)
- simplify parsing of struct types (match code structure for parsing interface types)

R=rsc, r
http://go/go-review/1016019
2009-11-02 09:18:02 -08:00
Russ Cox
9dd2e1e30f nil pointer checks in 8g.
fix nil pointer check in 6g.
was dereferencing after the ADD;
dereference before instead.

R=ken@golang.org
CC=iant
http://go/go-review/1016022
2009-11-01 21:04:16 -08:00
Rob Pike
4d310f2434 reverse the arguments to io.Copy so the destination is on the
left, like an assignment, like strcpy, etc.

R=rsc
CC=go-dev
http://go/go-review/1016011
2009-11-01 20:59:49 -08:00
Ian Lance Taylor
f4e3947ffe Permit the CC environment variable to include arguments
(I should have tested the last change a bit more before
submitting).

R=rsc
http://go/go-review/1017011
2009-11-01 16:29:33 -08:00
Ian Lance Taylor
fab7ae15ee Use the environment variable CC as the bootstrap compiler used
to build 6g, 6l, etc.

R=rsc
CC=go-dev
http://go/go-review/1018015
2009-11-01 16:13:37 -08:00
Robert Griesemer
b96ad80949 enable all (but one) test cases in test.sh that
were excluded before because of incorrect comment
formatting (comment formatting is mostly idempotent
at this point)

R=rsc
http://go/go-review/1018014
2009-11-01 15:27:10 -08:00
Ian Lance Taylor
d8efcdcd52 These files were moved to encoding/base64. The directory was
already removed from the Makefile.

R=rsc
http://go/go-review/1017006
2009-11-01 15:04:46 -08:00
Russ Cox
35ace1d1f5 split ipsock.go, sock.go, and unixsock.go out of net.go
prior to cleanup.  no changes, only moving.

remove dependencies on strconv and strings

R=r
http://go/go-review/1017010
2009-11-01 11:15:34 -08:00
Russ Cox
fd1add2768 syscall cleanup.
* rename PORT.sh -> mkall.sh (hopefully more obvious),
   change behavior: run commands by default.
 * pull more constants out of #defines automatically,
   instead of editing large lists by hand.
 * add Recvfrom, Sendto

add os.O_EXCL.

R=r
http://go/go-review/1017009
2009-11-01 11:13:27 -08:00
Robert Griesemer
5223218307 don't update sync time if no files have changed
(and thus avoid re-indexing after every sync attempt)

R=rsc
http://go/go-review/1016010
2009-11-01 10:33:16 -08:00
Russ Cox
a64b69da9e os cleanup.
dir_* and stat_* are just os specific,
not os+arch-specific.

R=r
http://go/go-review/1018010
2009-11-01 09:37:13 -08:00
Russ Cox
7732d80ceb misc cleanup
R=r
http://go/go-review/1016017
2009-11-01 09:25:55 -08:00
Russ Cox
b72153310d allow unpacking of json map into Go map,
now that reflection supports it.

R=r
http://go/go-review/1015008
2009-11-01 05:49:07 -08:00
Russ Cox
bf991bb7df Make.pkg: add DEPS= support
allow Makefiles using Make.pkg to specify a
list of directories that should be installed
before trying to build the package.
this is a stopgap for small package trees
maintained outside the standard tree.

R=r
http://go/go-review/1016012
2009-11-01 05:43:26 -08:00
Rob Pike
63e668d2ad return "<nil>" when calling String() on a nil bytes.Buffer.
R=rsc
CC=go-dev
http://go/go-review/1016005
2009-10-31 13:28:22 -07:00
Ian Lance Taylor
b534eb462b Don't use fallthrough in a type switch.
R=rsc
http://go/go-review/1018005
2009-10-30 16:10:42 -07:00
Robert Griesemer
fb12ad063e fix build
R=agl
CC=rsc
http://go/go-review/1016008
2009-10-30 13:19:04 -07:00
Robert Griesemer
1e984cb913 improved comment formatting:
- print comments line by line, strip common prefix but do not
  modify comment contents otherwise
- align comments with subsequent keyword if indicated (e.g. case labels)
- terminate "column section" after multi-line expressions for better alignment

R=rsc
http://go/go-review/1017002
2009-10-30 13:17:14 -07:00
Russ Cox
09f4261841 split godoc/godoc.go into godoc/godoc.go
and godoc/main.go.

R=gri
CC=r
http://go/go-review/1017005
2009-10-30 10:58:53 -07:00
Kai Backman
1d0b65d33f added missing sgen reverse character copy code.
R=rsc
http://go/go-review/1018006
2009-10-30 09:38:30 -07:00
Kai Backman
770b872752 clone and futex
go/test: passes 99% (343/347)

R=rsc
http://go/go-review/1016004
2009-10-29 21:21:14 -07:00
Adam Langley
09d68334cc Forgot to change quickcheck to quick in the Makefile.
TBR=rsc

R=rsc
http://go/go-review/1017004
2009-10-29 18:34:44 -07:00
Adam Langley
9e96f25fa2 Add RSA PKCS#1 v1.5 support.
R=go-dev
APPROVED=rsc
DELTA=407  (400 added, 0 deleted, 7 changed)
OCL=36007
CL=36146
2009-10-29 17:38:25 -07:00
Adam Langley
878d0e1efd Add a quickcheck package which is a little like the Haskell one of the same
name.

R=rsc
APPROVED=rsc
DELTA=566  (566 added, 0 deleted, 0 changed)
OCL=35974
CL=36111
2009-10-28 15:16:20 -07:00
Stephen Ma
74aa9dd55a Hack to make cgo's generated go code compile when there are no
unsafe.Pointer references inside the C declarations.

R=go-dev
APPROVED=rsc
DELTA=1  (1 added, 0 deleted, 0 changed)
OCL=36063
CL=36063
2009-10-26 21:21:53 -07:00
Rob Pike
449086eec9 Change Stat to Lstat in Readdir so we don't recur when someone symlinks "."
R=rsc
CC=go-dev
http://go/go-review/1018003
2009-10-29 10:53:37 -07:00
Adam Langley
b89d630977 Fix bug when sending via select.
selfree maintains a cache of Select structures for several sizes. In
newselect, we'll use an entry from the cache if one is found. However,
the Scase structures corresponding to a send may have been allocated
for the wrong size. In this case we'll write off the end of the Scase
into random memory and, generally, read some amount of junk in the
receive.

This patch fixes the issue by removing the cache, on the advice of
rsc.

R=rsc
CC=go-dev
http://go/go-review/1016002
2009-10-28 18:23:53 -07:00
Robert Griesemer
c54cb4cb4d - added missing formatters in templates
- replaced deprecated use of </font> with </span> tag
- added html escaping to godoc formatters where missing
- enabled text format for package documentation

R=rsc
http://go/go-review/1017001
2009-10-28 16:19:09 -07:00
Russ Cox
32e979c0de mysterious bug: runtime.acid wasn't getting rebuilt
when switching architectures.

fix bug twice: make sure clean removes the file,
and generate into architecture-specific file names.

R=r
http://go/go-review/1013018
2009-10-28 14:03:16 -07:00
Robert Griesemer
5a02eb65ef fix for long label names impacting column width of previous lines
R=rsc
http://go/go-review/1013017
2009-10-28 10:14:59 -07:00
Russ Cox
d2829faa7c files that are okay from the last gofmt round
R=gri
http://go/go-review/1015011
2009-10-27 22:47:54 -07:00
Kai Backman
58ee1f5d54 shift for non-64 bit integers.
R=rsc
http://go/go-review/1015017
2009-10-27 22:38:45 -07:00
Robert Griesemer
e3fd2e1ec6 godoc search bug fixes:
- sort by package name (instead of package path) for results with snippets
- sort line numbers in results without snippets
- properly characterize package clauses
- experiment with a leaner look: no underlines for top-level godoc links in the left side bar

Still using colors to distinguish results. Next step.

R=rsc
http://go/go-review/1015016
2009-10-27 16:08:12 -07:00
Robert Griesemer
32810a5ded code search for godoc:
- added goroutine to automatically index in the background
- added handler for search requests
- added search box to top-level godoc template
- added search.html template for the display of search results
- changes to spec.go because of name conflicts
- added extra styles to style.css (for shorter .html files)

R=rsc
http://go/go-review/1014011
2009-10-27 10:34:31 -07:00
Ian Lance Taylor
f529224039 Get the right sigaction struct for the 386 rt_sigaction system
call.  This uses the header files from a 32-bit Ubuntu Hardy
system.

The use of _LOOSE_KERNEL_NAMES seems right.  The
-D__ARCH_SI_UID_T works around a bug which appears to be fixed
in later Linux versions.

R=rsc
http://go/go-review/1013015
2009-10-26 22:49:08 -07:00
Kai Backman
1228112b50 bug162, large indices on nil references
R=rsc
http://go/go-review/1013016
2009-10-26 21:49:32 -07:00
Robert Griesemer
ae3c9992ae - gofmt-ify walk.go
- fixed several bugs

R=rsc
http://go/go-review/1015015
2009-10-26 19:21:13 -07:00
Robert Griesemer
5a75ac88c9 - indexing component for godoc
R=rsc
http://go/go-review/1015014
2009-10-26 18:32:51 -07:00
Adam Langley
569a1cd545 Add encoding/hex
R=rsc
http://go/go-review/1015012
2009-10-26 16:34:36 -07:00
Robert Griesemer
57035a9041 snippet generator for godoc search results
R=rsc
http://go/go-review/1013014
2009-10-26 15:47:56 -07:00
Kai Backman
5cc32a5348 fix defer. gave up on unified code for defer and go for now.
R=rsc
http://go/go-review/1014010
2009-10-26 08:02:19 -07:00
Kai Backman
dfeceddd3f make 5l ignore multiple defs, remove use of multiple
defs from embed1 and gotest

R=rsc
http://go/go-review/1014009
2009-10-25 11:59:58 -07:00
Kai Backman
9e99383df5 frame size > StackBig support
R=rsc
http://go/go-review/1015010
2009-10-25 11:51:48 -07:00
Kai Backman
6f91ba1b0f proper syscall convention for arm
R=rsc
http://go/go-review/1015009
2009-10-25 11:51:16 -07:00
Kai Backman
68d5c51287 fix conditional branch instructions for unsigned ints and
float. fix sgen endianess in sgen character copying.

        go/test: passes 97% (336/345)

R=rsc
http://go/go-review/1015007
2009-10-24 22:47:25 -07:00
Rob Pike
c91e89d539 remove reference to p4 in comment.
R=gri
CC=rsc
http://go/go-review/1014008
2009-10-24 14:27:49 -07:00
Kai Backman
f860bc0f4e fixed len/cap for chan. disable gc for now.
go/test: passes 93% (323/345)

R=rsc
http://go/go-review/1015006
2009-10-23 20:31:03 -07:00
Rob Pike
1726e81c00 publish Request.Write (rename from Request.write)
R=rsc
CC=go-dev
http://go/go-review/1015003
2009-10-23 14:19:47 -07:00
Kai Backman
b74fd8ecb1 fix build issue cause by transition to hg
R=rsc
http://go/go-review/1013012
2009-10-23 12:43:01 -07:00
Kai Backman
942d6590d9 one more argsize fix. we were copying with the correct
alignment but not enough (duh).

R=rsc
APPROVED=rsc
DELTA=16  (13 added, 0 deleted, 3 changed)
OCL=36020
CL=36024
2009-10-23 11:03:16 -07:00
Kai Backman
dec1ec34bf all of pkg now compiles, fixes a few more tests
go/test: passes 90% (313/345)

R=rsc
APPROVED=rsc
DELTA=90  (83 added, 3 deleted, 4 changed)
OCL=36011
CL=36023
2009-10-23 11:00:59 -07:00
Kai Backman
0af8e1045c fix off by 4 bug in morestack (lr again). remove storing of r0
now that all arguments are passed on the stack.

go/test: passes 89% (310/345)

R=rsc
APPROVED=rsc
DELTA=33  (13 added, 14 deleted, 6 changed)
OCL=36009
CL=36022
2009-10-23 10:59:31 -07:00
Kai Backman
a9e03ae52a fix broken code produced for ominus
go/test: passes 89% (308/345)

R=rsc
APPROVED=rsc
DELTA=10  (5 added, 0 deleted, 5 changed)
OCL=36005
CL=36021
2009-10-23 10:58:29 -07:00
Kai Backman
03bbfe6724 fix off by 4 in newproc arg copying.
R=rsc
APPROVED=rsc
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=36001
CL=36004
2009-10-22 13:31:52 -07:00
Robert Griesemer
34e8075259 fix computation of sync delay
R=rsc
http://go/go-review/1013011
2009-10-23 11:35:40 -07:00
Ian Lance Taylor
fd5fa4b301 Fix the sigaction declaration to match the system for Linux.
I don't know whether Darwin needs a change here.

R=rsc
http://go/go-review/1013010
2009-10-22 23:51:54 -07:00
Ian Lance Taylor
057f7d5b07 s/pc/PC/ in traceback output to match amd64.
test/run expects to see "PC".

R=rsc
http://go/go-review/1015002
2009-10-22 23:38:34 -07:00
Ian Lance Taylor
95499a27ea Fix printer_test.go to invoke Fprint as a method of cfg.
This matches the change to printer.go in revision 3632.

R=gri
http://go/go-review/1015001
2009-10-22 22:19:22 -07:00
Robert Griesemer
8f52a82169 - make printer interface easily extensible w/o breaking clients (in the future)
- replacement for p4 CL 35999 (abandoned)

R=rsc
http://go/go-review/1012010
2009-10-22 18:19:49 -07:00
Robert Griesemer
abc6ad427d minor changes to walk
R=rsc
http://go/go-review/1012008
2009-10-22 18:04:21 -07:00