summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-12-17use new tab indentation format in godoc, but convertRobert Griesemer1-2/+70
leading tabs into spaces to ensure a good outcome in most browsers R=rsc http://codereview.appspot.com/165051
2009-12-17time: add ISO 8601 time formatBen Olive2-1/+43
Fixes issue 431. R=r, rsc CC=golang-dev http://codereview.appspot.com/179079 Committer: Russ Cox <rsc@golang.org>
2009-12-17A+C: Ben Olive (individual CLA)Russ Cox2-0/+2
R=gri CC=golang-dev http://codereview.appspot.com/180081
2009-12-17Allow cgo to accept multiple .go inputs for a packageDevon H. O'Dell4-99/+194
Fixes issue 342. R=rsc CC=golang-dev http://codereview.appspot.com/179062 Committer: Russ Cox <rsc@golang.org>
2009-12-17Use BitSize instead of the field's type native ByteSize when calculatingDevon H. O'Dell1-0/+3
structs containing bitfields. Fixes issue 163. R=rsc CC=golang-dev http://codereview.appspot.com/180059 Committer: Russ Cox <rsc@golang.org>
2009-12-17Updated the XGB python script to generate semicolon-freeTor Andersson1-60/+57
source for xproto.go. R=rsc CC=golang-dev http://codereview.appspot.com/180074 Committer: Russ Cox <rsc@golang.org>
2009-12-16runtime: if os/signal is not in use, crash onRuss Cox13-63/+82
most signals, so that ordinary programs can be killed, for example. Fixes issue 434. R=dsymonds1 CC=golang-dev, hoisie http://codereview.appspot.com/180064
2009-12-17make it more explicit that design discussions should happen before code reviewsRob Pike2-2/+26
R=rsc CC=golang-dev http://codereview.appspot.com/180075
2009-12-16- Parse expressions as opposed to statements for gofmt rewrite patterns.Robert Griesemer1-11/+8
Allows stand-alone types (e.g. []int as patterns) and doesn't require a semicolon at the end (which are now mandatory terminators). - Fix a matcher bug. R=rsc CC=golang-dev http://codereview.appspot.com/179088
2009-12-17Basic image/jpeg decoder.Nigel Tao5-0/+787
This is not a complete JPEG implementation (e.g. it does not handle progressive JPEGs or restart markers), but I was able to take a photo with my phone, and view the resultant JPEG in pure Go. The decoder is simple, but slow. The Huffman decoder in particular should be easily improvable, but optimization is left to future changelists. Being able to inline functions in the inner loop should also help performance. The output is not pixel-for-pixel identical to libjpeg, although identical behavior isn't necessarily a goal, since JPEG is a lossy codec. There are at least two reasons for the discrepancy. First, the inverse DCT algorithm used is the same as Plan9's src/cmd/jpg, which has different rounding errors from libjpeg's default IDCT implementation. Note that libjpeg actually has three different IDCT implementations: one floating point, and two fixed point. Out of those four, Plan9's seemed the simplest to understand, partly because it has no #ifdef's or C macros. Second, for 4:2:2 or 4:2:0 chroma sampling, this implementation does nearest neighbor upsampling, compared to libjpeg's triangle filter (e.g. see h2v1_fancy_upsample in jdsample.c). The difference from the first reason is typically zero, but sometimes 1 (out of 256) in YCbCr space, or double that in RGB space. The difference from the second reason can be as large as 8/256 in YCbCr space, in regions of steep chroma gradients. Informal eyeballing suggests that the net difference is typically imperceptible, though. R=r CC=golang-dev, rsc http://codereview.appspot.com/164056
2009-12-16Add roadmap document.Ian Lance Taylor1-0/+105
Also adds Development heading on navbar, with Roadmap being the only current entry. R=r CC=golang-dev http://codereview.appspot.com/180069
2009-12-16Don't ignore flags controlling the amount of source code parsedRobert Griesemer2-10/+10
in parser's ParsePkgFile and ParsePackage functions. R=rsc CC=golang-dev, rog http://codereview.appspot.com/180070
2009-12-16add the ability to invoke niladic single-valued methods in templates.Rob Pike2-10/+86
Fixes issue 389. R=rsc CC=golang-dev http://codereview.appspot.com/180061
2009-12-15This patch enables cgo utility to correctly convert enums in the C sourceMoriyoshi Koizumi6-29/+77
into consts in the resulting Go source. Previously known as issue 161047, which I deleted accidentally. Fixes issue 207. R=rsc http://codereview.appspot.com/166059 Committer: Russ Cox <rsc@golang.org>
2009-12-15rand: Zipf distributed random variates.William Josephson2-0/+74
R=rsc http://codereview.appspot.com/176070 Committer: Russ Cox <rsc@golang.org>
2009-12-15bytes, strings: add new function FieldsAndrey Mirtchovski4-0/+132
R=rsc, r, phf CC=golang-dev http://codereview.appspot.com/170046 Committer: Russ Cox <rsc@golang.org>
2009-12-15math: special cases for PowCharles L. Dorian2-5/+202
R=rsc CC=golang-dev http://codereview.appspot.com/176064 Committer: Russ Cox <rsc@golang.org>
2009-12-15doc/install.html: how to update to a new releaseRuss Cox1-0/+13
Fixes issue 422. R=r CC=golang-dev http://codereview.appspot.com/180057
2009-12-15os/signal: new packageDavid Symonds19-67/+356
Fixes issue 71. R=rsc, r http://codereview.appspot.com/162056 Committer: Russ Cox <rsc@golang.org>
2009-12-15Fix for scanner bug (introduced with most recent change).Robert Griesemer2-2/+8
Fixes issue 433. R=rsc CC=golang-dev http://codereview.appspot.com/179072
2009-12-15syscall: RawSyscall must not call exitsyscallRuss Cox1-1/+0
Fixes issue 405. R=r CC=golang-dev, hoisie http://codereview.appspot.com/180056
2009-12-16new semicolon rule in effective_go.html.Rob Pike1-397/+412
eliminate all tab characters while we're here. R=rsc CC=golang-dev http://codereview.appspot.com/180055
2009-12-15rand: add explicit Int31n to avoid 64-bit divide on 32-bit machinesRuss Cox2-2/+38
use Int31n in Intn when possible. Fixes issue 390. (using 8g) Intn1000 50000000 38 ns/op Int31n1000 50000000 39 ns/op Int63n1000 20000000 114 ns/op R=r CC=golang-dev, skybrian http://codereview.appspot.com/180054
2009-12-15math: faster, easier to inline IsNaN, IsInfRuss Cox1-4/+10
R=r CC=golang-dev http://codereview.appspot.com/180046
2009-12-15runtime: return zero value in x, ok = <-c when ok == falseRuss Cox2-0/+22
Fixes issue 401. R=ken2 http://codereview.appspot.com/180053
2009-12-15gc: fix import name resolutionRuss Cox2-1/+11
Fixes issue 403. R=ken2 http://codereview.appspot.com/180052
2009-12-15Add basic http authentication support.Ivan Krasin1-0/+11
Fixes issue 407. R=rsc, ajstarks CC=ushakov http://codereview.appspot.com/176076 Committer: Russ Cox <rsc@golang.org>
2009-12-15gc: bug fixes.Russ Cox5-11/+87
* better error for lookup of unexported field * do not assign "ideal string" type to typed string literal * do not confuse methods and fields during interface check Fixes issue 410. Fixes issue 411. Fixes issue 426. R=ken2 http://codereview.appspot.com/179069
2009-12-15gc: allow ... in method listsRuss Cox2-1/+9
R=ken2 http://codereview.appspot.com/179070
2009-12-151) Change default gofmt default settings forRobert Griesemer59-5917/+5917
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 5th and last set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180050
2009-12-151) Change default gofmt default settings forRobert Griesemer119-14330/+14330
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 4th set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180049
2009-12-151) Change default gofmt default settings forRobert Griesemer104-7004/+7004
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 3rd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180048
2009-12-15 1) Change default gofmt default settings forRobert Griesemer139-9464/+9464
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 1st set of files. R=rsc CC=agl, golang-dev, iant, ken2, r http://codereview.appspot.com/180047
2009-12-16update tutorial.Rob Pike18-386/+421
R=rsc CC=golang-dev http://codereview.appspot.com/179063
2009-12-15 1) Change default gofmt default settings forRobert Griesemer105-10476/+10478
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 2nd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/179067
2009-12-15gc: double-check usage of ...Russ Cox4-5/+34
Fixes issue 423. R=ken2 http://codereview.appspot.com/180045
2009-12-15gc: var x, ok = m[y]Russ Cox2-0/+40
Fixes issue 384. R=ken2 http://codereview.appspot.com/179061
2009-12-15Tweak test to work with both 6g and gccgo.Ian Lance Taylor1-3/+1
Pull the struct into a single line, since 6g reports the error on the last line of the struct definition and gccgo reports it on the first line. 6g: bug215.go:12: invalid recursive type A gccgo: bug215.go:12:6: error: invalid recursive type ‘A’ R=rsc http://codereview.appspot.com/180044
2009-12-15codereview: add golang-dev@googlegroups.comRuss Cox1-40/+33
automatically in "hg mail". also, avoid "empty list means all modified files in client" bug R=gri, cw CC=golang-dev http://codereview.appspot.com/174072
2009-12-15fix TODO: insert semicolons before any sequence of commentsRobert Griesemer2-45/+72
that introduce the newline (important for correct placement of comments with gofmt when parsing new syntax) R=rsc http://codereview.appspot.com/179055
2009-12-14xml: handle unexpected EOF while parsing and fix a bug in nameArvindh Rajesh Tamilmani2-27/+104
mustgetc reports unexpected EOF as SyntaxError. using mustgetc seems to be a better approach than letting the caller handle unexpected EOF every time. name: the second if statement should explicitly return ok==false. R=rsc http://codereview.appspot.com/174083 Committer: Russ Cox <rsc@golang.org>
2009-12-14runtime: in exitsyscall, avoid confusing garbage collectorRuss Cox1-1/+6
R=r CC=golang-dev http://codereview.appspot.com/178046
2009-12-14improved formatting of import declarations andRobert Griesemer6-7/+110
multi-line expressions with comments Fixes issue 414. R=rsc http://codereview.appspot.com/179047
2009-12-14crypto/sha256: new packageAndy Davis5-0/+333
R=rsc CC=golang-dev http://codereview.appspot.com/176062 Committer: Russ Cox <rsc@golang.org>
2009-12-15simpler fix for the negative rune problem, spotted seconds after submitting ↵Rob Pike1-19/+17
the previous fix. R=rsc http://codereview.appspot.com/178044
2009-12-15generate replacement rune when asked to encode a negative rune value.Rob Pike2-9/+26
Fixes issue 425. R=rsc http://codereview.appspot.com/178043
2009-12-14archive/tar: bug fixes.Christopher Wedgwood3-37/+167
1. If all data is exhausted using Read then a following Next will fail as if it saw EOF. (Test case added.) 2. Seeking isn't always possible (i.e. sockets and pipes). Fallback to read. (Test case added.) 3. Fix to readHeader (cleaner fix pointed out by rsc). (TestReader modified.) 4. When Read has consumed all the data, don't try to read 0 bytes from reader. In cases where tr.nb is zero we attempt to read zero bytes and thus never see an EOF (this is most easily seen when the 'tar source' is something like bytes.Buffer{} as opposed to os.File). 5. If write is used to the point of ErrWriteTooLong, allow additional file entries. 6. Make close work as expected. That is any further Write or WriteHeader attempts will result in ErrWriteAfterClose. Fixes issue 419. R=rsc, dsymonds1 http://codereview.appspot.com/162062 Committer: Russ Cox <rsc@golang.org>
2009-12-14don't show semicolons anymore with godocRobert Griesemer1-1/+1
R=rsc http://codereview.appspot.com/174078
2009-12-13A+C: two more namesRuss Cox2-0/+4
Andy Davis (individual CLA) Arvindh Rajesh Tamilmani (individual CLA) R=r http://codereview.appspot.com/176067
2009-12-14fix naked < as reported by pwil3058@gmail.comRob Pike2-2/+2
R=rsc CC=pwil3058 http://codereview.appspot.com/174087