Rob Pike
91a2ac1f1e
undo workaround pending real fix
...
R=rsc
OCL=27243
CL=27243
2009-04-08 22:24:40 -07:00
Rob Pike
a029f1eb7e
work around link bug
...
R=rsc
OCL=27242
CL=27242
2009-04-08 22:17:09 -07:00
Rob Pike
df0b471533
First cut at templating library for text generation
...
R=rsc
DELTA=663 (663 added, 0 deleted, 0 changed)
OCL=27239
CL=27241
2009-04-08 22:08:55 -07:00
David Symonds
03fbd72ddb
Add new functions to the iterable package:
...
- Filter
- Find
- Partition
R=rsc
APPROVED=rsc
DELTA=117 (92 added, 17 deleted, 8 changed)
OCL=27135
CL=27240
2009-04-08 21:50:40 -07:00
Russ Cox
7cbec417b1
fumbly fingers + non-working ^C
...
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-07 21:53:39 -07:00
Russ Cox
f13ce3ab34
throw away . and .. in directory listings
...
R=r
DELTA=13 (11 added, 0 deleted, 2 changed)
OCL=27147
CL=27154
2009-04-07 00:40:50 -07:00
Russ Cox
61ba160120
Chdir
...
R=r
DELTA=17 (17 added, 0 deleted, 0 changed)
OCL=27146
CL=27153
2009-04-07 00:40:36 -07:00
Russ Cox
16b38b554f
add path.Clean and other utilities.
...
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-07 00:40:07 -07:00
Rob Pike
640f3f25dc
add error case in doc for Index. simplify code slightly.
...
R=rsc
DELTA=5 (1 added, 0 deleted, 4 changed)
OCL=27148
CL=27151
2009-04-07 00:32:16 -07:00
Rob Pike
ee19695cfc
make NewBufRead etc. idempotent
...
R=rsc
DELTA=63 (59 added, 0 deleted, 4 changed)
OCL=27143
CL=27143
2009-04-06 21:42:14 -07:00
Russ Cox
ac6ebfdea9
add method Value() Value to InterfaceValue.
...
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-06 21:28:04 -07:00
Russ Cox
b80fdd1e3b
an early 6g limitation forced the use of
...
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-06 21:14:38 -07:00
Peter McKenzie
0ea0919534
Extremely minor fix to ByteBuffer.
...
R=r
APPROVED=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=27123
CL=27130
2009-04-06 17:03:07 -07:00
David Symonds
7b77851275
Add an Iterable package with handy functions like All, Any and Map.
...
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-05 22:40:40 -07:00
Russ Cox
907cb4f1e6
fix both of anton's bugs:
...
* 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-03 23:20:51 -07:00
Robert Griesemer
461fb39367
change in negation
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=27061
CL=27061
2009-04-02 23:26:55 -07:00
Robert Griesemer
27d1159ab4
require ";" separator after function literals
...
R=rsc
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=27057
CL=27059
2009-04-02 22:59:57 -07:00
Robert Griesemer
e3fdcdfea7
- Ident node now takes a string Value instead of a []bytes
...
(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-02 15:58:38 -07:00
Robert Griesemer
3ba69bf08b
Some AST tuning:
...
- 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-02 10:15:58 -07:00
Daniel Nadasi
c4ad4f9fcf
Add a DeepEqual function to the reflect package
...
R=r,rsc
APPROVED=rsc
DELTA=167 (166 added, 0 deleted, 1 changed)
OCL=26982
CL=27017
2009-04-01 22:20:18 -07:00
Rob Pike
62d11a3302
use range in vector iterator
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=27003
CL=27003
2009-04-01 16:34:25 -07:00
Robert Griesemer
07513c2599
1) Move parser.go into src/lib/go
...
- 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-31 16:53:37 -07:00
Ian Lance Taylor
4e84174816
Separate the alignment of a field from the alignment of the
...
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-30 23:19:31 -07:00
David Symonds
79b55e226a
log.Stderr should actually go to stderr.
...
R=r
APPROVED=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=26926
CL=26928
2009-03-30 19:01:59 -07:00
Robert Griesemer
7cba8e6f72
- have explicit KeyValueExpr node instead of BinaryExpr ':' (as discussed)
...
- remove ':' token from operator precedence levels
R=rsc
DELTA=25 (13 added, 8 deleted, 4 changed)
OCL=26850
CL=26854
2009-03-27 19:26:03 -07:00
Ian Lance Taylor
5617028ab6
Verify that "byte" is an alias for "uint8".
...
R=r
DELTA=6 (6 added, 0 deleted, 0 changed)
OCL=26836
CL=26841
2009-03-27 13:43:50 -07:00
Robert Griesemer
5019a8db7f
integrate feedback from rsc
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=26810
CL=26834
2009-03-27 09:49:11 -07:00
Ian Lance Taylor
a52d6fb73a
Add a few tests which weren't being run.
...
R=r
DELTA=4 (4 added, 0 deleted, 0 changed)
OCL=26797
CL=26814
2009-03-26 22:20:27 -07:00
Robert Griesemer
3f9da82904
minor tweaks:
...
- 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-26 22:13:49 -07:00
Rob Pike
8e39472e3b
rename redefined symbols
...
R=iant
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=26802
CL=26811
2009-03-26 22:04:34 -07:00
Robert Griesemer
b499da48a4
move AST into src/lib/go
...
R=r
DELTA=1509 (756 added, 751 deleted, 2 changed)
OCL=26799
CL=26801
2009-03-26 17:51:44 -07:00
Robert Griesemer
e4db08d26d
fix scanner initialization, add test
...
R=r
DELTA=27 (25 added, 0 deleted, 2 changed)
OCL=26798
CL=26798
2009-03-26 17:40:51 -07:00
Robert Griesemer
5a72ca45fb
- renamed scanner.Location to token.Position
...
- 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-26 16:08:44 -07:00
Robert Griesemer
b923b01665
EncodeRuneToString
...
R=rsc
DELTA=22 (22 added, 0 deleted, 0 changed)
OCL=26779
CL=26792
2009-03-26 16:05:30 -07:00
Robert Griesemer
cc8e4fb485
- introduce explicit Token type
...
- 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-26 10:53:14 -07:00
Rob Pike
8d44052b6d
iterator for vector
...
R=rsc
DELTA=35 (35 added, 0 deleted, 0 changed)
OCL=26662
CL=26662
2009-03-23 17:46:59 -07:00
Tom Szymanski
658ca49898
Make adler32 cleaner.
...
R=rsc
APPROVED=rsc
DELTA=22 (9 added, 6 deleted, 7 changed)
OCL=26498
CL=26500
2009-03-18 14:57:55 -07:00
Robert Griesemer
1b141ca068
added &^ and &^=
...
R=rsc
DELTA=14 (12 added, 0 deleted, 2 changed)
OCL=26278
CL=26348
2009-03-16 14:20:08 -07:00
Russ Cox
8f194bf5ff
make 6g constants behave as ken proposes. (i hope.)
...
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 19:04:38 -07:00
Robert Griesemer
6f321e28f4
- remove special handling of '\n' characters (used to be treated as comments
...
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-12 11:04:11 -07:00
Russ Cox
7a706fb3d7
Rename os.FD to os.File.
...
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-11 12:51:10 -07:00
Russ Cox
6479d89378
document json
...
R=r
DELTA=115 (102 added, 0 deleted, 13 changed)
OCL=25953
CL=26128
2009-03-11 12:50:58 -07:00
Robert Griesemer
68c69fac9e
- scanner to track line/col number instead of byte position only
...
- fixed a parameter name in tabwriter
R=rsc
DELTA=110 (21 added, 17 deleted, 72 changed)
OCL=26123
CL=26127
2009-03-11 12:48:45 -07:00
Russ Cox
32bf48c6d8
document http
...
R=r
DELTA=84 (63 added, 4 deleted, 17 changed)
OCL=25950
CL=26126
2009-03-11 12:45:53 -07:00
Rob Pike
5559ff6ece
fix old-style print call in constant
...
R=rsc
OCL=26093
CL=26093
2009-03-10 20:47:42 -07:00
Robert Griesemer
915f176f7f
- fixing (internal) capitalization
...
R=rsc
DELTA=7 (0 added, 0 deleted, 7 changed)
OCL=26080
CL=26080
2009-03-10 18:09:13 -07:00
Robert Griesemer
d671daf7f7
- allow unicode digits in identifiers
...
- fixed a bug with character escapes (before: allowed arbitrary long sequences)
R=r
DELTA=63 (33 added, 19 deleted, 11 changed)
OCL=26010
CL=26070
2009-03-10 17:08:05 -07:00
Rob Pike
4cbfcae3d8
add unicode data for decimal digit, preparatory to allowing them in identifiers.
...
R=rsc
DELTA=431 (430 added, 0 deleted, 1 changed)
OCL=25975
CL=26059
2009-03-10 16:30:27 -07:00
Robert Griesemer
6906e3b884
- incorporate suggestions from previous code review
...
R=rsc
DELTA=64 (18 added, 3 deleted, 43 changed)
OCL=26046
CL=26058
2009-03-10 16:30:26 -07:00
Robert Griesemer
e7980732ee
tabwriter documentation
...
R=rsc
DELTA=62 (31 added, 5 deleted, 26 changed)
OCL=26022
CL=26040
2009-03-10 14:55:04 -07:00
Robert Griesemer
efbb120d8e
- more documentation adjustments
...
R=rsc
DELTA=6 (0 added, 1 deleted, 5 changed)
OCL=25970
CL=25973
2009-03-09 18:53:11 -07:00
Rob Pike
1fe42e2d4d
delete float80 from libraries
...
R=rsc
DELTA=40 (0 added, 38 deleted, 2 changed)
OCL=25969
CL=25969
2009-03-09 18:00:41 -07:00
Rob Pike
3bc6fd63fe
document reflect.
...
R=rsc
DELTA=201 (90 added, 0 deleted, 111 changed)
OCL=25904
CL=25966
2009-03-09 17:47:15 -07:00
Robert Griesemer
5bd5242bcc
Fixing comment.
...
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=25956
CL=25960
2009-03-09 17:30:38 -07:00
Robert Griesemer
2aa77352fc
scanner.go documentation
...
R=r
DELTA=22 (8 added, 3 deleted, 11 changed)
OCL=25947
CL=25955
2009-03-09 17:16:42 -07:00
Robert Griesemer
cdd9539362
token.go documentation
...
R=r
DELTA=34 (24 added, 2 deleted, 8 changed)
OCL=25946
CL=25954
2009-03-09 17:13:15 -07:00
Robert Griesemer
dc5ddd7d84
- directory rename lang -> go
...
R=rsc
DELTA=2070 (1035 added, 1035 deleted, 0 changed)
OCL=25939
CL=25939
2009-03-09 12:41:53 -07:00
Rob Pike
5dd4ef5716
document bufio
...
R=rsc
DELTA=61 (27 added, 2 deleted, 32 changed)
OCL=25877
CL=25889
2009-03-07 16:57:01 -08:00
Rob Pike
333cdd8f2a
document os
...
R=rsc
DELTA=143 (96 added, 0 deleted, 47 changed)
OCL=25876
CL=25888
2009-03-07 16:56:44 -08:00
Rob Pike
1910a7c595
document hash
...
R=rsc
DELTA=50 (33 added, 4 deleted, 13 changed)
OCL=25878
CL=25887
2009-03-07 16:56:21 -08:00
Rob Pike
c5560d3aaa
document time
...
R=rsc
DELTA=42 (23 added, 1 deleted, 18 changed)
OCL=25881
CL=25886
2009-03-07 16:56:05 -08:00
Russ Cox
1e37e8a417
document Conn interface better, in preparation
...
for per-method interface documentation
by mkdoc.pl.
implement timeouts on network reads
and use them in dns client.
also added locks on i/o to ensure writes
are not interlaced.
R=r
DELTA=340 (272 added, 25 deleted, 43 changed)
OCL=25799
CL=25874
2009-03-06 17:51:31 -08:00
Rob Pike
b0609f14d2
document sort
...
R=rsc
DELTA=20 (20 added, 0 deleted, 0 changed)
OCL=25869
CL=25872
2009-03-06 17:29:25 -08:00
Rob Pike
6f07796e86
document syscall. all we do is redirect elsewhere.
...
R=rsc
DELTA=7 (7 added, 0 deleted, 0 changed)
OCL=25859
CL=25871
2009-03-06 17:20:53 -08:00
Rob Pike
99d00eae3c
delete vestigial references to package syscall
...
R=rsc
DELTA=8 (0 added, 5 deleted, 3 changed)
OCL=25857
CL=25861
2009-03-06 16:03:59 -08:00
Rob Pike
7bb335c7de
document io
...
R=rsc
DELTA=44 (30 added, 4 deleted, 10 changed)
OCL=25819
CL=25835
2009-03-06 03:43:44 -08:00
Rob Pike
5b4fa1ad22
document once
...
R=rsc
DELTA=14 (7 added, 5 deleted, 2 changed)
OCL=25818
CL=25834
2009-03-06 03:36:50 -08:00
Rob Pike
85647c94e6
document fmt.
...
the description of the format verbs still needs to be done.
R=rsc
DELTA=288 (88 added, 12 deleted, 188 changed)
OCL=25814
CL=25833
2009-03-06 03:35:38 -08:00
Rob Pike
b18e418410
document unicode, such as it is
...
R=rsc
DELTA=18 (9 added, 0 deleted, 9 changed)
OCL=25817
CL=25832
2009-03-06 03:22:02 -08:00
Rob Pike
6b8ac0a9e4
document rand
...
R=rsc
DELTA=27 (16 added, 8 deleted, 3 changed)
OCL=25804
CL=25813
2009-03-05 19:26:27 -08:00
Rob Pike
37656ad568
document container/intvector
...
R=rsc
DELTA=15 (15 added, 0 deleted, 0 changed)
OCL=25794
CL=25812
2009-03-05 19:22:06 -08:00
Rob Pike
dfe0853255
document utf8
...
R=rsc
DELTA=18 (12 added, 0 deleted, 6 changed)
OCL=25807
CL=25811
2009-03-05 19:15:13 -08:00
Rob Pike
681299a444
document testing and incidentally gotest
...
R=rsc
DELTA=25 (25 added, 0 deleted, 0 changed)
OCL=25798
CL=25802
2009-03-05 17:50:36 -08:00
Rob Pike
0f7306b78c
document strings
...
R=rsc
DELTA=9 (4 added, 0 deleted, 5 changed)
OCL=25793
CL=25795
2009-03-05 17:02:34 -08:00
Russ Cox
c93da7c70a
net: doc, doc-inspired cleanup
...
R=r
DELTA=368 (87 added, 14 deleted, 267 changed)
OCL=25773
CL=25786
2009-03-05 15:48:12 -08:00
Russ Cox
5bf0fbe7a8
strconv: doc
...
R=r
DELTA=110 (64 added, 19 deleted, 27 changed)
OCL=25761
CL=25782
2009-03-05 15:29:04 -08:00
Russ Cox
8a7eb77880
misc doc
...
R=r
DELTA=50 (28 added, 0 deleted, 22 changed)
OCL=25763
CL=25770
2009-03-05 13:35:45 -08:00
Rob Pike
5b814d02f2
delete deprecated files.
...
deletion beats documentation for deprecation.
R=rsc,gri
DELTA=509 (2 added, 490 deleted, 17 changed)
OCL=25737
CL=25768
2009-03-05 13:31:03 -08:00
Russ Cox
dfc3910afa
math: doc
...
R=r
DELTA=173 (74 added, 14 deleted, 85 changed)
OCL=25753
CL=25767
2009-03-05 13:31:01 -08:00
Rob Pike
83de0698d6
document vector
...
R=rsc
DELTA=36 (30 added, 0 deleted, 6 changed)
OCL=25740
CL=25766
2009-03-05 13:30:39 -08:00
Rob Pike
26cb4df726
log: document
...
R=rsc
DELTA=26 (17 added, 1 deleted, 8 changed)
OCL=25731
CL=25734
2009-03-04 22:46:44 -08:00
Rob Pike
0ea27e345e
flag: document
...
also write to stderr not stdout
R=rsc
DELTA=48 (38 added, 2 deleted, 8 changed)
OCL=25729
CL=25733
2009-03-04 22:43:51 -08:00
Rob Pike
d1ac21849e
delete bogus vestige
...
R=rsc
OCL=25730
CL=25730
2009-03-04 22:03:35 -08:00
Rob Pike
927678694c
typos
...
R=gri
DELTA=3 (0 added, 1 deleted, 2 changed)
OCL=25728
CL=25728
2009-03-04 21:41:12 -08:00
Russ Cox
8ba287585a
sync: add documentation
...
R=r
DELTA=63 (57 added, 1 deleted, 5 changed)
OCL=25727
CL=25727
2009-03-04 21:30:07 -08:00
Rob Pike
a0feb32567
remove some incorrect capitalizations.
...
add commentary.
R=rsc
DELTA=231 (41 added, 24 deleted, 166 changed)
OCL=25724
CL=25726
2009-03-04 21:06:38 -08:00
Robert Griesemer
bd4f5af107
- missing makefile
...
R=r
OCL=25714
CL=25714
2009-03-04 17:16:58 -08:00
Robert Griesemer
b4802dd568
Created new directory lib/lang:
...
- move scanner to into lib/lang
- added test
- adjusted various make and build files
R=r
DELTA=1731 (973 added, 753 deleted, 5 changed)
OCL=25668
CL=25713
2009-03-04 17:13:12 -08:00
Russ Cox
955638e2fb
disallow ordinary-type.(T), as in spec.
...
R=ken
OCL=25705
CL=25705
2009-03-04 14:50:25 -08:00
Russ Cox
be2edb5761
Automated g4 rollback of changelist 25024,
...
plus significant hand editing.
Back to T{x} for composite literals.
R=r
OCL=25612
CL=25632
2009-03-03 08:39:12 -08:00
Robert Griesemer
ea3d4540b3
- itob
...
- more test cases
R=rsc
DELTA=97 (52 added, 4 deleted, 41 changed)
OCL=25585
CL=25607
2009-03-02 17:52:58 -08:00
Russ Cox
e9b40580ba
fix names: s/fd/r/
...
R=r
DELTA=9 (0 added, 0 deleted, 9 changed)
OCL=25593
CL=25593
2009-03-02 16:12:04 -08:00
Rob Pike
6950491b4f
drop trailing slashes - missed comment from last review
...
TBR=rsc
OCL=25135
CL=25135
2009-02-17 19:59:23 -08:00
Rob Pike
03d6909ff7
more fun with triv.go: flags and arguments
...
R=rsc
DELTA=23 (23 added, 0 deleted, 0 changed)
OCL=25088
CL=25134
2009-02-17 19:35:01 -08:00
Russ Cox
d0424faf17
few more Sizeof.
...
R=r
DELTA=3 (0 added, 1 deleted, 2 changed)
OCL=25106
CL=25106
2009-02-17 13:40:28 -08:00
Rob Pike
575257d503
use proper strconv in string values.
...
make test a little stronger.
R=rsc
DELTA=94 (27 added, 39 deleted, 28 changed)
OCL=25085
CL=25087
2009-02-16 21:55:37 -08:00
Russ Cox
c19468d8df
comment nit
...
R=r
DELTA=2 (0 added, 2 deleted, 0 changed)
OCL=25081
CL=25084
2009-02-16 20:44:29 -08:00
Russ Cox
eb3823a44d
allow hex, octal in Atoi, etc.
...
R=r
DELTA=169 (79 added, 23 deleted, 67 changed)
OCL=25079
CL=25083
2009-02-16 20:44:21 -08:00
Russ Cox
9e3e61627d
proposed XML parser design.
...
inspired by expat's callback interface,
but a bit simpler thanks to go interfaces.
also serves as reference notes about XML.
the parser itself is unimplemented.
not in Makefiles, though it does build.
R=r
DELTA=425 (425 added, 0 deleted, 0 changed)
OCL=25077
CL=25080
2009-02-16 20:14:21 -08:00
Rob Pike
bbc190b3ee
make interface to the flags themselves more public.
...
add visitor functions to scan the flags.
add a way to set a flag.
add a flag test.
R=rsc
DELTA=169 (99 added, 19 deleted, 51 changed)
OCL=25076
CL=25078
2009-02-16 19:43:15 -08:00