Russ Cox
d86ab015f7
use copy
...
R=gri
CC=golang-dev
https://golang.org/cl/2763041
2010-10-26 21:52:54 -07:00
Robert Griesemer
3478891d12
gofmt -s -w src misc
...
R=r, rsc
CC=golang-dev
https://golang.org/cl/2662041
2010-10-22 10:06:33 -07:00
Dan Sinclair
8d87ccad0b
xml: Allow entities inside CDATA tags
...
Fixes #1112 .
R=rsc
CC=golang-dev
https://golang.org/cl/2255042
2010-09-24 12:23:01 -04:00
Russ Cox
be443ee8bc
5g: register allocation bugs
...
Fixes #1099 .
R=ken2, r
CC=golang-dev
https://golang.org/cl/2147047
2010-09-12 00:06:45 -04:00
Rob Pike
0aa2317096
arm: work around reg allocator bug in 5g, in two parts.
...
1) hack regalloc to leave R9 (m) and R10 (g) alone.
the real fix is tricker, but this gets us running
2) fix up the few places in the package sources that
the shortage of registers affects, by simplifying
some expressions.
all of this should be reverted when the right fix is in.
Fixes #1084 .
R=rsc
CC=golang-dev
https://golang.org/cl/2132046
2010-09-10 20:55:29 -07:00
Nigel Tao
2e632088ce
Fix typo in xml comments.
...
R=rsc
CC=golang-dev
https://golang.org/cl/1503041
2010-06-03 00:56:53 -07:00
Russ Cox
0485ba72c3
xml: allow text segments to end at EOF
...
Fixes #674 .
R=adg
CC=golang-dev
https://golang.org/cl/1018042
2010-04-28 19:29:20 -07:00
Russ Cox
9f69ab39f0
xml: fix innerxml handling of & escapes
...
R=r
CC=golang-dev
https://golang.org/cl/1009041
2010-04-26 10:01:33 -07:00
Russ Cox
e7b6fe3989
xml: new "innerxml" tag to collect inner XML
...
R=r
CC=golang-dev
https://golang.org/cl/971041
2010-04-21 16:27:31 -07:00
Raif S. Naffah
66dd26e967
xml: use io.ReadByter in place of local readByter
...
R=cemeyer, rsc
CC=golang-dev
https://golang.org/cl/809041
2010-03-27 23:12:30 -07:00
Kyle Consalus
a65a56ec1f
xml: add line numbers to syntax errors.
...
R=rsc
CC=golang-dev
https://golang.org/cl/699041
2010-03-23 13:20:16 -07:00
Kyle Consalus
66caa38d49
xml: add CopyToken
...
R=rsc
CC=golang-dev
https://golang.org/cl/634042
2010-03-23 09:43:20 -07:00
Robert Griesemer
f44fa9b4c7
gofmt: experiment: align values in map composites where possible
...
- gofmt -w src misc
- looking for feedback
R=rsc, r
CC=golang-dev
https://golang.org/cl/223076
2010-03-02 13:46:51 -08:00
Russ Cox
9750adbbad
strings: delete Runes, Bytes
...
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
https://golang.org/cl/224062
2010-02-25 16:01:29 -08:00
Amrut Joshi
d8675d25e5
xml: allow unquoted attribute values in non-Strict mode
...
HTML4 standard supports unquoted attibute values in certain cases
(http://www.w3.org/TR/REC-html40/intro/sgmltut.html#h-3.2.2 ).
R=rsc
CC=golang-dev
https://golang.org/cl/207095
2010-02-18 23:32:55 -08:00
Stephen Weinberg
c90b05bf7d
xml: add Escape, copied from template.HTMLEscape.
...
R=rsc
CC=golang-dev
https://golang.org/cl/186282
2010-01-25 18:50:51 -08:00
Robert Griesemer
45ca9f7a9e
1) Change default gofmt default settings for
...
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
5th and last set of files.
R=rsc
CC=golang-dev
https://golang.org/cl/180050
2009-12-15 15:41:46 -08:00
Arvindh Rajesh Tamilmani
dec5bb7882
xml: handle unexpected EOF while parsing and fix a bug in name
...
mustgetc reports unexpected EOF as SyntaxError. using
mustgetc seems to be a better approach than letting the
caller handle unexpected EOF every time.
name: the second if statement should explicitly return
ok==false.
R=rsc
https://golang.org/cl/174083
2009-12-14 19:28:36 -08:00
Vish Subramanian
9e95d970cc
Fix crash in xml.Unmarshal. Occasionally while running a scrape of some xml with many goroutines
...
I see a crash with the following stack trace:
SIGSEGV: segmentation violation
Faulting address: 0x44
PC=0x44e510
runtime·mapaccess2+0x18 /home/vish/go/src/pkg/runtime/hashmap.c:790
runtime·mapaccess2(0x0, 0x0)
xml·*Parser·text+0x922 /home/vish/go/src/pkg/xml/xml.go:765
xml·*Parser·text(0xe44c9870, 0x7fa3, 0xffffffff, 0x7f00, 0x44b5c4, ...)
xml·*Parser·RawToken+0x174 /home/vish/go/src/pkg/xml/xml.go:405
xml·*Parser·RawToken(0xe44c9870, 0x7fa3, 0x0, 0x0)
xml·*Parser·Token+0x625 /home/vish/go/src/pkg/xml/xml.go:205
xml·*Parser·Token(0xe44c9870, 0x7fa3, 0x0, 0x0, 0x0, ...)
xml·*Parser·Skip+0x27 /home/vish/go/src/pkg/xml/read.go:371
xml·*Parser·Skip(0xe44c9870, 0x7fa3, 0x8, 0x0)
xml·*Parser·unmarshal+0xae6 /home/vish/go/src/pkg/xml/read.go:328
xml·*Parser·unmarshal(0xe44c9870, 0x7fa3, 0xe8127120, 0x7fa3, 0xdc94bc40, ...)
xml·Unmarshal+0xda /home/vish/go/src/pkg/xml/read.go:121
xml·Unmarshal(0xe65724b0, 0x7fa3, 0xdc94bc00, 0x7fa3, 0x4bcfc0, ...)
scraper·DoSearch+0x3d1 /home/vish/my-go-src/google3/experimental/users/vish/go_http/scraper.go:95
scraper·DoSearch(0xe7dc28c0, 0x7fa3, 0x33, 0x3, 0x6d2510, ...)
main·scrapeQueries+0x202 /home/vish/my-go-src/google3/experimental/users/vish/go_http/scrape.go:251
main·scrapeQueries(0xe7da2600, 0x7fa3, 0x64, 0x1db0, 0xe7e10000, ...)
goexit /home/vish/go/src/pkg/runtime/proc.c:135
goexit()
0x7fa3e7da2600 unknown pc
Clearly xml.Parser is accessing an uninitialized map. Add a check for a nil map before accessing it.
R=r, rsc
https://golang.org/cl/159050
2009-11-23 14:26:30 -08:00
Russ Cox
9ac4449cb2
gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg
...
R=r, gri
CC=golang-dev
https://golang.org/cl/156115
2009-11-20 11:45:05 -08:00
Rob Pike
e70cedfaec
remove bytes.Copy
...
replace all calls with calls to copy
use copy in regexp and bytes.Buffer
R=rsc
CC=golang-dev
https://golang.org/cl/157073
2009-11-18 15:24:24 -08:00
Abhinav Gupta
bad9738be6
xml: Fixed CDATA parsing.
...
Fixes #128 .
R=r, rsc
https://golang.org/cl/154126
2009-11-14 11:46:09 -08:00
Robert Griesemer
3bb0032cd6
- replaced gofmt expression formatting algorithm with
...
rsc's algorithm
- applied gofmt -w misc src
- partial CL (last chunk)
R=rsc, r
http://go/go-review/1024041
2009-11-09 21:23:52 -08:00
Robert Griesemer
40621d5c0d
remove semis after statements in one-statement statement lists
...
R=rsc, r
http://go/go-review/1025029
2009-11-09 12:07:39 -08:00
Robert Griesemer
368f8cbc75
- fine-tuning of one-line func heuristic (nodes.go)
...
- 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-11-06 14:24:38 -08:00
Robert Griesemer
45cba57e89
gofmt'ed more stragglers
...
R=rsc
http://go/go-review/1019004
2009-11-05 18:26:16 -08:00
Russ Cox
d0aac0ace1
introduce non-strict mode in xml parser,
...
good enough to parse some html.
in reader, add "comment" tag to collect
comment text.
do not allocate during Unmarshal unless pointer is nil.
R=r
DELTA=441 (416 added, 1 deleted, 24 changed)
OCL=35586
CL=35594
2009-10-11 23:51:46 -07:00
Russ Cox
094f1d5990
more lgtm files from gofmt
...
R=gri
OCL=35485
CL=35488
2009-10-08 15:14:54 -07:00
Russ Cox
9006f49130
comment tweaks; implement precise name
...
character sets.
R=r
DELTA=339 (257 added, 1 deleted, 81 changed)
OCL=35344
CL=35346
2009-10-05 16:45:24 -07:00
Russ Cox
a91b6b74e3
XML lexing
...
The lexer is the bottom level.
Most clients will use the Unmarshal method,
not yet implemented, which will behave like
json.Unmarshal.
R=r
DELTA=1115 (766 added, 219 deleted, 130 changed)
OCL=35316
CL=35339
2009-10-05 15:00:50 -07:00
Rob Pike
d90e7cbac6
mv src/lib to src/pkg
...
tests: all.bash passes, gobuild still works, godoc still works.
R=rsc
OCL=30096
CL=30102
2009-06-09 09:53:44 -07:00