summaryrefslogtreecommitdiff
path: root/src/pkg/container
AgeCommit message (Collapse)AuthorFilesLines
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý13-330/+146
2010-05-31vector: undo changes to autogenerated filesFazlul Shahriar7-42/+50
Also, move Do() to vector.go, so that Do() for IntVector and StringVector is autogenerated. The only files edited are Makefile, defs.go, and vector.go. The rest are autogenerated with "make generate". R=r CC=golang-dev, hoisie http://codereview.appspot.com/1435041 Committer: Rob Pike <r@golang.org>
2010-05-31IntVector.Do now takes an f(int), and StringVector.Do now takes an f(string).Michael Hoisie3-23/+17
R=r CC=golang-dev http://codereview.appspot.com/1433041 Committer: Rob Pike <r@golang.org>
2010-05-01vector: use correct capacity in call to makeRuss Cox3-6/+11
R=gri, r, bflm CC=golang-dev http://codereview.appspot.com/1032043
2010-04-23vector: Don't always regenerate {int,string}vector.goEvan Shaw1-2/+2
R=golang-dev, adg CC=golang-dev http://codereview.appspot.com/917042 Committer: Andrew Gerrand <adg@golang.org>
2010-03-30simplify various code using new map index ruleRuss Cox1-3/+3
R=r CC=golang-dev http://codereview.appspot.com/833044
2010-02-03finalizers; merge package malloc into package runtimeRuss Cox1-19/+19
R=r, cw CC=golang-dev http://codereview.appspot.com/198085
2010-01-15Implemented ExtendFront/Back functions to insert a list of elements into a list.Jan H. Hosang2-0/+81
R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/181151 Committer: Russ Cox <rsc@golang.org>
2010-01-13vector: drop rule for bench, now in Make.pkgRuss Cox1-3/+0
R=gri CC=golang-dev http://codereview.appspot.com/186139
2009-12-23remove nums.shRobert Griesemer1-5/+0
R=rsc CC=golang-dev http://codereview.appspot.com/181049
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 Griesemer11-293/+1703
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-15 1) Change default gofmt default settings forRobert Griesemer10-487/+487
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-09remove uses of string concatenation from src and misc directoryRobert Griesemer1-1/+1
R=rsc http://codereview.appspot.com/172041
2009-12-07use a bootstrap array to avoid allocation for short vectorsRobert Griesemer2-16/+30
R=r http://codereview.appspot.com/165078
2009-11-24Replace sort.Sort call with heapify algorithm in Init.Robert Griesemer2-17/+103
Fixed package comment. Renamed some variables for symmetry, added more internal comments and more tests. Fixes issue 304. R=rsc http://codereview.appspot.com/157166
2009-11-24Change to container/vector interface:Robert Griesemer5-92/+137
- 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 issue 294. R=rsc, r, r1 http://codereview.appspot.com/157143
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia4-8/+8
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 issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-18Remove unnecessary execute bits.William Josephson2-0/+0
R=rsc http://codereview.appspot.com/156077 Committer: Russ Cox <rsc@golang.org>
2009-11-11vector: s/Element/interface{}/Robert Griesemer2-24/+19
Fixes issue 74. R=rsc http://codereview.appspot.com/154073
2009-11-10better code for a copy loopRobert Griesemer1-2/+2
R=rsc http://codereview.appspot.com/152046
2009-11-09 - replaced gofmt expression formatting algorithm withRobert Griesemer5-21/+21
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-09remove semis after statements in one-statement statement listsRobert Griesemer10-119/+119
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer8-99/+33
- 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-10-13reduce stutter: sort.SortInterface -> sort.Interface.Rob Pike4-14/+14
ditto for heap.HeapInterface R=gri,rsc DELTA=31 (0 added, 1 deleted, 30 changed) OCL=35665 CL=35673
2009-10-08more lgtm files from gofmtRuss Cox1-4/+4
R=gri OCL=35485 CL=35488
2009-10-06another round of gofmt applicationsRuss Cox9-193/+237
R=gri DELTA=900 (106 added, 31 deleted, 763 changed) OCL=35384 CL=35396
2009-09-16add heap.RemoveRuss Cox1-0/+14
R=gri DELTA=14 (14 added, 0 deleted, 0 changed) OCL=34636 CL=34687
2009-09-15more "declared and not used".Russ Cox3-3/+3
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-14fix "declared and not used" errors in non-test code.Russ Cox1-1/+0
R=r DELTA=112 (6 added, 57 deleted, 49 changed) OCL=34610 CL=34610
2009-09-08- clarify vector commentRobert Griesemer2-1/+3
- adjusted a test to check claim R=rsc DELTA=3 (2 added, 0 deleted, 1 changed) OCL=34454 CL=34456
2009-09-02heap algorithmRobert Griesemer3-0/+192
R=rsc DELTA=196 (194 added, 0 deleted, 2 changed) OCL=34234 CL=34263
2009-08-31Consistency changes to container/* packages for iteration.David Symonds7-63/+46
container/list: - change Iter to go over the list values container/ring: - add Iter, drop Forward/Backward container/vector: - add channel direction constraints R=rsc,gri APPROVED=rsc DELTA=86 (23 added, 40 deleted, 23 changed) OCL=33935 CL=34132
2009-08-18container/list: Add InsertBefore and InsertAfter methods.David Symonds2-16/+80
R=rsc APPROVED=rsc DELTA=84 (68 added, 4 deleted, 12 changed) OCL=33493 CL=33499
2009-08-12convert non-low-level non-google pkg codeRuss Cox8-176/+15
to whole-package compilation. R=r OCL=33070 CL=33101
2009-08-10remove unnecessary pkg. referencesRuss Cox3-19/+19
R=r DELTA=95 (0 added, 0 deleted, 95 changed) OCL=33012 CL=33012
2009-07-28Add a unique list ID to list elements, and verify it as necessary.David Symonds1-4/+18
This makes the list closed under its provided operations. R=rsc,gri APPROVED=rsc DELTA=18 (14 added, 0 deleted, 4 changed) OCL=32388 CL=32395
2009-07-28Fixed typos in comments.Robert Griesemer1-4/+4
TBR=rsc OCL=32330 CL=32330
2009-07-28Ring ADT.Robert Griesemer3-0/+495
- Provides analogous functionality to a doubly-linked list implementation. - Completely symmetric set of operations. - Operations on the ADT do not lead to results that are outside the domain of the ADT (closed interface). - Alternative to container/list. R=rsc DELTA=489 (489 added, 0 deleted, 0 changed) OCL=32284 CL=32323
2009-07-25container/list: Add Len() method to List.David Symonds2-0/+23
R=r APPROVED=gri DELTA=23 (23 added, 0 deleted, 0 changed) OCL=32106 CL=32189
2009-06-09mv src/lib to src/pkgRob Pike8-0/+1039
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102