Age | Commit message (Collapse) | Author | Files | Lines |
|
that pad() still counts bytes, but it's currently only used for
1 byte runes.
Fixes issue 612.
R=r
CC=golang-dev
http://codereview.appspot.com/217064
Committer: Rob Pike <r@golang.org>
|
|
R=gri
CC=golang-dev
http://codereview.appspot.com/223059
|
|
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench
gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench
delete unused imports
R=r
CC=golang-dev
http://codereview.appspot.com/224062
|
|
R=rsc
CC=golang-dev
http://codereview.appspot.com/224051
|
|
Try to avoid infinite recursion if String fails due to
printing a bad type.
Add test for String method with named basic types.
R=r
CC=golang-dev
http://codereview.appspot.com/207102
|
|
add some tests for erroneous formats.
R=rsc
CC=golang-dev
http://codereview.appspot.com/201058
|
|
R=r, cw
CC=golang-dev
http://codereview.appspot.com/198085
|
|
R=rsc
CC=golang-dev
http://codereview.appspot.com/197043
|
|
- use an interface {Get()}
- implement Get for maps, slices
- for slices, retrieves the address of the end of the array, which will give the
same value for every slice of the same array.
R=rsc
CC=golang-dev
http://codereview.appspot.com/179129
|
|
(Also fix case sensitivity in test for PTR inside fmt_test.go)
Fixes issue 441.
R=rsc, iant
CC=golang-dev
http://codereview.appspot.com/180112
|
|
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
2nd set of files.
R=rsc
CC=golang-dev
http://codereview.appspot.com/179067
|
|
a couple of cleanups.
don't keep big buffers in the free list.
R=rsc
CC=golang-dev
http://codereview.appspot.com/166078
|
|
cleans up godoc's output for package fmt substantially.
R=rsc
CC=golang-dev
http://codereview.appspot.com/165070
|
|
Roughly 33% faster for simple cases, probably more for complex ones.
Before:
mallocs per Sprintf(""): 4
mallocs per Sprintf("xxx"): 6
mallocs per Sprintf("%x"): 10
mallocs per Sprintf("%x %x"): 12
Now:
mallocs per Sprintf(""): 2
mallocs per Sprintf("xxx"): 3
mallocs per Sprintf("%x"): 5
mallocs per Sprintf("%x %x"): 7
Speed improves because of avoiding mallocs and also by sharing a bytes.Buffer
between print.go and format.go rather than copying the data back after each
printed item.
Before:
fmt_test.BenchmarkSprintfEmpty 1000000 1346 ns/op
fmt_test.BenchmarkSprintfString 500000 3461 ns/op
fmt_test.BenchmarkSprintfInt 500000 3671 ns/op
Now:
fmt_test.BenchmarkSprintfEmpty 2000000 995 ns/op
fmt_test.BenchmarkSprintfString 1000000 2745 ns/op
fmt_test.BenchmarkSprintfInt 1000000 2391 ns/op
fmt_test.BenchmarkSprintfIntInt 500000 3751 ns/op
I believe there is more to get but this is a good milestone.
R=rsc
CC=golang-dev, hong
http://codereview.appspot.com/166076
|
|
R=rsc
http://codereview.appspot.com/164090
|
|
R=rsc, r, r1
http://codereview.appspot.com/160046
Committer: Russ Cox <rsc@golang.org>
|
|
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>
|
|
R=r, gri
CC=golang-dev
http://codereview.appspot.com/156115
|
|
fix %E: was same as %e.
add tests.
Fixes issue 278.
R=rsc
CC=golang-dev
http://codereview.appspot.com/157111
|
|
threw in an embedded one for good measure.
R=rsc
CC=golang-dev
http://codereview.appspot.com/157058
|
|
rsc's algorithm
- applied gofmt -w misc src
- partial CL (remaining files in other CLs)
R=rsc, r
http://go/go-review/1026036
|
|
R=rsc, r
http://go/go-review/1025029
|
|
- 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
|
|
(replacement for CLs 1017039, 1017041, 1017040, 1018054)
R=r
http://go/go-review/1018060
|
|
R=gri
OCL=35485
CL=35488
|
|
R=gri
DELTA=456 (6 added, 3 deleted, 447 changed)
OCL=35398
CL=35406
|
|
R=r
OCL=34731
CL=34731
|
|
the last round omitted := range and only
checked 1 out of N vars in a multi-var :=
R=r
OCL=34624
CL=34638
|
|
R=r
DELTA=166 (0 added, 0 deleted, 166 changed)
OCL=34521
CL=34527
|
|
%E - upper case %e
%G - upper case %g
%#v - Go syntax
R=r
DELTA=332 (238 added, 47 deleted, 47 changed)
OCL=34091
CL=34145
|
|
for its format
Printf("%s", 2) gives %s(int=2)
R=rsc
DELTA=12 (10 added, 0 deleted, 2 changed)
OCL=34042
CL=34044
|
|
whole-package compilation. new Makefiles,
tests now in separate package
bytes
flag
fmt
io
math
once
os
reflect
strconv
sync
time
utf8
delete import "xxx" in package xxx.
inside package xxx, xxx is not declared
anymore so s/xxx.//g
delete file and package level forward declarations.
note the new internal_test.go and sync
and strconv to provide public access to
internals during testing. the installed version
of the package omits that file and thus does
not open the internals to all clients.
R=r
OCL=33065
CL=33097
|
|
R=r
DELTA=95 (0 added, 0 deleted, 95 changed)
OCL=33012
CL=33012
|
|
R=rsc
DELTA=19 (18 added, 0 deleted, 1 changed)
OCL=32656
CL=32670
|
|
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=32591
CL=32593
|
|
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=32540
CL=32545
|
|
rename map access methods to Elem, SetElem.
R=r
DELTA=95 (66 added, 7 deleted, 22 changed)
OCL=31456
CL=31469
|
|
R=rsc
DELTA=57 (39 added, 3 deleted, 15 changed)
OCL=31424
CL=31430
|
|
R=r
DELTA=208 (37 added, 63 deleted, 108 changed)
OCL=31111
CL=31281
|
|
io.ByteBuffer -> bytes.Buffer
left io.ByteBuffer stub around for now,
for protocol compiler.
R=r
OCL=30861
CL=30872
|
|
R=rsc
DELTA=9 (0 added, 0 deleted, 9 changed)
OCL=30658
CL=30658
|
|
R=rsc
DELTA=61 (48 added, 0 deleted, 13 changed)
OCL=30616
CL=30619
|
|
in cap, len, [], and range on maps, strings, and slices.
R=r
DELTA=57 (2 added, 12 deleted, 43 changed)
OCL=30549
CL=30590
|
|
tests: all.bash passes, gobuild still works, godoc still works.
R=rsc
OCL=30096
CL=30102
|