summaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-04-10fix typo breaking linux buildRob Pike1-1/+1
R=rsc OCL=27304 CL=27304
2009-04-09change representation of stringsKen Thompson1-4/+32
R=r OCL=27293 CL=27293
2009-04-09Start list of default formatters for template variables.Rob Pike5-7/+53
The HTML one here is just a stub - should use an HTML library to do the right thing. R=rsc DELTA=54 (47 added, 2 deleted, 5 changed) OCL=27250 CL=27250
2009-04-08move template into its own directory so it can have more filesRob Pike4-5/+59
R=rsc DELTA=1421 (736 added, 685 deleted, 0 changed) OCL=27249 CL=27249
2009-04-08add support for variable formattersRob Pike3-57/+91
R=rsc DELTA=134 (75 added, 41 deleted, 18 changed) OCL=27245 CL=27247
2009-04-08yet another attempt at auto-linkingRuss Cox1-2/+4
store only the original import path string (+ .a) if 6g resolves it to an archive file. let 6l re-resolve the .a at link time. this lets libraries build against an archive in the current directory but get used against an installed archive. R=r OCL=27244 CL=27244
2009-04-08undo workaround pending real fixRob Pike1-1/+0
R=rsc OCL=27243 CL=27243
2009-04-08work around link bugRob Pike1-0/+1
R=rsc OCL=27242 CL=27242
2009-04-08First cut at templating library for text generationRob Pike3-0/+668
R=rsc DELTA=663 (663 added, 0 deleted, 0 changed) OCL=27239 CL=27241
2009-04-08Add new functions to the iterable package:David Symonds2-24/+99
- Filter - Find - Partition R=rsc APPROVED=rsc DELTA=117 (92 added, 17 deleted, 8 changed) OCL=27135 CL=27240
2009-04-07fumbly fingers + non-working ^CRuss Cox2-9/+23
submitted CL without applying edits. make changes from CL 27142 review R=r DELTA=26 (17 added, 3 deleted, 6 changed) OCL=27155 CL=27199
2009-04-07throw away . and .. in directory listingsRuss Cox3-2/+13
R=r DELTA=13 (11 added, 0 deleted, 2 changed) OCL=27147 CL=27154
2009-04-07ChdirRuss Cox3-0/+17
R=r DELTA=17 (17 added, 0 deleted, 0 changed) OCL=27146 CL=27153
2009-04-07add path.Clean and other utilities.Russ Cox4-2/+290
use path.Clean in web server to sanitize URLs. http://triv/go/../../../etc/passwd no longer serves the password file. it redirects to http://triv/etc/passwd which then gets a 404. R=r DELTA=288 (286 added, 0 deleted, 2 changed) OCL=27142 CL=27152
2009-04-07add error case in doc for Index. simplify code slightly.Rob Pike1-4/+5
R=rsc DELTA=5 (1 added, 0 deleted, 4 changed) OCL=27148 CL=27151
2009-04-06make NewBufRead etc. idempotentRob Pike2-4/+63
R=rsc DELTA=63 (59 added, 0 deleted, 4 changed) OCL=27143 CL=27143
2009-04-06add method Value() Value to InterfaceValue.Russ Cox4-22/+28
use Value() in print to print underlying value from interface. before: package main import "fmt" func main() { x := []interface{} {1, "hello", 2.5}; fmt.Println(x[0], x[1], x[2], x); } 1 hello 2.5 [<non-nil interface> <non-nil interface> <non-nil interface>] after: 1 hello 2.5 [1 hello 2.5] R=r DELTA=44 (22 added, 16 deleted, 6 changed) OCL=27139 CL=27141
2009-04-06an early 6g limitation forced the use ofRuss Cox4-4/+4
string(b)[0:n] instead of the more direct string(b[0:n]). convert to the more direct form. R=r DELTA=5 (0 added, 0 deleted, 5 changed) OCL=27082 CL=27140
2009-04-06Extremely minor fix to ByteBuffer.Peter McKenzie1-1/+1
R=r APPROVED=r DELTA=1 (0 added, 0 deleted, 1 changed) OCL=27123 CL=27130
2009-04-05Add an Iterable package with handy functions like All, Any and Map.David Symonds4-3/+175
Add a Data method to vector.Vector. R=r,rsc APPROVED=rsc DELTA=173 (170 added, 0 deleted, 3 changed) OCL=26980 CL=27098
2009-04-03fix both of anton's bugs:Russ Cox1-1/+1
* make([100]int) was being compiled to make([]int), kind of. * []this = [100]that was working for any this, that. turned up a typo in pipe_test.go R=ken OCL=27081 CL=27081
2009-04-02change in negationRobert Griesemer1-1/+1
R=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=27061 CL=27061
2009-04-02require ";" separator after function literalsRobert Griesemer1-0/+1
R=rsc DELTA=1 (1 added, 0 deleted, 0 changed) OCL=27057 CL=27059
2009-04-02- Ident node now takes a string Value instead of a []bytesRobert Griesemer2-11/+11
(this removes a lot of string() conversions down the road) - a few minor adjustments R=rsc DELTA=11 (0 added, 0 deleted, 11 changed) OCL=27029 CL=27038
2009-04-02Some AST tuning:Robert Griesemer2-89/+89
- have explicit XSpec nodes for declarations - have a general GenDecl node instead of DeclList R=rsc DELTA=164 (52 added, 52 deleted, 60 changed) OCL=27005 CL=27027
2009-04-01Add a DeepEqual function to the reflect packageDaniel Nadasi3-1/+168
R=r,rsc APPROVED=rsc DELTA=167 (166 added, 0 deleted, 1 changed) OCL=26982 CL=27017
2009-04-01use range in vector iteratorRob Pike1-2/+2
R=rsc DELTA=2 (0 added, 0 deleted, 2 changed) OCL=27003 CL=27003
2009-03-311) Move parser.go into src/lib/goRobert Griesemer5-25/+2054
- minor adjustments as suggested by rsc 2) Added parser_test fragment 3) Renamed some types in AST.go per rsc request R=rsc DELTA=2053 (2027 added, 0 deleted, 26 changed) OCL=26963 CL=26971
2009-03-30Separate the alignment of a field from the alignment of theIan Lance Taylor1-38/+111
type of the field. Use the field alignment to compute the size of a structure. This may help 8g but is mainly for gccgo. gccgo maintains the standard C/C++ ABI for structure field alignment. For the i386, this requires that a float64 field in a struct be aligned on a 32-bit boundary, although for efficiency a variable of type float64 or []float64 should be aligned on a 64-bit boundary. I also removed the unused size field from structField. R=r DELTA=117 (75 added, 2 deleted, 40 changed) OCL=26842 CL=26936
2009-03-30log.Stderr should actually go to stderr.David Symonds1-1/+1
R=r APPROVED=r DELTA=1 (0 added, 0 deleted, 1 changed) OCL=26926 CL=26928
2009-03-27- have explicit KeyValueExpr node instead of BinaryExpr ':' (as discussed)Robert Griesemer2-12/+17
- remove ':' token from operator precedence levels R=rsc DELTA=25 (13 added, 8 deleted, 4 changed) OCL=26850 CL=26854
2009-03-27Verify that "byte" is an alias for "uint8".Ian Lance Taylor1-0/+6
R=r DELTA=6 (6 added, 0 deleted, 0 changed) OCL=26836 CL=26841
2009-03-27integrate feedback from rscRobert Griesemer1-2/+2
R=rsc DELTA=2 (0 added, 0 deleted, 2 changed) OCL=26810 CL=26834
2009-03-26Add a few tests which weren't being run.Ian Lance Taylor1-0/+2
R=r DELTA=4 (4 added, 0 deleted, 0 changed) OCL=26797 CL=26814
2009-03-26minor tweaks:Robert Griesemer2-15/+40
- permit scanner to run w/o error handler - provide an error counter R=iant DELTA=43 (25 added, 0 deleted, 18 changed) OCL=26804 CL=26812
2009-03-26rename redefined symbolsRob Pike1-4/+4
R=iant DELTA=4 (0 added, 0 deleted, 4 changed) OCL=26802 CL=26811
2009-03-26move AST into src/lib/goRobert Griesemer2-2/+759
R=r DELTA=1509 (756 added, 751 deleted, 2 changed) OCL=26799 CL=26801
2009-03-26fix scanner initialization, add testRobert Griesemer2-2/+27
R=r DELTA=27 (25 added, 0 deleted, 2 changed) OCL=26798 CL=26798
2009-03-26- renamed scanner.Location to token.PositionRobert Griesemer3-64/+74
- by moving Position into token, scanner dependencies are removed from several files - clearer field names in token.Position, now possible to have a Pos() accessor w/o naming conflicts - added Pos() accessor - use anonymous token.Position field in AST nodes R=r DELTA=244 (28 added, 55 deleted, 161 changed) OCL=26786 CL=26793
2009-03-26EncodeRuneToStringRobert Griesemer2-0/+22
R=rsc DELTA=22 (22 added, 0 deleted, 0 changed) OCL=26779 CL=26792
2009-03-26- introduce explicit Token typeRobert Griesemer3-26/+29
- convert some functions into methods - corresponding changes in pretty R=r DELTA=57 (3 added, 0 deleted, 54 changed) OCL=26764 CL=26777
2009-03-23iterator for vectorRob Pike2-0/+35
R=rsc DELTA=35 (35 added, 0 deleted, 0 changed) OCL=26662 CL=26662
2009-03-18Make adler32 cleaner.Tom Szymanski2-13/+16
R=rsc APPROVED=rsc DELTA=22 (9 added, 6 deleted, 7 changed) OCL=26498 CL=26500
2009-03-16added &^ and &^=Robert Griesemer3-2/+14
R=rsc DELTA=14 (12 added, 0 deleted, 2 changed) OCL=26278 CL=26348
2009-03-12make 6g constants behave as ken proposes. (i hope.)Russ Cox2-2/+2
various bug fixes and tests involving constants. test/const1.go is the major new test case. R=ken OCL=26216 CL=26224
2009-03-12- remove special handling of '\n' characters (used to be treated as commentsRobert Griesemer2-187/+181
for pretty printer purposes - now properly ignored as white space since we have line/col information) - changed sample use in comment to an actually compiled function to make sure sample is actually working - added extra tests (checking line and column values, and the tokenize function) R=rsc DELTA=253 (61 added, 67 deleted, 125 changed) OCL=26143 CL=26181
2009-03-11Rename os.FD to os.File.Russ Cox14-177/+255
Make Fstat, Readdirnames, and Readdir methods on os.File. R=r DELTA=281 (79 added, 3 deleted, 199 changed) OCL=25891 CL=26130
2009-03-11document jsonRuss Cox3-11/+113
R=r DELTA=115 (102 added, 0 deleted, 13 changed) OCL=25953 CL=26128
2009-03-11- scanner to track line/col number instead of byte position onlyRobert Griesemer3-69/+73
- fixed a parameter name in tabwriter R=rsc DELTA=110 (21 added, 17 deleted, 72 changed) OCL=26123 CL=26127
2009-03-11document httpRuss Cox3-21/+80
R=r DELTA=84 (63 added, 4 deleted, 17 changed) OCL=25950 CL=26126