summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2010-01-05net: make Dial correctly return nil on error.Roger Peppe1-3/+15
R=rsc CC=golang-dev http://codereview.appspot.com/181135 Committer: Russ Cox <rsc@golang.org>
2010-01-04Simplified parser interface.Robert Griesemer4-54/+39
R=rsc, r CC=golang-dev, rog http://codereview.appspot.com/183116
2010-01-05Check for errors when writing fields of a struct.Rob Pike1-1/+5
R=rsc CC=golang-dev, jack.palevich http://codereview.appspot.com/183109
2010-01-04Allow a nil Ident to print without crashing.Roger Peppe2-6/+14
Allow Walk of []Decl R=gri CC=golang-dev, rsc http://codereview.appspot.com/183112 Committer: Robert Griesemer <gri@golang.org>
2010-01-02Remove redundant size check in resize. Let callers worry about that and ↵Yongjian Xu1-5/+2
resize should just do "resize". R=golang-dev, r CC=golang-dev http://codereview.appspot.com/181111 Committer: Rob Pike <r@golang.org>
2009-12-31trivial bug: []byte is special but [3]byte is not.Rob Pike2-5/+7
modify a test to verify the fix. R=rsc CC=golang-dev http://codereview.appspot.com/183090 Committer: Rob Pike <r@golang.org>
2009-12-30improve some type switches now that multiple types per case are supported.Rob Pike2-50/+6
R=rsc CC=golang-dev http://codereview.appspot.com/181089
2009-12-29Apply symmetric changes to sha1 and sha256 as to md4 and md5.Robert Griesemer2-24/+16
R=agl, agl1 CC=golang-dev http://codereview.appspot.com/183083
2009-12-29PNG decoder now handles transparent paletted images.Nigel Tao1-0/+32
Fixes issue 439. R=r CC=golang-dev http://codereview.appspot.com/181087
2009-12-29JPEG decoder now handles RST (restart) markers.Nigel Tao1-0/+42
R=r CC=golang-dev http://codereview.appspot.com/181075
2009-12-29add a debugging printer to the gob package.Rob Pike3-0/+246
used only for debugging, debug.go is not normally part of the package source. also add a dump program to call it. R=rsc CC=golang-dev http://codereview.appspot.com/183075
2009-12-29remove all references to gobType() from the decoder.Rob Pike1-14/+20
Fixes issue 470. R=rsc CC=golang-dev http://codereview.appspot.com/183074
2009-12-28Fix bug in godoc tab conversion filter:Robert Griesemer1-5/+13
tabs after an empty line where not converted. Also, made it more robust in the presence of (unexpected) ' ' and '\v' chars in indentation mode. R=r CC=golang-dev http://codereview.appspot.com/181085
2009-12-28Symmetric changes to md4.go as for md5.go.Robert Griesemer3-38/+34
Use uint index variables in some cases instead of int to enable strength reduction; this makes it possible for the compiler to reduce % into masks. Old code: 6g -S md4.go md4block.go | grep "md4block.go:44" 0471 (md4block.go:44) MOVL AX,BX 0472 (md4block.go:44) MOVL AX,BP 0473 (md4block.go:44) MOVL AX,R8 0474 (md4block.go:44) SARL $31,R8 0475 (md4block.go:44) SHRL $30,R8 0476 (md4block.go:44) ADDL R8,BP 0477 (md4block.go:44) SARL $2,BP 0478 (md4block.go:44) IMULL $4,BP 0479 (md4block.go:44) SUBL BP,BX 0480 (md4block.go:44) MOVLQSX BX,BX 0481 (md4block.go:44) LEAQ shift1+0(SB),BP 0482 (md4block.go:44) CMPL BX,8(BP) 0483 (md4block.go:44) JCS ,485 0484 (md4block.go:44) CALL ,runtime.throwindex+0(SB) 0485 (md4block.go:44) MOVQ (BP),BP 0486 (md4block.go:44) MOVL (BP)(BX*4),DI New code: 6g -S md4.go md4block.go | grep "md4block.go:44" 0471 (md4block.go:44) MOVL AX,BX 0472 (md4block.go:44) ANDL $3,BX 0473 (md4block.go:44) MOVLQZX BX,BX 0474 (md4block.go:44) LEAQ shift1+0(SB),BP 0475 (md4block.go:44) CMPL BX,8(BP) 0476 (md4block.go:44) JCS ,478 0477 (md4block.go:44) CALL ,runtime.throwindex+0(SB) 0478 (md4block.go:44) MOVQ (BP),BP 0479 (md4block.go:44) MOVL (BP)(BX*4),DI R=agl, agl1 CC=golang-dev http://codereview.appspot.com/181086
2009-12-28A couple of tighter loops.Robert Griesemer1-12/+8
(I was looking at this code accidentally because of some gofmt issues and thought that one could write this more effectively. You may have deliberately chosen not to use ranges here to make the index range clearer. Just let me know.) R=agl, agl1 CC=golang-dev http://codereview.appspot.com/181084
2009-12-29fix dumb bug: must write out default values inside arrays and slicesRob Pike2-19/+45
Fixes issue 459. R=rsc, imkrasin, sonia CC=golang-dev http://codereview.appspot.com/181073
2009-12-28simplify some code that is using vectorsRobert Griesemer1-37/+37
R=agl, agl1 CC=golang-dev http://codereview.appspot.com/181080
2009-12-28crypto/tls: make Listener a pointer.Adam Langley1-4/+5
Listener contains private members and 6g now enforces that private members cannot be assigned outside of their package. R=rsc CC=golang-dev http://codereview.appspot.com/183073
2009-12-27gc: various C nits, found by plan 9 compiler.Russ Cox5-6/+4
reported by erik quanstrom. R=ken2 http://codereview.appspot.com/181071
2009-12-25Update documentation around time.Sleep to specify its precision, and suggestDevon H. O'Dell1-2/+3
a possible interface for more granular sleep times. Fixes issue #260. R=rsc, r CC=golang-dev http://codereview.appspot.com/181058 Committer: Rob Pike <r@golang.org>
2009-12-23Use t.Errorf for formatted error output.Ian Lance Taylor1-1/+1
R=dsymonds1 CC=golang-dev http://codereview.appspot.com/183049
2009-12-24Add query to find number of subexpressions.Peter Froehlich2-0/+31
This was convenient for me to have without being forced to parse the regexp myself. I'd understand if it's not really wanted, but I also think that some meta information about compiled regexps would be fine. R=r, rsc CC=golang-dev http://codereview.appspot.com/183044 Committer: Rob Pike <r@golang.org>
2009-12-23remove nums.shRobert Griesemer1-5/+0
R=rsc CC=golang-dev http://codereview.appspot.com/181049
2009-12-24implement .repeats for maps.Rob Pike2-27/+37
Fixes issue 309. R=rsc CC=golang-dev http://codereview.appspot.com/181044
2009-12-24make 6prof (sic) architecture-independent.Rob Pike1-38/+192
for now, it's amd64 and 386 only but it's trivial to add more. Fixes issue 385. (why couldn't it have been issue 386?) tested for amd64 and 386 on darwin. R=rsc CC=golang-dev http://codereview.appspot.com/182043
2009-12-23crypto/tls: extensions and Next Protocol NegotiationAdam Langley9-28/+379
Add support for TLS extensions in general and Next Protocol Negotiation in particular. R=rsc CC=golang-dev http://codereview.appspot.com/181045
2009-12-23cgo: don't overwrite p.CrefsDevon H. O'Dell1-1/+3
It's expected to be shared between all files so that all types are output. Fixes bug reported on mailing list by Peter Froehlich. R=rsc, phf CC=golang-dev http://codereview.appspot.com/183043 Committer: Russ Cox <rsc@golang.org>
2009-12-23Fix comment for Chmod.Peter Froehlich1-1/+1
R=r, rsc CC=golang-dev http://codereview.appspot.com/183042 Committer: Russ Cox <rsc@golang.org>
2009-12-22Cleanup: remove Exp ending in identifiersRobert Griesemer5-198/+198
as it is not needed anymore (only one impl. of vector package). Makefile, vector_test.go, and nogen_test.go were modified manually (find/replace), the other files (intvector_test.go, strinvector_test.go are generated). Runs all tests. R=r http://codereview.appspot.com/182041
2009-12-22Replace container/vector with exp/vector (faster).Robert Griesemer17-1397/+640
Manual changes to the following files: src/pkg/Makefile src/pkg/exp/vector/Makefile (now: src/pkg/container/vector/Makefile) R=rsc, r CC=golang-dev http://codereview.appspot.com/181041
2009-12-22add comment (warning about generated files)Robert Griesemer6-3/+18
R=r CC=golang-dev http://codereview.appspot.com/180108
2009-12-23fix up %pRob Pike2-4/+19
- use an interface {Get()} - implement Get for maps, slices - for slices, retrieves the address of the end of the array, which will give the same value for every slice of the same array. R=rsc CC=golang-dev http://codereview.appspot.com/179129
2009-12-22json: fix doc commentRuss Cox1-1/+1
R=gri CC=golang-dev http://codereview.appspot.com/179128
2009-12-22Allow %p on reference types, for debugging.Rob Pike2-18/+15
(Also fix case sensitivity in test for PTR inside fmt_test.go) Fixes issue 441. R=rsc, iant CC=golang-dev http://codereview.appspot.com/180112
2009-12-21update test.sh so it can run to completion againRobert Griesemer1-1/+1
R=r CC=golang-dev http://codereview.appspot.com/179120
2009-12-21Experimental alternative implementation of the vector packageJan Mercl12-0/+2152
R=gri CC=rsc http://codereview.appspot.com/178048 Committer: Robert Griesemer <gri@golang.org>
2009-12-218g: add TESTL etc to reg optRuss Cox1-0/+3
Fixes issue 436. R=ken2 http://codereview.appspot.com/180105
2009-12-21cgo: interpret $CGOPKGDIR as absolute path if rootedRuss Cox3-5/+16
R=dho CC=golang-dev http://codereview.appspot.com/180099
2009-12-18gc: method expressions on concrete typesRuss Cox5-18/+39
R=ken2 http://codereview.appspot.com/180092
2009-12-19new comments for bytes.NewBuffer and NewBufferString.Rob Pike1-8/+12
corrects a common misunderstanding about NewBuffer. R=rsc CC=golang-dev http://codereview.appspot.com/179106
2009-12-18runtime: fix race conditionAdam Langley2-5/+3
(Thanks to ken and rsc for pointing this out) rsc: ken pointed out that there's a race in the new one-lock-per-channel code. the issue is that if one goroutine has gone to sleep doing select { case <-c1: case <-c2: } and then two more goroutines try to send on c1 and c2 simultaneously, the way that the code makes sure only one wins is the selgen field manipulation in dequeue: // if sgp is stale, ignore it if(sgp->selgen != sgp->g->selgen) { //prints("INVALID PSEUDOG POINTER\n"); freesg(c, sgp); goto loop; } // invalidate any others sgp->g->selgen++; but because the global lock is gone both goroutines will be fiddling with sgp->g->selgen at the same time. This results in a 7% slowdown in the single threaded case for a ping-pong microbenchmark. Since the cas predominantly succeeds, adding a simple check first didn't make any difference. R=rsc CC=golang-dev http://codereview.appspot.com/180068
2009-12-18fix build, enable an exp/eval's assignment checkRobert Griesemer1-5/+1
now that the parser doesn't do this test anymore R=rsc CC=golang-dev http://codereview.appspot.com/179105
2009-12-18report an error for illegal octal numbers instead of treating them as floatsRobert Griesemer2-23/+95
added more test cases some capitalization cleanups R=rsc CC=golang-dev http://codereview.appspot.com/180085
2009-12-18removed semantic check from parsersRobert Griesemer2-6/+0
R=rsc CC=golang-dev http://codereview.appspot.com/179099
2009-12-17Make.pkg: fix cgo for TARG=a/bRuss Cox1-2/+2
R=dho, phf CC=golang-dev http://codereview.appspot.com/180082
2009-12-17cgo: include line number information to keep go/printer happyRuss Cox1-1/+2
Fixes issue 443. R=dho CC=golang-dev http://codereview.appspot.com/179095
2009-12-17 first stub for softfloats, intercepts float instructions and skipsKai Backman10-4/+160
them in the stream. R=rsc http://codereview.appspot.com/174052
2009-12-17fix for gofmt rewrite matcher bugRobert Griesemer1-0/+3
R=rsc CC=golang-dev http://codereview.appspot.com/179096
2009-12-17gc: fix compiler crashRuss Cox1-0/+2
R=ken2 CC=dho http://codereview.appspot.com/179097
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