summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-04-21fix template.Rob Pike1-5/+4
.or works in .repeated so remove the comment. the bug was in the template: .section executes iff the field is non-empty. R=gri DELTA=13 (6 added, 7 deleted, 0 changed) OCL=27710 CL=27712
2009-04-21Extend fixedbugs/bug143.go with function return values,David Symonds1-1/+14
as a regression test for the fix made in s2/27706. R=r APPROVED=r DELTA=14 (13 added, 0 deleted, 1 changed) OCL=27707 CL=27709
2009-04-21Clean up some more code after bug143 was fixed.David Symonds1-6/+1
R=r APPROVED=r DELTA=6 (0 added, 5 deleted, 1 changed) OCL=27708 CL=27708
2009-04-212 minor bugs.Ken Thompson1-2/+2
lv context for some [] operations calling implicit(*map) before walk. R=r OCL=27706 CL=27706
2009-04-21bug in shift of longer operandKen Thompson1-8/+11
by a shorter operand. the bits in the difference were not cheared. R=r OCL=27705 CL=27705
2009-04-21remove lots of accumulated crud:Robert Griesemer11-546/+113
- delete utility files which contained functionality that is now elsewhere (or saved the files away for now) - cleanup Makefile (remove unnecessary deps) - minor adjustments to godoc, fixed a couple of bugs - make pretty.go self-contained TBR=r DELTA=625 (81 added, 510 deleted, 34 changed) OCL=27700 CL=27702
2009-04-21Bug 143 is fixed, so clean up some of exvar.David Symonds1-5/+7
R=r APPROVED=r DELTA=8 (3 added, 1 deleted, 4 changed) OCL=27699 CL=27701
2009-04-21bug143 is fixedRob Pike2-6/+0
R=dsymonds DELTA=58 (26 added, 32 deleted, 0 changed) OCL=27698 CL=27698
2009-04-21supply default indirection toKen Thompson1-0/+2
map indexing - bug 143 R=r OCL=27695 CL=27695
2009-04-21Change exvar to use a goroutine channel worker instead of a mutex for ↵David Symonds3-75/+101
synchronisation. Also it should be more testable, as there's less global state. R=r APPROVED=r DELTA=113 (38 added, 12 deleted, 63 changed) OCL=27653 CL=27694
2009-04-21minor adjustment to comment formatting for better godoc outputRobert Griesemer1-5/+5
R=r DELTA=5 (0 added, 0 deleted, 5 changed) OCL=27687 CL=27689
2009-04-21minor adjustments to comments for better godoc outputRobert Griesemer1-6/+6
R=r DELTA=6 (0 added, 0 deleted, 6 changed) OCL=27686 CL=27688
2009-04-21- documentation for bignum packageRobert Griesemer1-121/+345
- removed some constants from public interface R=r DELTA=375 (238 added, 14 deleted, 123 changed) OCL=27636 CL=27668
2009-04-21update golden for bug 143Rob Pike1-0/+6
R=dsymonds DELTA=6 (6 added, 0 deleted, 0 changed) OCL=27654 CL=27654
2009-04-20Refactor exvar to use interface types, and add mapVar.David Symonds2-34/+164
R=r APPROVED=r DELTA=170 (136 added, 6 deleted, 28 changed) OCL=27628 CL=27652
2009-04-20Add bug143 to demonstrate bug with "v, ok :=" on pointers to maps.David Symonds1-0/+30
R=r APPROVED=r DELTA=26 (26 added, 0 deleted, 0 changed) OCL=27651 CL=27651
2009-04-20rewrite template library:Rob Pike2-251/+417
- separate parsing from execution - rearrange code for organizational clarity - provide execution errors and parse-time errors - implement .or for repeated TBR=rsc OCL=27650 CL=27650
2009-04-20Move iterable package to usr/dsymonds/.David Symonds4-8/+71
R=r APPROVED=r DELTA=598 (330 added, 266 deleted, 2 changed) OCL=27627 CL=27649
2009-04-20- book-keeping in the TODO section:Robert Griesemer1-115/+14
- removed closed, resolved, or off-the-table items - consolidated remaining items - no changes to the spec R=r DELTA=116 (1 added, 102 deleted, 13 changed) OCL=27596 CL=27640
2009-04-20missing '}' (found by pretty)Robert Griesemer1-0/+1
R=r DELTA=1 (1 added, 0 deleted, 0 changed) OCL=27633 CL=27639
2009-04-20Oops, forgot to commit this change.David Symonds1-2/+3
R=r APPROVED=r DELTA=3 (1 added, 0 deleted, 2 changed) OCL=27624 CL=27626
2009-04-20Use the mutex in exvar.Set since map access is not atomic.David Symonds1-0/+3
Imagine your var has a value of zero. If you have a goroutine calling Set(5), and another calling Increment(+1), then you only want one of these outcomes: - Set completes first, and then Increment occurs => 6 - Increment completes first, and then Set occurs => 5 However, you could get a sequence: - read (for Increment) 0 - set (for Set) 5 - write (for Increment) 1 This results in a value of 1, which is undesirable. Kudos to dnadasi for catching this. R=r APPROVED=r DELTA=3 (3 added, 0 deleted, 0 changed) OCL=27625 CL=27625
2009-04-19Add Inject function to iterable package.David Symonds2-4/+33
Fix a couple of style mistakes. R=r,rsc APPROVED=r DELTA=34 (30 added, 1 deleted, 3 changed) OCL=27623 CL=27623
2009-04-19Initial cut at an "exported variables" (exvar) package.David Symonds4-0/+127
This handles integer-valued vars in a singleton struct, and exports functions for incrementing, setting and getting those vars, as well as rendering all the vars in a standard format. Demonstrate the use of the exvar package in the http/triv server. R=dcross,r APPROVED=r DELTA=122 (122 added, 0 deleted, 0 changed) OCL=27617 CL=27622
2009-04-19typo in messageRob Pike1-1/+1
R=ken OCL=27621 CL=27621
2009-04-19add another test to decl to see that result vars are redeclarable.Rob Pike1-0/+8
R=ken OCL=27620 CL=27620
2009-04-19Readn is a silly name when there's no n. Change to FullRead.Rob Pike7-13/+13
R=gri DELTA=15 (0 added, 0 deleted, 15 changed) OCL=27619 CL=27619
2009-04-19spec change for redeclarationRob Pike1-0/+14
R=iant,gri DELTA=14 (14 added, 0 deleted, 0 changed) OCL=27615 CL=27618
2009-04-18tests for redeclaration in :=Rob Pike2-0/+79
R=ken DELTA=71 (71 added, 0 deleted, 0 changed) OCL=27616 CL=27616
2009-04-18the Big Error Shift applied to lib/time/zoneinfo.go.Rob Pike3-17/+22
R=gri DELTA=22 (5 added, 0 deleted, 17 changed) OCL=27608 CL=27614
2009-04-18mixed old/new declarationKen Thompson1-10/+89
exact spec: a) must be a multi-assignment w := b) a proper subset of the lhs can be declared in same block with the same type with no "redeclaration" error R=r OCL=27610 CL=27610
2009-04-17add -P pkgdir option to 6l to have it look first in pkgdir for a package.Rob Pike3-2/+11
this allows gotest to find the locally built package when doing make gotest without this option, one would have to say make install gotest which kinda defeats the purpose based on discussions with rsc. R=ken,rsc DELTA=12 (10 added, 1 deleted, 1 changed) OCL=27606 CL=27606
2009-04-17Step 2 of the Big Error Shift.Rob Pike1-65/+61
Change the representation of errors in "os" to be cleaner. (But they are not really representative of the power of the new scheme.) Step 3 will be to remove all references to os.NewError. Step 4 will be to delete the second half of lib/os/error.go. R=rsc OCL=27587 CL=27587
2009-04-17Step 1 of the Big Error Shift: make os.Error an interface and replace ↵Rob Pike57-339/+341
*os.Errors with os.Errors. lib/template updated to use new setup; its clients also updated. Step 2 will make os's error support internally much cleaner. R=rsc OCL=27586 CL=27586
2009-04-16make string(array) take []byte only (and thus *[10]byte but not [10]byte)Russ Cox1-4/+6
R=ken OCL=27581 CL=27585
2009-04-16make string take []byte only, so have to use *[10]byte to convertRuss Cox2-4/+4
R=r DELTA=4 (0 added, 0 deleted, 4 changed) OCL=27578 CL=27584
2009-04-16regenerate makefile with installed gobuildRuss Cox1-15/+23
R=r DELTA=23 (8 added, 0 deleted, 15 changed) OCL=27577 CL=27583
2009-04-16spec edits for array slice changeRuss Cox1-7/+5
R=r DELTA=6 (0 added, 2 deleted, 4 changed) OCL=27532 CL=27582
2009-04-16fix linux buildRob Pike2-3/+3
R=rsc OCL=27579 CL=27579
2009-04-16Convert go tree to hierarchical pkg directory:Russ Cox59-291/+363
import ( "vector" -> "container/vector" "ast" -> "go/ast" "sha1" -> "hash/sha1" etc. ) and update Makefiles. Because I did the conversion semi-automatically, I sorted all the import blocks as a post-processing. Some files have therefore changed that didn't strictly need to. Rename local packages to lower case. The upper/lower distinction doesn't work on OS X and complicates the "single-package directories with the same package name as directory name" heuristic used by gobuild and godoc to create the correlation between source and binary locations. Now that we have a plan to avoid globally unique names, the upper/lower is unnecessary. The renamings will cause trouble for a few users, but so will the change in import paths. This way, the two maintenance fixes are rolled into one inconvenience. R=r OCL=27573 CL=27575
2009-04-16build packages in obj/ subdirectory that mimics $GOROOT/pkg.Russ Cox4-18/+115
for example, if building in src/lib/container, objects go in obj/container/, so that 6g -Iobj will find "container/vector". install packages in hierarchy in $GOROOT. this change only updates gobuild. another change will have to update all the sources to refer to "container/vector" etc and regenerate all the Makefiles. there are some pretty lame functions here (e.g., Mkdir, Remove, the Getenv("PWD")) but i will implement better ones in another CL. R=r DELTA=117 (99 added, 2 deleted, 16 changed) OCL=27550 CL=27574
2009-04-16document templateRob Pike1-18/+91
R=rsc DELTA=92 (73 added, 0 deleted, 19 changed) OCL=27566 CL=27572
2009-04-16regenerate Makefiles.Russ Cox19-197/+360
fix bug in RPC.go (import "RPC" not "rpc.pb") R=r DELTA=483 (261 added, 64 deleted, 158 changed) OCL=27547 CL=27549
2009-04-16rewrite gobuild in go.Russ Cox8-602/+719
R=r DELTA=1305 (704 added, 590 deleted, 11 changed) OCL=27546 CL=27548
2009-04-15panicln: emit just one newlineRuss Cox1-2/+6
R=ken OCL=27537 CL=27545
2009-04-15fix gotest by fixing nm -s to print in file order by storing a sequence numberRob Pike3-3/+8
as the .6 file is read. now tests will be run in file order. R=rsc DELTA=9 (6 added, 1 deleted, 2 changed) OCL=27542 CL=27544
2009-04-15fix one word for consistency.Rob Pike1-1/+1
R=gri OCL=27543 CL=27543
2009-04-15update tutorial for new slicing rules.Rob Pike1-7/+13
R=rsc DELTA=13 (6 added, 0 deleted, 7 changed) OCL=27539 CL=27541
2009-04-15tweak grammar and associated prose to permit things like x.y in range clauses.Rob Pike1-2/+5
R=rsc DELTA=5 (3 added, 0 deleted, 2 changed) OCL=27536 CL=27540
2009-04-15spec for range on stringsRob Pike1-6/+17
R=rsc,iant DELTA=17 (11 added, 0 deleted, 6 changed) OCL=27529 CL=27535