summaryrefslogtreecommitdiff
path: root/src/pkg
AgeCommit message (Collapse)AuthorFilesLines
2009-11-20fix buildRob Pike1-1/+0
R=rsc http://codereview.appspot.com/159044
2009-11-20slight simplification made possible by the code now processing match statesRob Pike1-4/+3
in order of discovery. R=rsc http://codereview.appspot.com/157112
2009-11-20add unimplemented %+ and % (space) flags to floating-point print.Rob Pike2-11/+37
fix %E: was same as %e. add tests. Fixes issue 278. R=rsc CC=golang-dev http://codereview.appspot.com/157111
2009-11-20x[lo:] - gc and runtime.Russ Cox4-54/+45
* 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 http://codereview.appspot.com/157106
2009-11-19add a match arena to regexp to avoid generating garbage.Rob Pike2-46/+133
simple regexps run 20x faster. the regex-dna benchmark goes 3x faster. R=rsc CC=golang-dev http://codereview.appspot.com/156108
2009-11-19reflect fixesRuss Cox3-1/+12
R=r http://codereview.appspot.com/156104
2009-11-19Map support for template.Execute().James Meneghello2-12/+59
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 issue 259. R=r, rsc http://codereview.appspot.com/157088 Committer: Rob Pike <r@golang.org>
2009-11-19Add json.Marshal to json packageMichael Hoisie2-0/+143
R=rsc CC=golang-dev http://codereview.appspot.com/157068 Committer: Russ Cox <rsc@golang.org>
2009-11-19archive/tar: Make Reader and Writer more closely follow io.Reader and ↵Evan Shaw2-2/+2
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 http://codereview.appspot.com/157099 Committer: Russ Cox <rsc@golang.org>
2009-11-19big: fix arm build - forgot how to spell JMPRuss Cox1-7/+7
Fixes issue 269. TBR=kaib http://codereview.appspot.com/156107
2009-11-19two easy optimizations for regexp:Rob Pike2-13/+83
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 http://codereview.appspot.com/157095
2009-11-19Permit omission of hi bound in slices.Robert Griesemer8-25/+71
R=r, rsc http://codereview.appspot.com/157082
2009-11-19Adds benchmark support to gotest.Trevor Strohman4-0/+208
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 http://codereview.appspot.com/154173 Committer: Russ Cox <rsc@golang.org>
2009-11-19build Make.deps during make.bash insteadRuss Cox1-85/+0
of keeping a checked-in copy. doesn't slow down make.bash appreciably. R=r http://codereview.appspot.com/156099
2009-11-19os.ReadAt doesn't return EOF at EOF.Rob Pike1-0/+3
thanks to lionkov for the fix. Fixes issue 262. R=rsc CC=golang-dev http://codereview.appspot.com/156097
2009-11-19runtime: mask signals during signal handler on OS XRuss Cox2-2/+2
Fixes issue 265. R=r CC=golang-dev http://codereview.appspot.com/157084
2009-11-18replace custom findByte with bytes.IndexByteRob Pike2-25/+15
R=rsc http://codereview.appspot.com/156093
2009-11-18big: fix large division.Adam Langley1-13/+19
I missed a case. R=rsc, agl CC=golang-dev http://codereview.appspot.com/156092
2009-11-18add bytes.IndexByte; common case we can make fast later.Rob Pike4-17/+96
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 http://codereview.appspot.com/156091
2009-11-18runtime: fix bug on darwin/amd64 - bad g in bsdthread_startRuss Cox1-2/+2
R=r http://codereview.appspot.com/157077
2009-11-18More FreeBSD-touchups. Thundercats are GOOOOO!Devon H. O'Dell2-8/+8
R=rsc CC=golang-dev http://codereview.appspot.com/157074 Committer: Russ Cox <rsc@golang.org>
2009-11-18crypto/x509: RawContents -> RawContentAdam Langley1-1/+1
TBR=rsc R=rsc http://codereview.appspot.com/157075
2009-11-18asn1: add support for RawContentAdam Langley2-1/+46
R=rsc CC=golang-dev http://codereview.appspot.com/157056
2009-11-18crypto/x509: add certificate support.Adam Langley2-3/+623
R=rsc CC=golang-dev http://codereview.appspot.com/156054
2009-11-18remove bytes.CopyRob Pike19-146/+78
replace all calls with calls to copy use copy in regexp and bytes.Buffer R=rsc CC=golang-dev http://codereview.appspot.com/157073
2009-11-18bugs in memmove:Rob Pike3-6/+7
- has arguments (no stack split) - MOVL does not set condition R=ken2, rsc http://codereview.appspot.com/156086
2009-11-18net: remove race condition on Close.Adam Langley1-16/+31
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 issue 143. R=rsc CC=golang-dev http://codereview.appspot.com/152130 Committer: Adam Langley <agl@golang.org>
2009-11-18big: implement 386 assembly routinesRuss Cox4-29/+184
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 http://codereview.appspot.com/157062
2009-11-18Remove unnecessary execute bits.William Josephson14-0/+0
R=rsc http://codereview.appspot.com/156077 Committer: Russ Cox <rsc@golang.org>
2009-11-18Add an intptr type to runtime; needed in FreeBSDDevon H. O'Dell2-1/+3
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 http://codereview.appspot.com/156073 Committer: Russ Cox <rsc@golang.org>
2009-11-17FreeBSD/i386 workDevon H. O'Dell16-22/+2447
This patchset gets Go to pretty much the same state that FreeBSD/amd64 is in. R=rsc http://codereview.appspot.com/157055 Committer: Russ Cox <rsc@golang.org>
2009-11-17runtime: add ARM memmoveRuss Cox1-0/+248
R=ken2 http://codereview.appspot.com/156063
2009-11-17copy tweaksRuss Cox5-131/+181
* move memmove to arch-specific subdirectories * add memmove for arm * add copyright notices marking them as copied from Inferno R=ken2 http://codereview.appspot.com/156061
2009-11-17add a test for %+v in nested structures.Rob Pike1-0/+18
threw in an embedded one for good measure. R=rsc CC=golang-dev http://codereview.appspot.com/157058
2009-11-17runtime: two trivial but important bug fixesRuss Cox2-2/+2
R=r http://codereview.appspot.com/156059
2009-11-17bug in copyKen Thompson1-1/+1
R=rsc http://codereview.appspot.com/156056
2009-11-17install copy predefinedKen Thompson4-0/+164
did not test 386, but should work shouldnt matter if copy is not used R=rsc http://codereview.appspot.com/156055
2009-11-17crypto/rsa: add PKCS#1 v1.5 signature support.Adam Langley3-0/+179
R=rsc CC=golang-dev http://codereview.appspot.com/156051
2009-11-17asn1:Adam Langley7-161/+705
* 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 http://codereview.appspot.com/156047
2009-11-17reflect: document that PkgPath and Name returnRuss Cox1-0/+2
empty string for unnamed types. Fixes issue 249. R=r http://codereview.appspot.com/156052
2009-11-17http: do not crash accessing r.Form if ParseForm failsRuss Cox2-7/+6
Fixes issue 233. R=dsymonds1 http://codereview.appspot.com/154179
2009-11-17runtime: do not create new threads during malloc.Russ Cox1-2/+5
the signal handling stack is a different size than the normal stack, so it cannot be allocated using the backup stack allocator. Fixes issue 250. R=agl1 CC=golang-dev http://codereview.appspot.com/157044
2009-11-17improve documentation of runtime. there was no mention of types.Rob Pike1-1/+3
R=rsc CC=golang-dev http://codereview.appspot.com/157042
2009-11-17Make non-errored RPC calls return 'nil' error to caller.Aron Nopanen1-2/+17
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 http://codereview.appspot.com/154159 Committer: Rob Pike <r@golang.org>
2009-11-17math: fix argument names in Atan2Russ Cox1-7/+6
(error introduced converting from arg1, arg2) Fixes issue 220. R=r http://codereview.appspot.com/156041
2009-11-17net: enforce timeouts for ReadFrom/WriteToRuss Cox5-23/+81
Fixes issue 153. R=r http://codereview.appspot.com/154177
2009-11-17syscall: use correct pointer in recvfrom/sendto.Russ Cox2-15/+15
linux/386 stack trace: use 32-bit hex. Fixes issue 159. R=r http://codereview.appspot.com/154178
2009-11-17FreeBSD-specific porting work.Devon H. O'Dell28-4/+3843
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 http://codereview.appspot.com/152142 Committer: Russ Cox <rsc@golang.org>
2009-11-16Rework gobs to fix bad bug related to sharing of id's between encoder and ↵Rob Pike6-225/+138
decoder side. Fix is to move all decoder state into the decoder object. Fixes issue 215. R=rsc CC=golang-dev http://codereview.appspot.com/155077
2009-11-16fix bug causing empty strings to be become non-nil errors on client side of ↵Rob Pike2-2/+9
rpc connection. R=rsc CC=golang-dev http://codereview.appspot.com/155078