Robert Griesemer
8cd2e76404
- gofmt'ing of some stragglers, now with correct comment indentation
...
in special cases
- re-gofmt'ing of some files that are now improved
R=r, rsc
http://go/go-review/1023003
2009-11-05 17:02:55 -08:00
Robert Griesemer
6c13f8f10e
fix a comment formatting bug:
...
- this ensures better comment formatting in template.go and codec_test.go
- it affects only 2 files of all files that have been gofmt'ed already,
see separate CL (it fixes the same issue in those files)
R=rsc
http://go/go-review/1023002
2009-11-05 17:02:29 -08:00
Adam Langley
fa57417dbd
crypto/tls (part 6/5)
...
Results of running gofmt again.
R=rsc
CC=go-dev
http://go/go-review/1022006
2009-11-05 16:59:39 -08:00
Adam Langley
eb48f83ae2
crypto/tls (part 5/5)
...
Make RSA and X509 build by using big. (This involves commenting out
key generation for now since I haven't written Miller-Rabin in big
yet.)
Add entries to the Makefile.
R=rsc
CC=go-dev
http://go/go-review/1022005
2009-11-05 16:44:02 -08:00
Adam Langley
950f2637c2
crypto/tls (part 4/5)
...
R=rsc
CC=go-dev
http://go/go-review/1019002
2009-11-05 16:43:29 -08:00
Robert Griesemer
10242e806f
gofmt'ed parts of go
...
R=rsc
http://go/go-review/1023001
2009-11-05 15:58:28 -08:00
Adam Langley
65063bc61d
big: add Div, Mod, Exp, GcdExt and several other fixes.
...
R=gri, rsc
CC=go-dev
http://go/go-review/1017036
2009-11-05 15:55:41 -08:00
Adam Langley
5e598c55dc
crypto/tls (part 3)
...
(With hindsight, record_process might have been designed wrong, but it
works for now. It'll get redrawn when client support is added.)
R=rsc
CC=r
http://go/go-review/1018032
2009-11-05 15:44:32 -08:00
Robert Griesemer
d3d3accdb7
gofmt-ify io, json, runtime, encoding
...
R=rsc
http://go/go-review/1017056
2009-11-05 15:37:55 -08:00
Robert Griesemer
6a4940ee23
gofmt'ed debug
...
(excluding debug/gosym/symtab.go which has a small issue)
R=rsc
http://go/go-review/1019001
2009-11-05 15:35:02 -08:00
Robert Griesemer
b8d88a9913
gofmt-ify strings, template
...
R=r
http://go/go-review/1018064
2009-11-05 15:12:37 -08:00
Robert Griesemer
f65e42d039
gofmt-ify gob
...
(the one-line struct types used in composite literals will become
one line again in another cleanup round; don't worry about them now)
R=r
http://go/go-review/1016056
2009-11-05 14:53:42 -08:00
Robert Griesemer
9786b3f1bd
gofmt-ify 4s, iterable
...
R=rsc
http://go/go-review/1016055
2009-11-05 14:43:03 -08:00
Robert Griesemer
2a89915485
gofmt-ify draw
...
R=rsc
http://go/go-review/1017055
2009-11-05 14:42:28 -08:00
Robert Griesemer
9e48df682c
gofmt-ify eval
...
R=rsc
http://go/go-review/1016054
2009-11-05 14:41:56 -08:00
Robert Griesemer
d2af73136e
gofmt-ify ogle
...
R=rsc
http://go/go-review/1016053
2009-11-05 14:30:18 -08:00
Robert Griesemer
6238964d7b
gofmt-ify nacl
...
R=rsc
http://go/go-review/1018062
2009-11-05 14:29:38 -08:00
Robert Griesemer
77334b988c
gofmt-ify reflect
...
- the single line structs can be fixed in another round
R=rsc
http://go/go-review/1016052
2009-11-05 14:23:20 -08:00
Robert Griesemer
666afa1c02
2nd attempt: no noIndent for string lists
...
- slightly better output in general
- extra indentation where we could do without
(however that seems better for now that not having the indentation
where it is needed)
- no information is lost, so a future better approach can fix these
places up again
R=rsc
http://go/go-review/1017050
2009-11-05 14:03:56 -08:00
Robert Griesemer
bd4f94057f
gofmt-ify syscall
...
(replacement for CL 1018053)
R=r
http://go/go-review/1017047
2009-11-05 10:55:57 -08:00
Robert Griesemer
30c7088c95
gofmt-ify template, time, unsafe, flag, fmt
...
(replacement for CLs 1017039, 1017041, 1017040, 1018054)
R=r
http://go/go-review/1018060
2009-11-05 09:40:28 -08:00
Robert Griesemer
3630bfbe9f
gofmt-ify math, expvar, exp/spacewar
...
R=rsc
http://go/go-review/1018061
2009-11-05 09:08:08 -08:00
Robert Griesemer
e57acdca4d
gofmt-ify parts of xml
...
R=rsc
http://go/go-review/1017049
2009-11-05 08:59:03 -08:00
Robert Griesemer
12dbd06f0a
gofmt-ify encoding
...
R=rsc
http://go/go-review/1017048
2009-11-05 08:55:18 -08:00
Robert Griesemer
ed494c6398
gofmt-ify sort, sync
...
R=rsc
http://go/go-review/1018057
2009-11-04 23:25:29 -08:00
Robert Griesemer
314b358ab7
gofmt-ify strconv
...
(and remove an empty line at the end of a file)
R=rsc
http://go/go-review/1017046
2009-11-04 23:20:49 -08:00
Robert Griesemer
5d37705416
gofmt-ify net
...
R=rsc
http://go/go-review/1017045
2009-11-04 23:16:46 -08:00
Robert Griesemer
7df45566db
gofmt-ify image
...
R=rsc
http://go/go-review/1017044
2009-11-04 22:52:28 -08:00
Robert Griesemer
ca2a69ea06
gofmt-ify hash, http
...
(gofmt will be able to re-align map entries as in http nicely,
eventually)
R=rsc
http://go/go-review/1018055
2009-11-04 22:45:59 -08:00
Robert Griesemer
b16e6ab148
gofmt-ify tabwriter
...
R=rsc
http://go/go-review/1017042
2009-11-04 22:26:48 -08:00
Robert Griesemer
1fede304ff
more comment formatting:
...
- preserve (some) indentation of comment text for /*-style comments
even if the first comment line does not contain any text that might
suggest the "correct" indentation
- enabled because otherwise existing larger comments get re-formatted
(this will not introduce a lot of changes since comments of this
kind - until now - were not changed with respect to indentation)
R=rsc
http://go/go-review/1016047
2009-11-04 22:07:13 -08:00
Robert Griesemer
841c18a95a
gofmt-ify unicode
...
R=r
http://go/go-review/1018051
2009-11-04 21:39:55 -08:00
Kai Backman
55ba9d6a2c
fixing (badly) linux_arm syscall.
...
R=rsc
http://go/go-review/1017037
2009-11-04 21:34:54 -08:00
Robert Griesemer
601ee4807b
- add a blank before the opening { for multi-line composites
...
(request by r)
- feature temporarily disabled
R=rsc
CC=r
http://go/go-review/1018052
2009-11-04 21:15:47 -08:00
Robert Griesemer
398f220d5b
gofmt-ify os
...
R=r
http://go/go-review/1017034
2009-11-04 20:42:40 -08:00
Russ Cox
cc1a979272
package patch
...
R=r
http://go/go-review/1018043
2009-11-04 17:55:06 -08:00
Robert Griesemer
5fca0bca61
gofmt-ify compress
...
R=rsc
http://go/go-review/1016045
2009-11-04 17:10:18 -08:00
Robert Griesemer
b6d0a22dc5
gofmt-ify ebnf
...
R=r
http://go/go-review/1018050
2009-11-04 17:05:01 -08:00
Robert Griesemer
646a2c5a42
gofmt-ify bufio
...
R=rsc
http://go/go-review/1018049
2009-11-04 17:04:21 -08:00
Robert Griesemer
03678f7417
gofmt-ify asn1
...
R=rsc
http://go/go-review/1018047
2009-11-04 17:03:08 -08:00
Robert Griesemer
517ebbb24a
gofmt-ify src/pkg/archive
...
R=rsc
http://go/go-review/1018046
2009-11-04 17:02:47 -08:00
Robert Griesemer
eabcc981c5
gofmt-ify crypto
...
R=agl
CC=rsc
http://go/go-review/1017032
2009-11-04 17:02:30 -08:00
Robert Griesemer
2ce57ec10a
gofmt-ify src/pkg/go (excluding printer directory due to pending CL,
...
and parser.go and scanner_test.go which have minor formatting issues)
R=rsc
http://go/go-review/1016042
2009-11-04 17:02:05 -08:00
Robert Griesemer
26c3f6c18d
rename testfiles from .go -> .orig so that they won't be
...
picked up by gofmt (they should not be modified) or godoc
(testdata should not be considered a potential package
directory)
R=rsc
http://go/go-review/1018045
2009-11-04 16:50:13 -08:00
Robert Griesemer
688a6ff71d
gofmt-ify bytes
...
R=r
http://go/go-review/1016044
2009-11-04 16:49:28 -08:00
Robert Griesemer
789b31a416
better placement of /*-style comments interspersed with code on one line
...
R=rsc
http://go/go-review/1017030
2009-11-04 15:33:28 -08:00
Russ Cox
5d436b9def
bytes.SplitAfter and strings.SplitAfter
...
most common usage is:
lines := strings.SplitAfter(text, "\n", 0)
R=r
http://go/go-review/1018042
2009-11-04 15:19:30 -08:00
Rob Pike
56cba8855e
panic can't print interfaces well so use err.String()
...
R=rsc
http://go/go-review/1016041
2009-11-04 15:13:16 -08:00
Robert Griesemer
2f792d32be
- always format blocks with closing } on a new line, even if empty
...
- at the moment this also affects single-line function declarations
because we have disabled them at the moment (but not single-line
function literals)
R=rsc
http://go/go-review/1016040
2009-11-04 13:31:20 -08:00
Robert Griesemer
6dbf7aa129
- complete html-escaping also in printer.go
...
R=rsc
http://go/go-review/1017027
2009-11-04 10:59:25 -08:00
Robert Griesemer
c8c3f1d5de
- respect source line breaks in grouped declarations
...
- made ast.Spec nodes implement Node interface
- added extra test cases
R=rsc
http://go/go-review/1016038
2009-11-04 10:58:54 -08:00
Robert Griesemer
524ade9a58
fix bufio test case
...
R=rsc
http://go/go-review/1018038
2009-11-04 10:58:30 -08:00
Russ Cox
d441d545a9
two more regexp tweaks
...
TBR=r
http://go/go-review/1016037
2009-11-04 08:34:31 -08:00
Russ Cox
af2bc8f986
allow "no such host" and also "no answer from server";
...
seems to help on snow leopard.
TBR=r
http://go/go-review/1018035
2009-11-04 08:30:53 -08:00
Robert Griesemer
467c726eec
add " and ' to list of html-escaped chars
...
R=rsc
http://go/go-review/1017025
2009-11-03 22:52:10 -08:00
Adam Langley
93253a870c
encoding/*: reverse the order of src, dst so that dst is first.
...
R=rsc
CC=go-dev
http://go/go-review/1017021
2009-11-03 17:32:08 -08:00
Adam Langley
1542520a4a
crypto/tls (part 2)
...
R=rsc
CC=go-dev
http://go/go-review/1018028
2009-11-03 17:25:13 -08:00
Adam Langley
bcce2987e0
crypto/rsa: fix blinding when using a null random source.
...
For testing it can be useful to use a null random source (one which
always returns zero) to remove non-determinism from the tests.
However, when performing RSA blinding, the random blind ends up being
zero and it's hard to reverse a multiplication by zero.
R=rsc
CC=go-dev
http://go/go-review/1018033
2009-11-03 17:23:50 -08:00
Robert Griesemer
c56b366c28
Note: This is an exact replica and replacement of CL 1018027
...
(which I uploaded at home and thus can't upload from here).
CL 1018027 was reviewed.
- added comments to scope.go
- commented out some code that is not yet needed
(and which showed up prominently in the documentation)
R=rsc
http://go/go-review/1017017
2009-11-03 14:05:18 -08:00
Robert Griesemer
38512d090c
- don't loose extra line breaks in struct/interface declarations
...
- start new sections if a field/method declaration spans multiple lines;
this avoids tabs from the previous line affecting the next field/method
R=rsc
http://go/go-review/1017015
2009-11-03 13:40:11 -08:00
Adam Langley
4f2ec03416
Add testing/script.
...
R=rsc, r
CC=go-dev
http://go/go-review/1016001
2009-11-03 12:47:06 -08:00
Rob Pike
929e27e3d5
fix build
...
R=gri
http://go/go-review/1017014
2009-11-02 23:06:48 -08:00
Robert Griesemer
6e98b7f0b2
split printer.go into two files; it has become too large:
...
- nodes.go implements ast node formatting
- printer.go implements the core printing functionality
and public interface
No code changes except for updating the import clauses
and adding a top-level comment to nodes.go.
R=rsc
http://go/go-review/1016026
2009-11-02 20:55:40 -08:00
Rob Pike
120d0b50c6
forgot to count newlines when scanning white space.
...
also fix a error-printing bug in godoc.
R=gri
http://go/go-review/1016030
2009-11-02 20:35:52 -08:00
Russ Cox
c83b838641
package net cleanup
...
added ReadFrom/WriteTo for packet protocols like UDP.
simplified the net.Conn interface.
added new net.PacketConn interface for packet protocols.
implemented proper UDP listener.
cleaned up LocalAddr/RemoteAddr methods - cache in netFD.
threw away various unused methods.
an interface change:
introduced net.Addr as a network address interface,
to avoid conversion of UDP host:port to string and
back for every ReadFrom/WriteTo sequence.
another interface change:
since signature of Listener.Accept was changing anyway,
dropped the middle return value, because it is available
as c.RemoteAddr(). (the Accept signature predates the
existence of that method.)
Dial and Listen still accept strings, but the proto-specific
versions DialTCP, ListenUDP, etc. take net.Addr instead.
because the generic Dial didn't change and because
no one calls Accept directly (only indirectly via the http
server), very little code will be affected by these interface
changes.
design comments welcome.
R=p
CC=go-dev, r
http://go/go-review/1018017
2009-11-02 18:37:30 -08:00
Adam Langley
6e8184d8cd
crypto/tls (part 1)
...
Rather than drop everything into a single, huge review, I've included
some simple bits of code here.
R=rsc
CC=go-dev
http://go/go-review/1016029
2009-11-02 18:25:20 -08:00
Rob Pike
236a9de93f
remove goroutines from template parsing.
...
fix up one usage to take advantage.
R=rsc
CC=go-dev
http://go/go-review/1018023
2009-11-02 13:09:31 -08:00
Ian Lance Taylor
f32cde88b6
Define constants for sizes of Sym structures.
...
R=rsc, agl
http://go/go-review/1016028
2009-11-02 12:53:06 -08:00
Adam Langley
72ec930fa7
Fix cgo for GCC 4.4
...
Firstly, with -Werror, GCC switched to printing warnings starting
with "error:". Widening the string matches solves this as the messages
are otherwise unchanged.
Secondly, GCC 4.4 outputs DWARF sections with with NUL bytes in all
the offsets and requires the relocation section for .debug_info to be
processed in order to result in valid DWARF data. Thus we add minimal
handling for relocation sections, which is sufficient for our needs.
BUG=1
Fixes #1 .
R=rsc, iant
CC=go-dev
http://go/go-review/1017003
2009-11-02 12:02:16 -08:00
Rob Pike
a82465103f
use the new routine regexp.MustCompile to clean up some code that uses global regexps.
...
R=rsc, gri
CC=go-dev
http://go/go-review/1016025
2009-11-02 11:37:52 -08:00
Rob Pike
cd82d490fc
eliminate goroutine from testing/regexp too.
...
R=rsc
CC=go-dev
http://go/go-review/1018021
2009-11-02 11:24:47 -08:00
Adam Langley
ad67a86626
Split constant time functions into crypto/subtle.
...
R=rsc
CC=go-dev
http://go/go-review/1018020
2009-11-02 11:12:07 -08:00
Rob Pike
acc54b6c70
take goroutines out of regexp so they can be created
...
during initialization.
R=rsc
CC=go-dev
http://go/go-review/1016023
2009-11-02 10:08:22 -08:00
Robert Griesemer
b67352110f
- collect line comments for methods in interfaces
...
(previously not shown in godoc)
- simplify parsing of struct types (match code structure for parsing interface types)
R=rsc, r
http://go/go-review/1016019
2009-11-02 09:18:02 -08:00
Rob Pike
4d310f2434
reverse the arguments to io.Copy so the destination is on the
...
left, like an assignment, like strcpy, etc.
R=rsc
CC=go-dev
http://go/go-review/1016011
2009-11-01 20:59:49 -08:00
Ian Lance Taylor
d8efcdcd52
These files were moved to encoding/base64. The directory was
...
already removed from the Makefile.
R=rsc
http://go/go-review/1017006
2009-11-01 15:04:46 -08:00
Russ Cox
35ace1d1f5
split ipsock.go, sock.go, and unixsock.go out of net.go
...
prior to cleanup. no changes, only moving.
remove dependencies on strconv and strings
R=r
http://go/go-review/1017010
2009-11-01 11:15:34 -08:00
Russ Cox
fd1add2768
syscall cleanup.
...
* rename PORT.sh -> mkall.sh (hopefully more obvious),
change behavior: run commands by default.
* pull more constants out of #defines automatically,
instead of editing large lists by hand.
* add Recvfrom, Sendto
add os.O_EXCL.
R=r
http://go/go-review/1017009
2009-11-01 11:13:27 -08:00
Russ Cox
a64b69da9e
os cleanup.
...
dir_* and stat_* are just os specific,
not os+arch-specific.
R=r
http://go/go-review/1018010
2009-11-01 09:37:13 -08:00
Russ Cox
7732d80ceb
misc cleanup
...
R=r
http://go/go-review/1016017
2009-11-01 09:25:55 -08:00
Russ Cox
b72153310d
allow unpacking of json map into Go map,
...
now that reflection supports it.
R=r
http://go/go-review/1015008
2009-11-01 05:49:07 -08:00
Rob Pike
63e668d2ad
return "<nil>" when calling String() on a nil bytes.Buffer.
...
R=rsc
CC=go-dev
http://go/go-review/1016005
2009-10-31 13:28:22 -07:00
Ian Lance Taylor
b534eb462b
Don't use fallthrough in a type switch.
...
R=rsc
http://go/go-review/1018005
2009-10-30 16:10:42 -07:00
Robert Griesemer
1e984cb913
improved comment formatting:
...
- print comments line by line, strip common prefix but do not
modify comment contents otherwise
- align comments with subsequent keyword if indicated (e.g. case labels)
- terminate "column section" after multi-line expressions for better alignment
R=rsc
http://go/go-review/1017002
2009-10-30 13:17:14 -07:00
Kai Backman
770b872752
clone and futex
...
go/test: passes 99% (343/347)
R=rsc
http://go/go-review/1016004
2009-10-29 21:21:14 -07:00
Adam Langley
09d68334cc
Forgot to change quickcheck to quick in the Makefile.
...
TBR=rsc
R=rsc
http://go/go-review/1017004
2009-10-29 18:34:44 -07:00
Adam Langley
9e96f25fa2
Add RSA PKCS#1 v1.5 support.
...
R=go-dev
APPROVED=rsc
DELTA=407 (400 added, 0 deleted, 7 changed)
OCL=36007
CL=36146
2009-10-29 17:38:25 -07:00
Adam Langley
878d0e1efd
Add a quickcheck package which is a little like the Haskell one of the same
...
name.
R=rsc
APPROVED=rsc
DELTA=566 (566 added, 0 deleted, 0 changed)
OCL=35974
CL=36111
2009-10-28 15:16:20 -07:00
Rob Pike
449086eec9
Change Stat to Lstat in Readdir so we don't recur when someone symlinks "."
...
R=rsc
CC=go-dev
http://go/go-review/1018003
2009-10-29 10:53:37 -07:00
Adam Langley
b89d630977
Fix bug when sending via select.
...
selfree maintains a cache of Select structures for several sizes. In
newselect, we'll use an entry from the cache if one is found. However,
the Scase structures corresponding to a send may have been allocated
for the wrong size. In this case we'll write off the end of the Scase
into random memory and, generally, read some amount of junk in the
receive.
This patch fixes the issue by removing the cache, on the advice of
rsc.
R=rsc
CC=go-dev
http://go/go-review/1016002
2009-10-28 18:23:53 -07:00
Russ Cox
32e979c0de
mysterious bug: runtime.acid wasn't getting rebuilt
...
when switching architectures.
fix bug twice: make sure clean removes the file,
and generate into architecture-specific file names.
R=r
http://go/go-review/1013018
2009-10-28 14:03:16 -07:00
Robert Griesemer
5a02eb65ef
fix for long label names impacting column width of previous lines
...
R=rsc
http://go/go-review/1013017
2009-10-28 10:14:59 -07:00
Russ Cox
d2829faa7c
files that are okay from the last gofmt round
...
R=gri
http://go/go-review/1015011
2009-10-27 22:47:54 -07:00
Ian Lance Taylor
f529224039
Get the right sigaction struct for the 386 rt_sigaction system
...
call. This uses the header files from a 32-bit Ubuntu Hardy
system.
The use of _LOOSE_KERNEL_NAMES seems right. The
-D__ARCH_SI_UID_T works around a bug which appears to be fixed
in later Linux versions.
R=rsc
http://go/go-review/1013015
2009-10-26 22:49:08 -07:00
Robert Griesemer
ae3c9992ae
- gofmt-ify walk.go
...
- fixed several bugs
R=rsc
http://go/go-review/1015015
2009-10-26 19:21:13 -07:00
Adam Langley
569a1cd545
Add encoding/hex
...
R=rsc
http://go/go-review/1015012
2009-10-26 16:34:36 -07:00
Kai Backman
6f91ba1b0f
proper syscall convention for arm
...
R=rsc
http://go/go-review/1015009
2009-10-25 11:51:16 -07:00
Rob Pike
1726e81c00
publish Request.Write (rename from Request.write)
...
R=rsc
CC=go-dev
http://go/go-review/1015003
2009-10-23 14:19:47 -07:00
Kai Backman
dec1ec34bf
all of pkg now compiles, fixes a few more tests
...
go/test: passes 90% (313/345)
R=rsc
APPROVED=rsc
DELTA=90 (83 added, 3 deleted, 4 changed)
OCL=36011
CL=36023
2009-10-23 11:00:59 -07:00
Kai Backman
0af8e1045c
fix off by 4 bug in morestack (lr again). remove storing of r0
...
now that all arguments are passed on the stack.
go/test: passes 89% (310/345)
R=rsc
APPROVED=rsc
DELTA=33 (13 added, 14 deleted, 6 changed)
OCL=36009
CL=36022
2009-10-23 10:59:31 -07:00
Kai Backman
03bbfe6724
fix off by 4 in newproc arg copying.
...
R=rsc
APPROVED=rsc
DELTA=4 (0 added, 0 deleted, 4 changed)
OCL=36001
CL=36004
2009-10-22 13:31:52 -07:00
Ian Lance Taylor
fd5fa4b301
Fix the sigaction declaration to match the system for Linux.
...
I don't know whether Darwin needs a change here.
R=rsc
http://go/go-review/1013010
2009-10-22 23:51:54 -07:00
Ian Lance Taylor
057f7d5b07
s/pc/PC/ in traceback output to match amd64.
...
test/run expects to see "PC".
R=rsc
http://go/go-review/1015002
2009-10-22 23:38:34 -07:00
Ian Lance Taylor
95499a27ea
Fix printer_test.go to invoke Fprint as a method of cfg.
...
This matches the change to printer.go in revision 3632.
R=gri
http://go/go-review/1015001
2009-10-22 22:19:22 -07:00
Robert Griesemer
8f52a82169
- make printer interface easily extensible w/o breaking clients (in the future)
...
- replacement for p4 CL 35999 (abandoned)
R=rsc
http://go/go-review/1012010
2009-10-22 18:19:49 -07:00
Robert Griesemer
abc6ad427d
minor changes to walk
...
R=rsc
http://go/go-review/1012008
2009-10-22 18:04:21 -07:00
Robert Griesemer
ba15bbe654
simple AST walking support
...
R=rsc
http://go/go-review/1014006
2009-10-22 16:35:53 -07:00
Rob Pike
8a20cfc009
fix build: no acid
...
R=rsc
http://go/go-review/1014005
2009-10-22 11:52:35 -07:00
Russ Cox
219fb02042
fix build after Mercurial move.
...
various missing or incorrect files.
R=r
CC=go-dev
http://go/go-review/1014004
2009-10-22 10:59:27 -07:00
Robert Griesemer
90cc4a5949
go/printer:
...
- handle HTML tagging via (client-installable) Stylers
go/doc:
- basic styler support
- some factoring
- ready to contain the search code (but for now excluded)
doc/style.css:
- updated
doc/go_spec.css:
- cleanup: replace deprecated uses of <font> tag with <span> tag
R=rsc
DELTA=302 (160 added, 62 deleted, 80 changed)
OCL=35973
CL=35996
2009-10-22 09:41:38 -07:00
Austin Clements
3040f067c3
Interface types, values, and type compiler. This does not yet
...
implement any type checking or semantics for interfaces.
R=rsc
APPROVED=rsc
DELTA=305 (289 added, 10 deleted, 6 changed)
OCL=35889
CL=35995
2009-10-22 08:59:18 -07:00
Rob Pike
c6e904d580
have http server in-line PDF files.
...
add go course pdf files to doc/ for godoc to serve.
fix links to point to those files.
R=rsc
DELTA=7 (4 added, 0 deleted, 3 changed)
OCL=35972
CL=35981
2009-10-21 19:52:11 -07:00
Adam Langley
a8a678fc2a
Add SetValue(Value) to the Value interface.
...
R=rsc
APPROVED=rsc
DELTA=172 (170 added, 0 deleted, 2 changed)
OCL=35969
CL=35980
2009-10-21 19:51:27 -07:00
Rob Pike
f1b91263d8
fix typo/oversight: s/Title/ToTitle/. the comment was already correct
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=35964
CL=35979
2009-10-21 19:51:05 -07:00
Adam Langley
1d390cec1e
Replace SliceReader with bytes.Buffer.
...
R=r
APPROVED=r
DELTA=16 (0 added, 15 deleted, 1 changed)
OCL=35976
CL=35978
2009-10-21 19:49:01 -07:00
Adam Langley
7d68093f93
Fix typo in documentation.
...
R=r
APPROVED=r
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=35977
CL=35977
2009-10-21 19:47:52 -07:00
Adam Langley
fd74a835bc
Add initial x509 code.
...
R=rsc
APPROVED=rsc
DELTA=659 (659 added, 0 deleted, 0 changed)
OCL=35932
CL=35975
2009-10-21 17:53:50 -07:00
David Symonds
69fc06dfa1
Move usr/dsymonds/iterable to src/pkg/exp/iterable.
...
Remove remainder of usr/dsymonds.
R=rsc,r
APPROVED=r
DELTA=685 (275 added, 409 deleted, 1 changed)
OCL=35810
CL=35933
2009-10-20 14:10:22 -07:00
Russ Cox
357b770def
base64 -> encoding/base64
...
base85 -> encoding/ascii85, encoding/git85
debug/binary -> encoding/binary
R=r
DELTA=3190 (1884 added, 1297 deleted, 9 changed)
OCL=35923
CL=35929
2009-10-20 13:00:16 -07:00
Russ Cox
fcc4be8c65
Add base85, based on base64.
...
Also add git version of base85,
which is what I really wanted but
didn't recognize as different until it
was too late.
R=austin
DELTA=980 (972 added, 4 deleted, 4 changed)
OCL=35580
CL=35921
2009-10-20 09:04:09 -07:00
Russ Cox
02fd255a14
bug162, over and over
...
R=ken
OCL=35919
CL=35919
2009-10-20 08:03:43 -07:00
Kai Backman
33a7bcf315
getcallerpc and setcallerpc
...
go/test: passes 87% (303/345)
R=rsc
APPROVED=rsc
DELTA=19 (5 added, 6 deleted, 8 changed)
OCL=35903
CL=35906
2009-10-19 21:58:16 -07:00
Kai Backman
a15aa05ae2
first version of closures. test/closure doesn't yet pass.
...
go/test: passes 87% (300/343)
R=rsc
APPROVED=rsc
DELTA=125 (125 added, 0 deleted, 0 changed)
OCL=35893
CL=35900
2009-10-19 19:59:39 -07:00
Robert Griesemer
e76cce1a6d
support one-line functions
...
R=rsc
DELTA=207 (160 added, 42 deleted, 5 changed)
OCL=35854
CL=35887
2009-10-19 13:57:51 -07:00
Russ Cox
21b41bec83
test and fix http redirect handling
...
BUG=2197242
R=r
DELTA=16 (16 added, 0 deleted, 0 changed)
OCL=35878
CL=35882
2009-10-19 12:10:14 -07:00
Adam Langley
4d4e885bd1
Add an RSA-OAEP implementation.
...
R=rsc
APPROVED=rsc
DELTA=734 (734 added, 0 deleted, 0 changed)
OCL=35738
CL=35879
2009-10-19 11:52:44 -07:00
Robert Griesemer
4adad657de
directory tree walk w/ visitor per rsc's suggestion
...
R=rsc,r
DELTA=193 (191 added, 0 deleted, 2 changed)
OCL=35849
CL=35877
2009-10-19 11:48:04 -07:00
Russ Cox
d5337e9829
fix linux build:
...
i renamed sys to runtime but didn't remember this file.
(and the darwin build doesn't use it.)
TBR=r
OCL=35826
CL=35826
2009-10-15 23:57:04 -07:00
Russ Cox
22a5c78f44
rename sys functions to runtime,
...
because they are in package runtime.
another step to enforcing package boundaries.
R=r
DELTA=732 (114 added, 93 deleted, 525 changed)
OCL=35811
CL=35824
2009-10-15 23:10:49 -07:00
Russ Cox
488ca3c7a6
move math out of runtime.
...
a step toward enforcing package boundaries,
necessary to eliminate global package name space.
R=r
DELTA=581 (310 added, 271 deleted, 0 changed)
OCL=35805
CL=35823
2009-10-15 23:09:22 -07:00
Robert Griesemer
738c58ca75
improved handling of expression lists
...
R=rsc
DELTA=189 (118 added, 9 deleted, 62 changed)
OCL=35816
CL=35821
2009-10-15 22:52:11 -07:00
Stephen Ma
f9e08759de
Trivial documentation fix for func ListenAndServe().
...
R=go-dev
APPROVED=gri
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=35817
CL=35819
2009-10-15 22:18:14 -07:00
Kai Backman
222a15c840
test/64bit.go passes but doesn't generate properly yet.
...
R=rsc
APPROVED=rsc
DELTA=235 (98 added, 38 deleted, 99 changed)
OCL=35789
CL=35813
2009-10-15 19:41:51 -07:00
Robert Griesemer
3f427bc9c8
update Make.deps
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=35808
CL=35808
2009-10-15 17:54:57 -07:00
Russ Cox
5bbd4c2f1b
publish semacquire and semrelease for use by sync.
...
more enforcing package boundaries
R=r
DELTA=46 (13 added, 15 deleted, 18 changed)
OCL=35806
CL=35806
2009-10-15 17:46:53 -07:00
Robert Griesemer
b80d36d846
- implemented utility functions for directory reading/traversal
...
- added tests
R=rsc
DELTA=62 (61 added, 1 deleted, 0 changed)
OCL=35788
CL=35802
2009-10-15 16:34:05 -07:00
Austin Clements
049501ce4c
Implement error handling on process monitor exit. Now, before
...
sending any message to the monitor, the sender must check a
"ready" channel. Before exiting, the monitor records its exit
error and closes this channel, ensuring that all later reads
from the ready channel will immediately return false.
Inspired by
http://chplib.wordpress.com/2009/09/30/poison-concurrent-termination/
R=rsc
APPROVED=rsc
DELTA=47 (27 added, 11 deleted, 9 changed)
OCL=35782
CL=35784
2009-10-15 12:59:59 -07:00
Robert Griesemer
974b23f569
close file after use
...
R=rsc
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=35778
CL=35780
2009-10-15 12:04:13 -07:00
Dave Bort
3342574206
Define the new Rand and Source types to allow creating
...
isolated sources of random values.
Add normal and exponential distributions.
Add some tests for the normal and exponential distributions.
R=rsc
APPROVED=rsc
DELTA=1005 (904 added, 80 deleted, 21 changed)
OCL=35501
CL=35779
2009-10-15 11:46:37 -07:00
Russ Cox
18325313fb
add exp/eval to pkg list
...
update Make.deps.
fixes build
TBR=r
OCL=35777
CL=35777
2009-10-15 11:05:23 -07:00
Russ Cox
98089b68a3
nacl demos
...
R=r
DELTA=9147 (9147 added, 0 deleted, 0 changed)
OCL=35734
CL=35776
2009-10-15 11:04:33 -07:00
Russ Cox
4113ca5fb1
explain exp
...
R=r
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=35732
CL=35775
2009-10-15 11:02:18 -07:00
Robert Griesemer
8c101739d9
- bug fix: must not insert indentation tabs into multi-line strings in RawFormat
...
(always write tabwriter.Escape chars so formatting is driven correctly; but strip
them again in the end if no tabwriter is used)
- added testcase for RawFormat printing
R=rsc
DELTA=227 (198 added, 6 deleted, 23 changed)
OCL=35772
CL=35774
2009-10-15 10:41:07 -07:00
Robert Griesemer
8f8a393b40
bug fix: do not modify (string) literals in any way even if they
...
contain tabs or line breaks
R=rsc
DELTA=57 (19 added, 12 deleted, 26 changed)
OCL=35749
CL=35770
2009-10-15 09:29:31 -07:00
Robert Griesemer
b55e6d1ba5
permit escaped text segments which pass through tabwriter
...
undisturbed and uninterpreted
R=rsc
DELTA=141 (82 added, 23 deleted, 36 changed)
OCL=35747
CL=35769
2009-10-15 09:28:52 -07:00
Robert Griesemer
da829d6608
Work-around for factory function heuristic failure:
...
only associate a couple of functions as factories
for os.Error.
Replaces CL 35628 (abandoned).
R=rsc
DELTA=35 (26 added, 0 deleted, 9 changed)
OCL=35754
CL=35768
2009-10-15 09:24:19 -07:00
Rob Pike
a34dd7156b
typo
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=35743
CL=35762
2009-10-15 00:27:40 -07:00
Kai Backman
b83549a7e6
cas
...
R=rsc
APPROVED=rsc
DELTA=31 (1 added, 8 deleted, 22 changed)
OCL=35752
CL=35757
2009-10-14 21:47:28 -07:00
Russ Cox
2b7fde3406
move austin/eval and austin/ogle to exp/eval and exp/ogle
...
R=r
OCL=35736
CL=35746
2009-10-14 18:10:43 -07:00
Russ Cox
218a412e73
forgot to update Makefile in last CL
...
R=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=35737
CL=35745
2009-10-14 18:10:00 -07:00
Russ Cox
7d795d8c01
move native client to exp/nacl.
...
R=r
DELTA=3706 (1857 added, 1849 deleted, 0 changed)
OCL=35731
CL=35741
2009-10-14 17:16:21 -07:00
Russ Cox
c058e20a18
move draw to exp
...
R=r
DELTA=942 (471 added, 471 deleted, 0 changed)
OCL=35733
CL=35740
2009-10-14 17:15:56 -07:00
Russ Cox
17dfa682ae
move datafmt into exp
...
R=gri
DELTA=3006 (1503 added, 1503 deleted, 0 changed)
OCL=35730
CL=35735
2009-10-14 16:55:05 -07:00
Russ Cox
a68592a4dd
excise some internal references.
...
R=r
DELTA=209 (65 added, 114 deleted, 30 changed)
OCL=35718
CL=35721
2009-10-14 13:02:05 -07:00
Russ Cox
b7ef541f35
toss crypto/block Digest in favor of hash.Hash
...
R=r
DELTA=30 (8 added, 15 deleted, 7 changed)
OCL=35677
CL=35713
2009-10-14 09:33:15 -07:00
Rob Pike
f6d67c9e95
write stack traces and panics to stderr
...
R=rsc
DELTA=31 (5 added, 3 deleted, 23 changed)
OCL=35700
CL=35700
2009-10-13 22:48:03 -07:00
Nigel Tao
cb1ad7e765
Documentation for png.Decode and png.Encode.
...
R=r,rsc
APPROVED=r
DELTA=7 (5 added, 0 deleted, 2 changed)
OCL=35651
CL=35692
2009-10-13 17:14:49 -07:00
Rob Pike
76d585e5af
delete silly TODO
...
R=rsc
DELTA=1 (0 added, 1 deleted, 0 changed)
OCL=35685
CL=35687
2009-10-13 15:55:44 -07:00
Adam Langley
c071da4a26
Add ASN.1 parser.
...
R=rsc
APPROVED=rsc
DELTA=1459 (1459 added, 0 deleted, 0 changed)
OCL=35389
CL=35681
2009-10-13 14:37:48 -07:00
Rob Pike
8acb8fb780
reduce stutter: sort.SortInterface -> sort.Interface.
...
ditto for heap.HeapInterface
R=gri,rsc
DELTA=31 (0 added, 1 deleted, 30 changed)
OCL=35665
CL=35673
2009-10-13 13:05:16 -07:00
Robert Griesemer
4700ded282
bug fix: convert \v's into \t's if there's no tabwriter
...
R=rsc
DELTA=15 (12 added, 2 deleted, 1 changed)
OCL=35641
CL=35645
2009-10-12 19:08:17 -07:00
Robert Griesemer
df7efaf9e8
- improved comment intersperse heuristic:
...
comments should now be indented properly in corner cases
(at the end of statement lists, for instance)
- changed import decl. formatting as suggested by Russ (no "global"
indentation of imports if there are renames present)
- better field list handling
- better documentation
R=rsc
DELTA=534 (324 added, 35 deleted, 175 changed)
OCL=35557
CL=35630
2009-10-12 17:10:50 -07:00
Kai Backman
101f7cbd61
changed 5c 64 bit word ordering to little endian so it matches
...
5g. fixes to 64 bit code gen. added (finally) function to do
shifts properly.
go/test: passes 83% (287/342)
R=rsc
APPROVED=rsc
DELTA=156 (50 added, 53 deleted, 53 changed)
OCL=35589
CL=35616
2009-10-12 13:35:28 -07:00
Russ Cox
add89dd1ba
stack overflow debugging and fix.
...
* in 6l, -K already meant check for stack underflow.
add -KK to mean double-check stack overflows
even in nosplit functions.
* comment out print locks; they deadlock too easily
but are still useful to put back for special occasions.
* let runcgo assembly switch to scheduler stack
without involving scheduler directly. because runcgo
gets called from matchmg, it is too hard to keep it
from being called on other stacks.
R=r
DELTA=94 (65 added, 18 deleted, 11 changed)
OCL=35591
CL=35604
2009-10-12 10:26:38 -07:00
Russ Cox
10c7d19e07
fix comment on strings.LastIndex.
...
add bytes.LastIndex.
add strings.Reader.
R=r
DELTA=59 (56 added, 0 deleted, 3 changed)
OCL=35585
CL=35601
2009-10-12 10:09:35 -07: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
fcdba72d2a
correct a design flaw: Atoi etc should not guess the base.
...
leave that for Btoi with base == 0.
R=r
DELTA=146 (101 added, 29 deleted, 16 changed)
OCL=35584
CL=35593
2009-10-11 23:46:11 -07:00
Nigel Tao
64145109b3
PNG encoder now filters.
...
R=r,rsc
APPROVED=r
DELTA=122 (102 added, 0 deleted, 20 changed)
OCL=35573
CL=35587
2009-10-11 19:36:29 -07:00
Rob Pike
c0e0f82e49
better code for allocation through indirection
...
R=rsc
DELTA=11 (3 added, 5 deleted, 3 changed)
OCL=35583
CL=35583
2009-10-11 18:07:47 -07:00
Rob Pike
330ab5fddb
fix bugs in gob.
...
1) didn't handle attempts to encode non-structs properly.
2) if there were multiple indirections involving allocation, didn't allocate the
intermediate cells.
tests added.
R=rsc
DELTA=82 (65 added, 5 deleted, 12 changed)
OCL=35582
CL=35582
2009-10-11 17:37:22 -07:00
Kai Backman
1620023d03
fix float <-> int64 conversions
...
R=rsc
APPROVED=rsc
DELTA=25 (25 added, 0 deleted, 0 changed)
OCL=35566
CL=35574
2009-10-10 22:06:26 -07:00
Rob Pike
5743fb594f
change Title to ToTitle for consistency. (the doc comment was already right)
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=35572
CL=35572
2009-10-10 18:56:13 -07:00
Nigel Tao
6e4f935369
In the PNG reader inner loop, collapse the two ReadFull calls into one.
...
R=rsc,r
APPROVED=rsc
DELTA=29 (2 added, 4 deleted, 23 changed)
OCL=35460
CL=35565
2009-10-09 22:44:40 -07:00
Russ Cox
fb1bcd47c6
acid bug fix.
...
lock printf output to avoid interlacing debug prints.
R=r
DELTA=10 (7 added, 0 deleted, 3 changed)
OCL=35539
CL=35561
2009-10-09 16:45:20 -07:00
Rob Pike
a14a8b2739
change date format in logs - was missing slash between month and day
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=35526
CL=35540
2009-10-09 15:44:57 -07:00
Russ Cox
93689d863c
keep a list of all the M's,
...
so that the garbage collector doesn't free them.
R=ken
OCL=35538
CL=35538
2009-10-09 15:35:33 -07:00
Dave Bort
9aa68dbdb6
Move rand.go to rng.go to prepare for some surgery.
...
R=rsc
APPROVED=rsc
DELTA=637 (318 added, 318 deleted, 1 changed)
OCL=35534
CL=35536
2009-10-09 15:16:00 -07:00
Kai Backman
98fff8ffb2
dupok, gcc compile fix, sync and syscall asm fix
...
R=rsc
APPROVED=rsc
DELTA=27 (18 added, 0 deleted, 9 changed)
OCL=35503
CL=35505
2009-10-08 22:16:08 -07:00
Robert Griesemer
517839aa40
- debugging support
...
R=rsc
DELTA=110 (98 added, 0 deleted, 12 changed)
OCL=35487
CL=35490
2009-10-08 15:23:49 -07:00
Russ Cox
094f1d5990
more lgtm files from gofmt
...
R=gri
OCL=35485
CL=35488
2009-10-08 15:14:54 -07:00
Robert Griesemer
7ecfb021f3
- rewrite declaration printing to take full use of discardable tabwriter columns
...
- honor line breaks in multi-line expressions
- do not add extra indentation to multi-line string lists
- don't put blanks around simple function calls and conversions
- do not modify `` strings
- added extra test cases
R=rsc
DELTA=398 (246 added, 51 deleted, 101 changed)
OCL=35453
CL=35465
2009-10-08 08:48:33 -07:00
Nigel Tao
093af4e512
PNG encoder unit test.
...
R=rsc,r
APPROVED=r
DELTA=84 (77 added, 6 deleted, 1 changed)
OCL=35456
CL=35458
2009-10-07 23:14:23 -07:00
Russ Cox
91549438d8
apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync syscall testing time unicode unsafe utf8
...
R=gri
DELTA=1409 (79 added, 24 deleted, 1306 changed)
OCL=35415
CL=35437
2009-10-07 11:55:06 -07:00
Robert Griesemer
f77b255c38
support for "hard" and "soft" tabs:
...
- soft-tab separated columns can be discarded if empty and DiscardEmptyColumns is set
- hard-tab separated columns are never discarded
R=rsc
DELTA=63 (42 added, 7 deleted, 14 changed)
OCL=35421
CL=35435
2009-10-07 10:55:45 -07:00
Russ Cox
cfdb3a5639
make reader more useful
...
for lower-level clients:
* expose p.Skip
* expose p.Unmarshal
* wildcard struct field "Any"
* unmarshal into bool
* unmarshal into xml.Name
* unmarshal into pointer
R=r
DELTA=61 (50 added, 5 deleted, 6 changed)
OCL=35372
CL=35422
2009-10-06 22:03:47 -07:00
Russ Cox
c2ec9583a0
apply gofmt to go, gob, hash, http, image, io, json, log
...
R=gri
DELTA=1359 (138 added, 32 deleted, 1189 changed)
OCL=35408
CL=35420
2009-10-06 19:41:51 -07:00
Russ Cox
2c5ec1ebc0
apply gofmt to malloc math once os
...
R=gri
DELTA=566 (4 added, 14 deleted, 548 changed)
OCL=35410
CL=35419
2009-10-06 19:40:35 -07:00
Russ Cox
6faacd2244
apply gofmt to auto-generated syscall files
...
R=gri
DELTA=4023 (104 added, 27 deleted, 3892 changed)
OCL=35416
CL=35418
2009-10-06 19:38:30 -07:00
Kai Backman
a2cf914379
5l library loading, 64 bit entry points
...
R=rsc
APPROVED=rsc
DELTA=58 (52 added, 3 deleted, 3 changed)
OCL=35417
CL=35417
2009-10-06 19:00:30 -07:00
Kai Backman
116beb2653
- moved 3 functions from syscall_linux to _386 and _amd64 (arm lacks them)
...
- 64 bit OMINUS
- added bunch of missing arm syscalls
R=rsc
APPROVED=rsc
DELTA=203 (189 added, 3 deleted, 11 changed)
OCL=35412
CL=35414
2009-10-06 16:39:38 -07:00
Russ Cox
13b1d5b1bb
fix build - missing from 35404
...
TBR=gri
OCL=35411
CL=35411
2009-10-06 16:06:34 -07:00
Robert Griesemer
b1fc650666
- set uint type for flags
...
- simplified some code
R=rsc
DELTA=19 (0 added, 0 deleted, 19 changed)
OCL=35405
CL=35407
2009-10-06 15:44:13 -07:00
Russ Cox
ecb863a9a9
apply gofmt to datafmt, ebnf, exec, expvar, flag, fmt
...
R=gri
DELTA=456 (6 added, 3 deleted, 447 changed)
OCL=35398
CL=35406
2009-10-06 15:38:57 -07:00
Russ Cox
2c2e2c5d55
more comment work.
...
got rid of regexps.
primary bug fix is that // inside /* */ do not get stripped anymore,
so that the text inside
/*
int a;
// int b;
int c;
*/
is
int a;
// int b;
int c;
before, the "int b;" line was being uncommented too.
R=gri
DELTA=65 (13 added, 42 deleted, 10 changed)
OCL=35334
CL=35404
2009-10-06 15:28:47 -07:00
Robert Griesemer
dc093494f3
- simplify "needsBlanks" logic for identifiers and strings
...
TBR=rsc
DELTA=16 (10 added, 4 deleted, 2 changed)
OCL=35379
CL=35403
2009-10-06 15:22:03 -07:00
Robert Griesemer
90193fb67e
add IgnoreEmptyColumns feature to tabwriter
...
R=rsc
DELTA=96 (74 added, 2 deleted, 20 changed)
OCL=35391
CL=35402
2009-10-06 15:10:36 -07:00
Russ Cox
650bff6aa9
another round of gofmt applications
...
R=gri
DELTA=900 (106 added, 31 deleted, 763 changed)
OCL=35384
CL=35396
2009-10-06 14:55:39 -07:00
Russ Cox
22c98a3314
gofmt on crypto, debug
...
R=gri
DELTA=2560 (127 added, 177 deleted, 2256 changed)
OCL=35388
CL=35395
2009-10-06 14:55:06 -07:00
Russ Cox
c62b3265a7
apply gofmt to the LGTM-marked files from 34501
...
that have not changed since I applied gofmt.
R=gri
DELTA=456 (77 added, 3 deleted, 376 changed)
OCL=35378
CL=35383
2009-10-06 11:42:55 -07:00
Adam Langley
9d9a421e24
Change description of time.Time.ZoneOffset to specify east is +ve.
...
Currently, the description says that +ve numbers are westwards of UTC.
Typically, timezones are specified with +ve numbers running east of Greenwich.
For example, San Francisco is specified as UTC-8. Also, when calling
time.Localtime(), the following is returned on my box in PDT:
{Year:2009 Month:10 Day:5 Hour:18 Minute:55 Second:6 Weekday:1 ZoneOffset:-25200
Zone:PDT}
Note that the ZoneOffset is negative. This leads me to suspect that the
description is mistaken.
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=35356
CL=35377
2009-10-06 10:01:39 -07:00
Robert Griesemer
63ef5a4173
change tabwidth to 8 for tests
...
R=rsc
DELTA=39 (0 added, 0 deleted, 39 changed)
OCL=35360
CL=35376
2009-10-06 09:52:37 -07:00
Kai Backman
d58b5fca45
move cas out, add dummy runcgo.
...
R=rsc
APPROVED=rsc
DELTA=73 (45 added, 28 deleted, 0 changed)
OCL=35363
CL=35366
2009-10-05 21:52:10 -07:00
Robert Griesemer
e8210824f6
various go printer fixes:
...
- better handling of line breaks in expression lists
- fixed line breaks around label decls
- remove ()'s around if, for, switch expressions
- simple index expressions don't require blanks
- better line breaks around declarations of different kind
R=rsc
DELTA=404 (369 added, 8 deleted, 27 changed)
OCL=35354
CL=35359
2009-10-05 19:37:34 -07:00
Nigel Tao
f2d2e113be
First cut at a PNG encoder.
...
TODOs include filtering, and a unit test.
R=rsc
APPROVED=r
DELTA=280 (249 added, 1 deleted, 30 changed)
OCL=35262
CL=35348
2009-10-05 17:34:15 -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
0ddfe70c27
XML parser
...
R=r
DELTA=546 (545 added, 0 deleted, 1 changed)
OCL=35318
CL=35341
2009-10-05 15:10:00 -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
Russ Cox
7d85cebb1c
preserve blank lines in // comments
...
R=gri
DELTA=32 (13 added, 12 deleted, 7 changed)
OCL=35317
CL=35332
2009-10-05 11:24:01 -07:00
Russ Cox
c5b056f24f
update json comments
...
R=r
DELTA=16 (4 added, 2 deleted, 10 changed)
OCL=35320
CL=35331
2009-10-05 11:23:44 -07:00
David Symonds
c17dde2730
Add write support for the GNU tar binary numeric field extension.
...
R=rsc
APPROVED=rsc
DELTA=102 (89 added, 1 deleted, 12 changed)
OCL=35321
CL=35327
2009-10-05 04:08:24 -07:00
Bill Neubauer
41a2b21f26
Fixing HTTP POST handling to work with Chrome and Safari.
...
request.go does not handle Content-Type correctly for the definition of
Media Types.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
R=rsc
APPROVED=rsc
DELTA=44 (42 added, 0 deleted, 2 changed)
OCL=35274
CL=35306
2009-10-03 11:09:01 -07:00
Russ Cox
133a158bd8
8c, 8l dynamic loading support.
...
better mach binaries.
cgo working on darwin+linux amd64+386.
eliminated context switches - pi is 30x faster.
add libcgo to build.
on snow leopard:
- non-cgo binaries work; all tests pass.
- cgo binaries work on amd64 but not 386.
R=r
DELTA=2031 (1316 added, 626 deleted, 89 changed)
OCL=35264
CL=35304
2009-10-03 10:37:12 -07:00
Russ Cox
f15300beb7
expand error regexp in dns test
...
R=r
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=35292
CL=35303
2009-10-03 10:35:49 -07:00
Robert Griesemer
4b3a13d379
- improved handling of white space around declarations and statements
...
- extra tests
R=rsc
DELTA=366 (264 added, 37 deleted, 65 changed)
OCL=35299
CL=35301
2009-10-02 22:24:05 -07:00
Robert Griesemer
433e05974a
- allow parenthesized [...]T types as in: ([...]int){}
...
- added extra tests
R=rsc
DELTA=55 (37 added, 0 deleted, 18 changed)
OCL=35250
CL=35276
2009-10-02 10:03:25 -07:00
Nigel Tao
032f2d399f
Change deflate.go's default compression level from 4 to 6.
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=35208
CL=35261
2009-10-01 17:50:16 -07:00
Kai Backman
e5c884f7db
some progress on arm linux syscall interface. ztypes_linux_arm
...
still has problems with godefs.
R=rsc
APPROVED=rsc
DELTA=801 (134 added, 235 deleted, 432 changed)
OCL=35189
CL=35211
2009-10-01 06:55:01 -07:00
Russ Cox
e67a5084b8
cgo working on linux/386
...
R=r
DELTA=70 (47 added, 4 deleted, 19 changed)
OCL=35167
CL=35171
2009-09-30 13:47:15 -07:00
Rob Pike
0632bb4ae5
rename the public exvar package to be expvar.
...
R=rsc
DELTA=684 (324 added, 324 deleted, 36 changed)
OCL=35161
CL=35163
2009-09-30 13:11:33 -07:00
Russ Cox
f2a520f48d
clean up error output;
...
do not print entire buffer on error,
since it can be very large.
instead print identifying string.
R=krasin
DELTA=14 (1 added, 3 deleted, 10 changed)
OCL=35141
CL=35143
2009-09-30 08:59:56 -07:00
Russ Cox
08eefec9d6
nacl system call updates
...
R=r
DELTA=236 (211 added, 18 deleted, 7 changed)
OCL=35084
CL=35131
2009-09-29 21:22:25 -07:00
Russ Cox
6f1698774d
undo 35108 (disallow parens around type in struct literal).
...
allow parens around [...]int in struct literal.
R=ken
OCL=35112
CL=35130
2009-09-29 21:21:14 -07:00
Nigel Tao
c51e184538
ZLIB deflater.
...
R=rsc
APPROVED=rsc
DELTA=222 (219 added, 0 deleted, 3 changed)
OCL=35031
CL=35129
2009-09-29 19:47:05 -07:00
Russ Cox
9c3c140984
disallow parens around type in struct literal syntax,
...
per discussion with gri.
R=ken
OCL=35108
CL=35108
2009-09-29 16:05:44 -07:00
Ivan Krasin
c59a965133
Deflate encoder
...
APPROVED=rsc
OCL=34514
CL=35093
2009-09-29 13:16:21 -07:00
Adam Langley
5a69935a3c
Add crypto/rc4.
...
RC4 is a common stream cipher. This adds a pure-go C implementation.
R=r
APPROVED=r
DELTA=139 (138 added, 0 deleted, 1 changed)
OCL=35056
CL=35092
2009-09-29 12:15:24 -07:00
Robert Griesemer
ec10bf8f43
permit only one method name per method signature in interface types
...
(in sync with spec CL 35047)
R=rsc
DELTA=44 (4 added, 8 deleted, 32 changed)
OCL=35048
CL=35054
2009-09-28 14:54:53 -07:00
Austin Clements
4211384976
Switch ogle to in-tree gosym package. Delete my private sym
...
package. If a Sym is a function symbol, include a reference
to the Func so it's easily accessible when you're traversing
the list of all symbols. This diff is more interesting than
the proc switch because the gosym interface differs from the
old sym interface.
R=rsc
APPROVED=rsc
DELTA=1957 (34 added, 1868 deleted, 55 changed)
OCL=34969
CL=35008
2009-09-25 09:39:08 -07:00
Russ Cox
86b119f765
install assembly math.Sqrt on amd64
...
R=r
DELTA=33 (32 added, 0 deleted, 1 changed)
OCL=34983
CL=34986
2009-09-24 14:27:52 -07:00
Russ Cox
285b6021e9
missing files; cleaned up g4 nothave output.
...
fixes 386 build.
R=r
DELTA=56 (56 added, 0 deleted, 0 changed)
OCL=34979
CL=34981
2009-09-24 13:38:18 -07:00
Russ Cox
a4d09c2aa3
add Size method to dwarf.Type
...
R=r
DELTA=30 (24 added, 3 deleted, 3 changed)
OCL=34950
CL=34974
2009-09-24 11:43:38 -07:00
Russ Cox
12fc217336
cgo checkpoint.
...
can write all 3 output files and then compile them by hand.
R=r
DELTA=919 (841 added, 16 deleted, 62 changed)
OCL=34954
CL=34973
2009-09-24 11:43:19 -07:00
Austin Clements
ffe83e582e
Switch ogle over to the in-tree debug/proc package. Fix
...
debug/proc to install to the right place. Delete the old
ptrace package. The diff looks huge, but it's mostly
s/ptrace/proc/.
R=rsc
APPROVED=rsc
DELTA=1940 (10 added, 1835 deleted, 95 changed)
OCL=34966
CL=34968
2009-09-24 09:07:47 -07:00
Russ Cox
f0964a54fb
go/printer: fix sync bug - avoid sending on errors twice -
...
and report node type in error
R=gri
DELTA=4 (3 added, 0 deleted, 1 changed)
OCL=34949
CL=34955
2009-09-24 01:37:27 -07:00
Rob Pike
fbb7029747
expand ticker interface to allow a client to shut down a ticker.
...
existing interface still works.
R=rsc
DELTA=50 (32 added, 2 deleted, 16 changed)
OCL=34930
CL=34932
2009-09-23 13:02:14 -07:00
Russ Cox
567673fc42
nacl - run tests under emulator.
...
special all-nacl.bash and test/run-nacl that
run just the tests known to work under nacl.
the rest requires closures.
fix another bug or two in syscall.
R=r
DELTA=420 (410 added, 8 deleted, 2 changed)
OCL=34882
CL=34907
2009-09-22 16:56:28 -07:00
Russ Cox
1b14bdbf1c
changes to accommodate nacl:
...
* change ldt0setup to set GS itself; nacl won't let us do it.
* change breakpoint to INT $3 so 8l can translate to HLT for nacl.
* panic if closure is needed on nacl.
* do not try to access symbol table on nacl.
* mmap in 64kB chunks.
nacl support:
* system calls, threading, locks.
R=r
DELTA=365 (357 added, 5 deleted, 3 changed)
OCL=34880
CL=34906
2009-09-22 16:28:32 -07:00
Rob Pike
9e7f3a46d3
restore the old algorithm. the new one is more memory efficient in large cases
...
but too slow across the board.
R=rsc
DELTA=315 (50 added, 219 deleted, 46 changed)
OCL=34868
CL=34902
2009-09-22 14:53:48 -07:00
Russ Cox
f7e43ffa9d
nacl syscall: write return values to correct stack location
...
R=r
DELTA=18 (0 added, 0 deleted, 18 changed)
OCL=34894
CL=34894
2009-09-22 10:34:44 -07:00
Russ Cox
7b850fb7e3
nacl syscall package - machine generated files
...
R=r
DELTA=515 (515 added, 0 deleted, 0 changed)
OCL=34881
CL=34891
2009-09-22 07:49:49 -07:00
Russ Cox
b428456df6
nacl syscall package.
...
similar tweaks to make debug/proc, net, os build.
R=r
DELTA=861 (855 added, 4 deleted, 2 changed)
OCL=34877
CL=34890
2009-09-22 07:49:31 -07:00
Robert Griesemer
681f86a87f
improved spacing around if, switch, and for control clauses
...
R=r
DELTA=89 (82 added, 5 deleted, 2 changed)
OCL=34870
CL=34870
2009-09-21 18:07:20 -07:00
Russ Cox
bbcb91a3a7
convert 386 to use %gs instead of %fs for extern register.
...
required for nacl and may be nicer for ffi,
because %gs is the standard register for thread-local storage.
R=ken
OCL=34861
CL=34866
2009-09-21 15:46:50 -07:00
Russ Cox
27969e87cf
add required conversions; bug in compiler let it slip through
...
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=34860
CL=34864
2009-09-21 15:44:10 -07:00
Rob Pike
6efd7e6b8f
move strings.Buffer into bytes
...
delete strings.Buffer
add a test for a bug not caught before (mustn't install zero-length blocks)
R=rsc
DELTA=987 (289 added, 587 deleted, 111 changed)
OCL=34850
CL=34850
2009-09-21 12:59:14 -07:00
Rob Pike
fed4770685
step 2 of the great buffer shift.
...
make strings.Buffer handle strings and bytes with comparable efficiency.
if ok, next step will be to move this code to bytes.Buffer and terminate
strings.Buffer's short happy life.
R=rsc
DELTA=292 (212 added, 0 deleted, 80 changed)
OCL=34837
CL=34849
2009-09-21 12:20:15 -07:00
Nigel Tao
11e313ae72
Unit tests for image/png, based off the semi-official pngsuite from
...
libpng.org.
R=rsc
APPROVED=r
DELTA=1176 (1175 added, 1 deleted, 0 changed)
OCL=34727
CL=34838
2009-09-20 19:08:03 -07:00
Robert Griesemer
144580d690
- filter trailing whitespace
...
- removed some unused code
R=rsc
DELTA=103 (84 added, 15 deleted, 4 changed)
OCL=34816
CL=34829
2009-09-19 11:52:40 -07:00
Kai Backman
46e392e01c
changed 5c calling convention to use stack exclusively for in
...
params. a number of fixes to assembly routines that assumed R0
had the first arg. one stack offset fix, arm pushes the link
register on stack top.
go/test: passes 65% (235/364) tests
R=rsc
APPROVED=rsc
DELTA=20 (11 added, 0 deleted, 9 changed)
OCL=34809
CL=34812
2009-09-18 16:45:41 -07:00
Russ Cox
2e5a588718
fix build again; this time for sure. sigh
...
TBR=r
OCL=34803
CL=34803
2009-09-18 12:56:18 -07:00
Russ Cox
99f54911cd
fix build - missing file
...
TBR=r
OCL=34800
CL=34800
2009-09-18 12:45:34 -07:00
Russ Cox
92f773dc77
add DWARF method to elf.File.
...
test both ELF and Mach-O in dwarf package.
R=r
DELTA=83 (44 added, 10 deleted, 29 changed)
OCL=34717
CL=34790
2009-09-18 11:50:24 -07:00
Russ Cox
bf69025825
Mach-O file reading
...
R=r
DELTA=784 (784 added, 0 deleted, 0 changed)
OCL=34715
CL=34788
2009-09-18 11:49:22 -07:00
Austin Clements
ad9c6f7700
Rudimentary command shell for Ogle. Hack to prevent linker
...
from inlining newprocreadylocked. Fix type bridge's handling
of basic types. Include interpreter's Thread in bridged
native function calls.
; load . "6.out"
Started 6.out
; BpSet("main·merge")
; ContWait()
breakpoint at 0x400800
=> 400800 main·merge /home/austin/src-go1/usr/austin/ptrace/test/sort.go:19
; bt
=> 400800 main·merge /home/austin/src-go1/usr/austin/ptrace/test/sort.go:19
400b6a main·mergeSort+0x1be /home/austin/src-go1/usr/austin/ptrace/test/sort.go:34
448313 goexit /home/austin/src-go1/src/pkg/runtime/proc.c:133
; main.merge.a
{1}
; load . "pid:25753"
Attached to 25753
; bt
=> 479ddf syscall·Syscall+0x24 /home/austin/src-go1/src/pkg/syscall/asm_linux_amd64.s:24
47c011 syscall·Read+0x5d /home/austin/src-go1/src/pkg/syscall/zsyscall_linux_amd64.go:368
4119e5 os·*File·Read+0x5f /home/austin/src-go1/src/pkg/os/file.go:122
427bf3 bufio·*Reader·fill+0x116 /home/austin/src-go1/src/pkg/bufio/bufio.go:105
428361 bufio·*Reader·ReadSlice+0x195 /home/austin/src-go1/src/pkg/bufio/bufio.go:244
40204a ogle·Main+0x94 /home/austin/src-go1/usr/austin/ogle/cmd.go:226
40080f main·main+0xf /home/austin/src-go1/usr/austin/ogle/main.go:6
41c4b8 mainstart+0xf /home/austin/src-go1/src/pkg/runtime/amd64/asm.s:55
41531f goexit /home/austin/src-go1/src/pkg/runtime/proc.c:133
R=rsc
APPROVED=rsc
DELTA=433 (420 added, 2 deleted, 11 changed)
OCL=34410
CL=34782
2009-09-18 09:11:19 -07:00
Rob Pike
7be770071f
use buf.String() instead of string(buf.Bytes())
...
use strings.Buffer instead of bytes.Buffer in some places
R=rsc
DELTA=40 (0 added, 3 deleted, 37 changed)
OCL=34770
CL=34775
2009-09-17 23:51:06 -07:00
Robert Griesemer
2a01b9d46e
- improved formatting of declarations
...
- improved formatting of struct and interface types
R=rsc
DELTA=471 (364 added, 47 deleted, 60 changed)
OCL=34747
CL=34751
2009-09-17 15:20:15 -07:00
Russ Cox
20011bc878
unused imports
...
R=r
OCL=34731
CL=34731
2009-09-17 10:27:04 -07:00
Robert Griesemer
1401151ab2
- don't add "..." anonymous field to structs/interfaces if entries are stripped
...
- don't print any optional semicolons after declarations inside functions
- indicate non-exported fields/methods in exported types with a comment
so that the "exported source" is legal Go code
- more tests
R=rsc
DELTA=300 (227 added, 25 deleted, 48 changed)
OCL=34697
CL=34730
2009-09-17 09:12:14 -07:00
Robert Griesemer
75f72e7b2e
fix build: updated Make.deps
...
TBR=r
OCL=34729
CL=34729
2009-09-17 09:08:24 -07:00
Rob Pike
229e976163
first cut at a string buffer.
...
can be made more efficient but this is reasonable.
R=rsc
DELTA=363 (363 added, 0 deleted, 0 changed)
OCL=34720
CL=34720
2009-09-16 23:32:17 -07:00
Russ Cox
11df49c43f
publish doc.CommentText
...
R=gri
DELTA=29 (10 added, 12 deleted, 7 changed)
OCL=34709
CL=34712
2009-09-16 16:56:20 -07:00
Russ Cox
127368d220
make String work on Position values, to enable
...
fmt.Printf("%s: %s\n", expr.Pos(), message);
R=gri
DELTA=15 (1 added, 3 deleted, 11 changed)
OCL=34706
CL=34708
2009-09-16 16:38:49 -07:00
Rob Pike
d5be41fc4e
rename bytes.Buffer.Data() to bytes.Buffer.Bytes()
...
R=rsc
DELTA=152 (6 added, 0 deleted, 146 changed)
OCL=34695
CL=34701
2009-09-16 15:15:00 -07:00
Russ Cox
0ee18ca816
add heap.Remove
...
R=gri
DELTA=14 (14 added, 0 deleted, 0 changed)
OCL=34636
CL=34687
2009-09-16 10:43:49 -07:00
Russ Cox
1bbc044df9
parse and present DWARF type information
...
R=r
DELTA=940 (929 added, 1 deleted, 10 changed)
OCL=34679
CL=34686
2009-09-16 10:43:27 -07:00
Russ Cox
f249c4114c
basic DWARF reading.
...
R=r
DELTA=949 (949 added, 0 deleted, 0 changed)
OCL=34676
CL=34678
2009-09-15 21:58:45 -07:00
Robert Griesemer
4459624f04
bug fix: allow function types as operands
...
R=rsc
DELTA=10 (5 added, 0 deleted, 5 changed)
OCL=34662
CL=34666
2009-09-15 16:16:34 -07:00
Kai Backman
bcfc6e631f
fixed register usage and removed some dead code.
...
R=rsc
APPROVED=rsc
DELTA=17 (0 added, 12 deleted, 5 changed)
OCL=34659
CL=34665
2009-09-15 16:15:17 -07:00
Robert Griesemer
67ab1b9fae
consider each case in a switch independent from the previous one for alignment purposes
...
R=rsc
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=34654
CL=34656
2009-09-15 13:53:10 -07:00
Russ Cox
98c98192ec
final batch for "declared and not used"
...
* update mksyscall.sh and rebuild syscall/z*.go
* fix a few linux-only files
R=r
DELTA=455 (12 added, 1 deleted, 442 changed)
OCL=34637
CL=34655
2009-09-15 13:51:33 -07:00
Robert Griesemer
9b5eb305e1
fix build: added missing files
...
TBR=rsc
DELTA=56 (56 added, 0 deleted, 0 changed)
OCL=34652
CL=34652
2009-09-15 13:33:16 -07:00
Robert Griesemer
7f25485fc6
go/printer:
...
- printing of expressions: put spaces only where "needed"
- printing of import statements: no double indentation if there are no renames
- print labels on separate lines
- added extra test files
go/ast:
- unified basic literal nodes and as a result deleted duplicated code
- added initial code to track scopes (not fully used yet)
replaces CL 34553
R=rsc
DELTA=881 (579 added, 223 deleted, 79 changed)
OCL=34623
CL=34651
2009-09-15 13:06:24 -07:00
Russ Cox
ca6a0fee1b
more "declared and not used".
...
the last round omitted := range and only
checked 1 out of N vars in a multi-var :=
R=r
OCL=34624
CL=34638
2009-09-15 09:41:59 -07:00
Russ Cox
1a3198907b
fix "declared and not used" in tests;
...
also template/template.go, missed last time.
R=r
DELTA=116 (61 added, 10 deleted, 45 changed)
OCL=34620
CL=34622
2009-09-14 21:03:53 -07:00
Russ Cox
28eba4877b
fix "declared and not used" errors in non-test code.
...
R=r
DELTA=112 (6 added, 57 deleted, 49 changed)
OCL=34610
CL=34610
2009-09-14 17:20:29 -07:00
Russ Cox
b198b994a1
do not crash on nil data value
...
R=r
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=34606
CL=34609
2009-09-14 16:46:48 -07:00
Russ Cox
c5a441ac70
do not crash printing the zero value for time.Time.
...
R=r
DELTA=2 (1 added, 0 deleted, 1 changed)
OCL=34605
CL=34608
2009-09-14 16:45:35 -07:00
Nigel Tao
8a0cb9302f
When decoding a paletted PNG, require that a PLTE chunk is seen before
...
the first IDAT chunk.
R=rsc
APPROVED=rsc
DELTA=7 (2 added, 0 deleted, 5 changed)
OCL=34583
CL=34585
2009-09-13 21:47:54 -07:00
Rob Pike
d3013d8aa1
Add and AddByte
...
R=rsc
DELTA=83 (83 added, 0 deleted, 0 changed)
OCL=34584
CL=34584
2009-09-13 21:35:18 -07:00
Nigel Tao
70eef675d5
PNG decoder for go.
...
R=rsc
APPROVED=r
DELTA=694 (675 added, 3 deleted, 16 changed)
OCL=34427
CL=34554
2009-09-10 21:33:44 -07:00
Robert Griesemer
1f11578614
fix build
...
TBR=rsc
OCL=34550
CL=34552
2009-09-10 18:26:14 -07:00
Robert Griesemer
58c5e62f8b
better gofmt formatting:
...
- first cut a better line breaks in expr lists
- trailing commas and semis printed where we tend to write them
- fixed a couple of minor spacing issues (interface{}, chan<-, map[x]y, x: y)
- removed some formatting flags from gofmt: no need to change default
- removed option to reverse declaration order when printing
- excluded files from test that cause trouble with idempotency test for now
R=rsc
DELTA=497 (364 added, 83 deleted, 50 changed)
OCL=34539
CL=34544
2009-09-10 17:27:06 -07:00
Russ Cox
8f2bf201d3
fix indentation
...
R=r
DELTA=166 (0 added, 0 deleted, 166 changed)
OCL=34521
CL=34527
2009-09-10 14:18:53 -07:00
Rob Pike
f966ba1df9
use the new type switch multicase to clean up a little.
...
R=rsc
DELTA=28 (7 added, 16 deleted, 5 changed)
OCL=34487
CL=34487
2009-09-09 10:32:26 -07:00
Russ Cox
e780fa8669
defining package block names must override
...
universe block names.
BUG=2097244
R=ken
OCL=34295
CL=34473
2009-09-09 01:01:39 -07:00
Russ Cox
5d16d23362
update type switch to match spec.
...
R=ken
OCL=34471
CL=34471
2009-09-09 00:18:16 -07:00
Robert Griesemer
019e14e32e
- clarify vector comment
...
- adjusted a test to check claim
R=rsc
DELTA=3 (2 added, 0 deleted, 1 changed)
OCL=34454
CL=34456
2009-09-08 14:29:41 -07:00
Russ Cox
7a0f4cac03
pass Type* to makechan and makemap so that
...
they can get the official alignment out of there
instead of guessing.
R=ken
OCL=34450
CL=34450
2009-09-08 13:46:54 -07:00
Russ Cox
bd0c13e9f8
documentation edits:
...
add comments showing Go syntax for each token.
move doc comments below hidden begin constants
R=gri
DELTA=66 (3 added, 3 deleted, 60 changed)
OCL=34334
CL=34445
2009-09-08 12:27:09 -07:00
Austin Clements
eabcb10a32
Don't crash in Sym.ReceiverName for symbols like "x.x"
...
R=rsc
APPROVED=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=34404
CL=34406
2009-09-04 16:12:50 -07:00
Russ Cox
45eadcf4b8
add ParseDeclList
...
R=austin
DELTA=34 (34 added, 0 deleted, 0 changed)
OCL=34280
CL=34352
2009-09-03 17:01:10 -07:00
Russ Cox
55ba20ec2d
parse expression statements beginning with
...
arithmetic unary operators + - ^
R=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=34338
CL=34350
2009-09-03 16:37:02 -07:00
Russ Cox
74bb34c107
fix linux 386 build
...
R=austin
DELTA=140 (128 added, 0 deleted, 12 changed)
OCL=34344
CL=34347
2009-09-03 16:17:21 -07:00
Russ Cox
33be0c6465
nil in DeepEqual
...
R=r
DELTA=13 (5 added, 6 deleted, 2 changed)
OCL=34337
CL=34343
2009-09-03 15:45:43 -07:00
Russ Cox
a18208fb60
fix range on invalid utf8 bug
...
R=r
DELTA=42 (21 added, 20 deleted, 1 changed)
OCL=34328
CL=34333
2009-09-03 13:56:06 -07:00
Austin Clements
37aa6c9962
Fix uninstalling of breakpoints when a process exits. Process
...
exit is still handled poorly.
R=rsc
APPROVED=rsc
DELTA=6 (6 added, 0 deleted, 0 changed)
OCL=34288
CL=34315
2009-09-03 10:55:20 -07:00
Russ Cox
a03764aa50
fix build
...
TBR=gri
OCL=34264
CL=34264
2009-09-02 13:13:40 -07:00
Robert Griesemer
115c62de8d
heap algorithm
...
R=rsc
DELTA=196 (194 added, 0 deleted, 2 changed)
OCL=34234
CL=34263
2009-09-02 12:54:38 -07:00
Russ Cox
e10ca39d04
add debug/gosym and debug/proc to build
...
(was waiting until after release)
R=austin
DELTA=5 (5 added, 0 deleted, 0 changed)
OCL=34222
CL=34261
2009-09-02 12:03:33 -07:00
Russ Cox
58a0d6cebc
two gob nits found with stricter 6g
...
(6g had a few pretty major bugs
where it was more lax than it should
have been when checking when things
satisfied interfaces; i fixed them and
this turned up.)
R=r
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=34243
CL=34248
2009-09-02 09:03:42 -07:00
Austin Clements
2364f8c30c
Don't crash for regexps > 19 characters.
...
R=r
APPROVED=r
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=34216
CL=34220
2009-09-01 16:46:16 -07:00
Russ Cox
59db1f7bb1
template:
...
* do full lookup for {.section},
so that it is always allowed to replace
{Foo} with {.section Foo}{@}{.end}
* treat False as empty so that .section can
be used to test bools
R=r
DELTA=29 (21 added, 0 deleted, 8 changed)
OCL=34215
CL=34219
2009-09-01 16:31:49 -07:00
Russ Cox
f56e6fd786
make debug/proc "build" on more architectures
...
R=austin
DELTA=17 (0 added, 16 deleted, 1 changed)
OCL=34213
CL=34218
2009-09-01 16:19:14 -07:00
Russ Cox
f277ebfc76
import debug/gosym from usr/austin/sym
...
R=austin
DELTA=958 (956 added, 0 deleted, 2 changed)
OCL=34180
CL=34212
2009-09-01 16:11:17 -07:00
Rob Pike
2f5e75859b
casing operations for byte arrays
...
R=rsc
DELTA=186 (181 added, 0 deleted, 5 changed)
OCL=34203
CL=34203
2009-09-01 13:46:59 -07:00
Robert Griesemer
e8988bc434
don't show exported methods of non-exported types
...
R=rsc
DELTA=44 (10 added, 30 deleted, 4 changed)
OCL=34195
CL=34200
2009-09-01 11:56:42 -07:00
Robert Griesemer
4fe7a38be1
added "Under construction" to package comment
...
R=rsc
DELTA=2 (2 added, 0 deleted, 0 changed)
OCL=34196
CL=34199
2009-09-01 11:56:24 -07:00
Russ Cox
dd87082ab8
import debug/proc from usr/austin/ptrace
...
R=austin
DELTA=1892 (1892 added, 0 deleted, 0 changed)
OCL=34183
CL=34197
2009-09-01 11:51:05 -07:00
Rob Pike
d80a177a9e
make ToUpper, ToLower etc. handle unicode properly.
...
Change their names too.
R=rsc
DELTA=206 (123 added, 2 deleted, 81 changed)
OCL=34170
CL=34194
2009-09-01 11:06:28 -07:00
Rob Pike
932def9396
test that ASCII optimizations agree with the unicode tables
...
R=rsc
DELTA=40 (40 added, 0 deleted, 0 changed)
OCL=34168
CL=34176
2009-08-31 21:18:40 -07:00
Rob Pike
f9e4f398b6
IsSpace
...
R=rsc
DELTA=39 (39 added, 0 deleted, 0 changed)
OCL=34153
CL=34167
2009-08-31 18:12:40 -07:00
Russ Cox
fe8ff955e9
add newprocreadylocked for debugger
...
R=austin
DELTA=10 (9 added, 0 deleted, 1 changed)
OCL=34163
CL=34166
2009-08-31 18:10:11 -07:00
Rob Pike
fe3838489f
submitter's regret. rename Props to Properties
...
R=rsc
DELTA=9 (0 added, 0 deleted, 9 changed)
OCL=34148
CL=34151
2009-08-31 16:48:56 -07:00
Russ Cox
f0492f4e27
elf file parser
...
R=austin
DELTA=448 (447 added, 0 deleted, 1 changed)
OCL=34139
CL=34150
2009-08-31 16:48:44 -07:00
Rob Pike
1e55e4a3e6
add property tables
...
R=rsc
DELTA=1087 (1001 added, 78 deleted, 8 changed)
OCL=34137
CL=34147
2009-08-31 16:43:17 -07:00
Russ Cox
a843b4541a
fmt: add verbs:
...
%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
2009-08-31 16:38:30 -07:00
Russ Cox
e596297139
add SectionReader, ReaderAt.
...
R=r
DELTA=85 (85 added, 0 deleted, 0 changed)
OCL=34141
CL=34144
2009-08-31 16:34:43 -07:00
Russ Cox
60222bf538
package debug/binary
...
R=austin
DELTA=320 (320 added, 0 deleted, 0 changed)
OCL=33983
CL=34143
2009-08-31 16:10:16 -07:00
Russ Cox
819543986d
translate C ld/elf.h into Go
...
R=austin
DELTA=1630 (1630 added, 0 deleted, 0 changed)
OCL=34001
CL=34142
2009-08-31 16:08:12 -07:00
David Symonds
8d29f7f1c9
Consistency changes to container/* packages for iteration.
...
container/list:
- change Iter to go over the list values
container/ring:
- add Iter, drop Forward/Backward
container/vector:
- add channel direction constraints
R=rsc,gri
APPROVED=rsc
DELTA=86 (23 added, 40 deleted, 23 changed)
OCL=33935
CL=34132
2009-08-31 14:43:27 -07:00
Robert Griesemer
5a40a682e3
simplified heuristic for associating const/var decls with types
...
(per suggestion from rsc)
R=rsc
DELTA=24 (3 added, 9 deleted, 12 changed)
OCL=34121
CL=34130
2009-08-31 13:13:04 -07:00
Rob Pike
149e3d332c
rearrange some constants. unicode package now defines MaxRune and ReplacementChar.
...
utf8 package imports unicode to get those definitions.
regenerate dependencies.
R=rsc
DELTA=41 (19 added, 3 deleted, 19 changed)
OCL=34123
CL=34129
2009-08-31 13:01:25 -07:00
Russ Cox
4962e7ee9b
use correct pc for printing fn+%#x in tracebacks
...
R=austin
DELTA=12 (2 added, 0 deleted, 10 changed)
OCL=34098
CL=34120
2009-08-31 10:55:24 -07:00
Robert Griesemer
3dc7b382f9
associate const and var declarations with a type where possible
...
R=rsc
DELTA=105 (87 added, 7 deleted, 11 changed)
OCL=34062
CL=34119
2009-08-31 10:47:34 -07:00
Rob Pike
c62b9d8f2a
can't encode array or slice - catch in sendType rather than failing in Encode
...
R=rsc
DELTA=38 (33 added, 3 deleted, 2 changed)
OCL=34101
CL=34104
2009-08-30 19:46:35 -07:00
Russ Cox
9449e3b02c
list untested packages instead of tested
...
R=r
DELTA=68 (12 added, 55 deleted, 1 changed)
OCL=34095
CL=34102
2009-08-30 19:21:32 -07:00
Rob Pike
427a0adb39
further simplification of the case fold calculation.
...
hard to beat at this point, i think.
R=rsc
DELTA=38 (8 added, 21 deleted, 9 changed)
OCL=34092
CL=34096
2009-08-30 18:17:52 -07:00
Rob Pike
3c098e2789
add the Upper/Lower sequence optimization.
...
tables shrink 900 lines.
mapping code gets a little slower
R=rsc
DELTA=1124 (105 added, 952 deleted, 67 changed)
OCL=34079
CL=34089
2009-08-30 14:02:42 -07:00
David Symonds
792eba220e
Fix .alternates execution: it was skipping every second token.
...
R=r
APPROVED=r
DELTA=13 (11 added, 0 deleted, 2 changed)
OCL=34081
CL=34081
2009-08-29 21:13:32 -07:00
Rob Pike
22c2b476a8
first cut at case mapping tables and library.
...
next cut will do the optimization for alternating sequences.
R=rsc
DELTA=1658 (1620 added, 9 deleted, 29 changed)
OCL=34072
CL=34075
2009-08-28 23:05:16 -07:00
Rob Pike
c6540d31f6
print the value using (in effect) %v when Printf is given mismatched args for its format
...
Printf("%s", 2) gives %s(int=2)
R=rsc
DELTA=12 (10 added, 0 deleted, 2 changed)
OCL=34042
CL=34044
2009-08-28 13:02:34 -07:00
Ken Thompson
bf0130cc0f
sliceslice inline
...
R=rsc
OCL=34041
CL=34041
2009-08-28 12:37:39 -07:00
Rob Pike
f59ae064ba
fix ", First" ", Last" ranges from UnicodeData.txt
...
R=rsc
DELTA=54 (38 added, 2 deleted, 14 changed)
OCL=34032
CL=34040
2009-08-28 11:57:38 -07:00
Ian Lance Taylor
221d0567e3
Run the tests for the testing package. Fix them so that they
...
work.
R=rsc
DELTA=16 (1 added, 1 deleted, 14 changed)
OCL=34012
CL=34038
2009-08-28 11:44:46 -07:00
Robert Griesemer
b291fc31fc
- don't associate factory methods to basic types (which have no explicit declarations)
...
- be more robust in the presence of absent type declarations
R=rsc
DELTA=81 (63 added, 14 deleted, 4 changed)
OCL=34033
CL=34036
2009-08-28 11:39:25 -07:00
Robert Griesemer
636cdc7622
- collect consts and vars in one list
...
- handle absence of forward-decls correctly
(cannot assume a type was declared before it was used)
R=rsc
DELTA=112 (32 added, 38 deleted, 42 changed)
OCL=34008
CL=34027
2009-08-28 09:11:01 -07:00
Kai Backman
ee31157e16
64 bit lsh, sub, and/or/eor. some placeholder files in syscall and os.
...
R=rsc
APPROVED=rsc
DELTA=204 (139 added, 0 deleted, 65 changed)
OCL=34009
CL=34025
2009-08-28 07:23:24 -07:00
David Symonds
646a27bd27
Build fix: fix typo in sort pkg.
...
APPROVED=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=34016
CL=34022
2009-08-28 02:27:32 -07:00
Rob Pike
25caf18a8e
improve generated code for godocability
...
R=rsc
DELTA=459 (168 added, 279 deleted, 12 changed)
OCL=34005
CL=34007
2009-08-27 18:38:02 -07:00
Russ Cox
f7e92c596c
os.File.ReadAt/WriteAt
...
R=r
DELTA=84 (81 added, 0 deleted, 3 changed)
OCL=34006
CL=34006
2009-08-27 18:36:45 -07:00
Rob Pike
185ae4f99e
add Sort methods for convenience types
...
R=gri
DELTA=9 (9 added, 0 deleted, 0 changed)
OCL=34000
CL=34003
2009-08-27 18:23:45 -07:00
Rob Pike
8b6274eb9f
add scripts tables to the unicode package
...
R=rsc
DELTA=1479 (1422 added, 1 deleted, 56 changed)
OCL=33993
CL=33997
2009-08-27 17:04:23 -07:00
Robert Griesemer
f96099dbac
Cleanups:
...
- remove visitor pattern interface (not used)
- added non-exported "branding" methods to enforce
node hierarchy
R=rsc
DELTA=174 (13 added, 92 deleted, 69 changed)
OCL=33838
CL=33963
2009-08-27 11:25:16 -07:00
Russ Cox
4b409289f6
remove Line in bufio.ReadLine(Bytes|Slice|String)
...
also drop bool arg from ReadString
R=r
DELTA=45 (13 added, 1 deleted, 31 changed)
OCL=33923
CL=33960
2009-08-27 11:20:15 -07:00
Rob Pike
2156961bb7
fix build. changing var to const, which it should be anyway,
...
implicitly works around 6g bug.
R=rsc
OCL=33953
CL=33953
2009-08-27 09:58:43 -07:00
Rob Pike
94e691552f
unicode tables for all categories
...
maketables now has a --test option to verify the data.
R=rsc
DELTA=3087 (1982 added, 1001 deleted, 104 changed)
OCL=33947
CL=33950
2009-08-27 09:14:32 -07:00
Nigel Tao
5cbc96d958
Introduce the image package.
...
R=rsc
APPROVED=r,rsc
DELTA=244 (244 added, 0 deleted, 0 changed)
OCL=33733
CL=33940
2009-08-26 21:51:03 -07:00
David Symonds
3cf330f089
template: Support iterables for repeated fields.
...
R=r,rsc
APPROVED=rsc
DELTA=194 (97 added, 32 deleted, 65 changed)
OCL=33861
CL=33933
2009-08-26 18:30:13 -07:00
Rob Pike
24dfb749c4
change IsDecimalDigit to IsDigit because Decimal is redundant
...
R=rsc
DELTA=792 (398 added, 383 deleted, 11 changed)
OCL=33919
CL=33921
2009-08-26 16:53:07 -07:00
Russ Cox
90dcd5face
add io.LimitReader.
...
use it to limit data read from http.Request Body
R=r
DELTA=32 (8 added, 6 deleted, 18 changed)
OCL=33899
CL=33916
2009-08-26 16:23:54 -07:00
Russ Cox
29415d0557
fix bufio bugs involving readers that return os.EOF with
...
the last bit of data.
add a new iotest.DataErrReader for tests
R=r
DELTA=93 (41 added, 31 deleted, 21 changed)
OCL=33897
CL=33915
2009-08-26 16:23:34 -07:00
Russ Cox
26a2642fc3
fix codec test bug - uint -> uint8
...
R=r
OCL=33913
CL=33913
2009-08-26 16:19:59 -07:00
Ian Lance Taylor
06cac23d28
Implement divWW_g in Go.
...
R=gri
DELTA=105 (77 added, 23 deleted, 5 changed)
OCL=33890
CL=33910
2009-08-26 16:14:17 -07:00
Rob Pike
396b47bbbd
generate the unicode tables directly from web database
...
after this CL, two more to come:
1) add an exhaustive test, probably as a variant of maketables
2) add ToUpper, ToLower, ToTitle and associated tests
R=rsc
DELTA=1578 (1007 added, 559 deleted, 12 changed)
OCL=33902
CL=33907
2009-08-26 16:01:31 -07:00
Russ Cox
2aea4a063b
recycle G structs
...
R=r
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=33887
CL=33904
2009-08-26 15:26:09 -07:00
Ian Lance Taylor
8ce468ea2f
Restore comment line accidentally dropped in CL 33097.
...
R=rsc
DELTA=1 (1 added, 0 deleted, 0 changed)
OCL=33891
CL=33891
2009-08-26 14:40:34 -07:00
Robert Griesemer
08a209f387
cleanups before making larger changes
...
R=rsc
DELTA=113 (10 added, 30 deleted, 73 changed)
OCL=33877
CL=33882
2009-08-26 12:55:54 -07:00
Russ Cox
de7920e6fd
finish ChanValue: Len and Cap.
...
R=r
DELTA=45 (45 added, 0 deleted, 0 changed)
OCL=33873
CL=33881
2009-08-26 12:42:22 -07:00
Russ Cox
653cef1ba0
add Close() and Closed() to ChanValue
...
R=r
DELTA=60 (56 added, 3 deleted, 1 changed)
OCL=33868
CL=33872
2009-08-26 10:47:18 -07:00
Robert Griesemer
06c2c89452
added Newton-Raphson Division as an additional bignum testcase
...
R=rsc
DELTA=192 (192 added, 0 deleted, 0 changed)
OCL=33853
CL=33864
2009-08-26 09:46:12 -07:00
Rob Pike
87f2208bda
rename runtime internals to have modern names (array->slice etc)
...
R=rsc
DELTA=444 (179 added, 177 deleted, 88 changed)
OCL=33847
CL=33849
2009-08-25 15:54:25 -07:00
Russ Cox
67815ef65b
checkpoint & test (pidigits) before trying to automate.
...
R=r
DELTA=616 (598 added, 11 deleted, 7 changed)
OCL=33846
CL=33848
2009-08-25 15:37:22 -07:00
David Symonds
429157848f
Wrap kludge text in HTML comments so the text/html output will remain valid HTML.
...
Be more conservative: only mess with text/html and text/plain output.
R=rsc
APPROVED=rsc
DELTA=20 (12 added, 5 deleted, 3 changed)
OCL=33806
CL=33812
2009-08-24 17:31:35 -07:00
Russ Cox
fdc4b4a47f
start of FFI support, and a demo.
...
R=r
DELTA=494 (492 added, 0 deleted, 2 changed)
OCL=33784
CL=33810
2009-08-24 17:30:00 -07:00
Russ Cox
92543daff1
change reflect test to avoid bug132
...
R=gri
DELTA=20 (17 added, 0 deleted, 3 changed)
OCL=33793
CL=33802
2009-08-24 17:04:12 -07:00
Robert Griesemer
c36fbdf713
- fix for multiple fields at same depth error
...
R=rsc
DELTA=9 (5 added, 0 deleted, 4 changed)
OCL=33768
CL=33785
2009-08-24 15:45:51 -07:00
Russ Cox
9feee91d79
avoid duplicate field names, so that bug132 can be fixed
...
also fix echo bug that just surfaced in mkerrors.sh
R=r
DELTA=67 (11 added, 19 deleted, 37 changed)
OCL=33743
CL=33757
2009-08-24 11:03:23 -07:00
Russ Cox
1f177cd8b2
linker work
...
* use //ffi comments in package import data
to generate relocation entries and library loads.
* call initffi in rt0.s if present
R=r
DELTA=117 (91 added, 3 deleted, 23 changed)
OCL=33739
CL=33750
2009-08-24 10:19:31 -07:00
Russ Cox
bd4161fcba
FFI step 2: can ask for libc.so.6.
...
introduced explicit "data" symbol instead of etext
to mark beginning of data, so that using larger
alignment (i.e. 4MB like GNU loader) doesn't
confuse garbage collector.
split dodata into dodata and dobss in preparation
for putting the dynamic data + headers in the data
segment instead of stuffed at the beginning of the binary.
R=r
DELTA=52 (37 added, 3 deleted, 12 changed)
OCL=33610
CL=33618
2009-08-20 16:09:38 -07:00
Nigel Tao
b58ecb11b0
Fix inflate.go's decompressing of a fixed Huffman block that has
...
length-distance pairs.
The new test data was generated by "gzip shesells.txt", which is
presumably what you (rsc) did before, for the other test cases in
gunzip_test.go.
R=rsc
APPROVED=rsc
DELTA=21 (17 added, 2 deleted, 2 changed)
OCL=33582
CL=33616
2009-08-20 16:03:34 -07:00
Russ Cox
8a45917f3d
len and cap on chans
...
R=ken
OCL=33599
CL=33599
2009-08-20 11:12:04 -07:00
Russ Cox
52cf67a611
naming cleanup.
...
gzip.GzipInflater -> gzip.Inflater
gzip.NewGzipInflater -> gzip.NewInflater
zlib.NewZlibInflater -> zlib.NewInflater
io.ByteReader deleted in favor of bytes.Buffer
io.NewByteReader -> bytes.NewBuffer
R=r
DELTA=52 (3 added, 0 deleted, 49 changed)
OCL=33589
CL=33592
2009-08-20 10:18:48 -07:00
Rob Pike
4481df645b
fix spelling that is correct but bothers me anyway
...
R=rsc
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=33496
CL=33519
2009-08-19 10:07:31 -07:00
Kai Backman
382a19c3de
pkg/sort compiling and some progress on syscall. mostly
...
re-enabling and massaging code.
R=rsc
APPROVED=rsc
DELTA=2496 (1880 added, 330 deleted, 286 changed)
OCL=33487
CL=33504
2009-08-18 19:20:33 -07:00
David Symonds
6c7e90e7ec
container/list: Add InsertBefore and InsertAfter methods.
...
R=rsc
APPROVED=rsc
DELTA=84 (68 added, 4 deleted, 12 changed)
OCL=33493
CL=33499
2009-08-18 17:49:44 -07:00
Austin Clements
b3062f176d
Add a standard Seeker interface.
...
R=rsc
APPROVED=rsc
DELTA=35 (30 added, 4 deleted, 1 changed)
OCL=33491
CL=33498
2009-08-18 17:47:03 -07:00
Robert Griesemer
116b52d276
- fix performance bug (makeN always allocated a new vector)
...
- removed defs.go (moved declarations into arith.go where they belong)
R=r
DELTA=40 (16 added, 20 deleted, 4 changed)
OCL=33464
CL=33464
2009-08-18 11:48:47 -07:00
Robert Griesemer
ac5093fc22
fix 386 build:
...
- implememted empty stubs for 386 assembly routines
- removed assembly code operating on single words (except for one)
- adjusted tests
R=rsc
DELTA=126 (46 added, 67 deleted, 13 changed)
OCL=33461
CL=33461
2009-08-18 10:41:26 -07:00
Robert Griesemer
88742ef0cc
- implemented Multiplication
...
- changed Cmp to return -1, 0, +1
- added corresponding test cases
R=rsc
DELTA=173 (136 added, 3 deleted, 34 changed)
OCL=33431
CL=33459
2009-08-18 10:06:15 -07:00
Bill Neubauer
7f09b0177f
Removing dead tests from chan.c
...
Since pres != nil was already checked and the routine sets *pres to false
and returns, the subsequent tests are unneeded.
R=rsc
APPROVED=rsc
DELTA=4 (0 added, 4 deleted, 0 changed)
OCL=33439
CL=33441
2009-08-17 22:21:48 -07:00
Nigel Tao
0d8ed14528
ZLIB reader for go.
...
R=rsc
APPROVED=rsc
DELTA=204 (204 added, 0 deleted, 0 changed)
OCL=33437
CL=33440
2009-08-17 22:03:13 -07:00
Robert Griesemer
b2eae40103
- updated Makefile, Make.deps
...
R=rsc,r
DELTA=5 (3 added, 0 deleted, 2 changed)
OCL=33413
CL=33417
2009-08-17 15:20:51 -07:00
Robert Griesemer
350a8e1a86
- rename files to match the data types they implement, adusted Makefile
...
- no other changes
R=r
DELTA=1248 (623 added, 623 deleted, 2 changed)
OCL=33371
CL=33371
2009-08-17 10:01:26 -07:00
Robert Griesemer
e5874223ef
snapshot:
...
- renamed Z -> Int
- made Int ops methods on *Int
- "install" assembly routines dynamically
- replace mulVW functions with mulAddVWW
of equivalent performance but symmetric functionality
to divWVW
- implemented scanN
status:
- need mulNN (trivial)
- need division/modulo after which the set of
elementary operations is complete
- to/from string conversion working
R=rsc
DELTA=320 (124 added, 50 deleted, 146 changed)
OCL=33308
CL=33341
2009-08-15 11:43:54 -07:00
Russ Cox
b21425ddee
runtime gc bug.
...
semacquire might move to another m.
R=r
DELTA=5 (2 added, 2 deleted, 1 changed)
OCL=33317
CL=33326
2009-08-14 20:33:20 -07:00
Austin Clements
92e8b121a0
Fix build
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=33294
CL=33294
2009-08-14 14:41:50 -07:00
Austin Clements
84852fe220
Make the runtime correctly decode the symbol table history
...
stacks produced by whole-package compilation.
Fix some off-by-ones in PC/line table parsing. Hopefully.
R=rsc
APPROVED=rsc
DELTA=42 (24 added, 6 deleted, 12 changed)
OCL=33250
CL=33293
2009-08-14 14:36:49 -07:00
Robert Griesemer
db3bf9c674
First cut at a more realistic multi-precision package:
...
- implemented low-level operations on word vectors
- implemented corresponding amd64 assembly routines for word vector operations
- implemented first set of operations on unsigned integers
- implemented first set of operations on signed integers
- implemented systematic test cases for each data type
R=rsc
DELTA=1330 (1330 added, 0 deleted, 0 changed)
OCL=33132
CL=33285
2009-08-14 11:53:27 -07:00
Austin Clements
63810f840f
Account for CALL instructions before looking up the function
...
at PC, to deal with functions that end with a CALL
instruction. Special case known call-by-return functions.
R=rsc
APPROVED=rsc
DELTA=12 (6 added, 6 deleted, 0 changed)
OCL=33255
CL=33279
2009-08-14 11:09:53 -07:00
Robert Griesemer
ce1dd6cce3
- do not accept forward-declarations for structs and interfaces anymore
...
R=r
DELTA=49 (0 added, 14 deleted, 35 changed)
OCL=33272
CL=33272
2009-08-14 09:39:14 -07:00
Austin Clements
dbecfbf86d
Don't try to account for CALL instruction in 0th frame.
...
R=rsc
APPROVED=rsc
DELTA=9 (4 added, 3 deleted, 2 changed)
OCL=33238
CL=33251
2009-08-13 18:10:38 -07:00
Russ Cox
45ce825544
debugging symbols for 8g.
...
backtraces don't work,
but they didn't work when i started either.
R=ken
OCL=33230
CL=33230
2009-08-13 15:45:58 -07:00
Kai Backman
8149a8c666
fix typo
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=33209
CL=33227
2009-08-13 15:14:41 -07:00
Russ Cox
090efde407
makefile fixes; convert runtime to use new makefiles
...
R=r
DELTA=67 (17 added, 29 deleted, 21 changed)
OCL=33215
CL=33219
2009-08-13 14:41:10 -07:00
Rob Pike
f8295fcd0d
rename mkasmh to mkasmh.sh
...
R=rsc
DELTA=204 (153 added, 49 deleted, 2 changed)
OCL=33213
CL=33213
2009-08-13 14:23:35 -07:00
Rob Pike
fd774f1a33
fix test
...
R=gri
DELTA=4 (0 added, 4 deleted, 0 changed)
OCL=33202
CL=33204
2009-08-13 13:33:11 -07:00
Rob Pike
cd32498ba5
change the names to have .sh suffixes.
...
also fix the comments in the generated files.
R=rsc
DELTA=949 (470 added, 465 deleted, 14 changed)
OCL=33197
CL=33201
2009-08-13 13:22:37 -07:00
Rob Pike
02cb81ad31
tests, .proto, .cgo
...
R=rsc
DELTA=38 (21 added, 3 deleted, 14 changed)
OCL=33193
CL=33200
2009-08-13 13:06:48 -07:00
Russ Cox
57a9bd0ee3
change gotype in symbol table from
...
character string to machine address.
not filled in, just carved out.
R=austin
DELTA=77 (11 added, 34 deleted, 32 changed)
OCL=33122
CL=33124
2009-08-12 16:14:53 -07:00
Russ Cox
b5c57fea96
delete forward type declarations
...
R=r
DELTA=163 (1 added, 149 deleted, 13 changed)
OCL=33106
CL=33111
2009-08-12 14:40:47 -07:00
Rob Pike
96a2a2effd
fix linux build for whole package compilation
...
R=rsc
OCL=33103
CL=33103
2009-08-12 13:51:02 -07:00
Russ Cox
a5bf45e389
convert gob to whole-package compilation.
...
had to reorder some init code.
R=r
DELTA=136 (15 added, 110 deleted, 11 changed)
OCL=33071
CL=33102
2009-08-12 13:19:27 -07:00
Russ Cox
b04ac108fd
convert non-low-level non-google pkg code
...
to whole-package compilation.
R=r
OCL=33070
CL=33101
2009-08-12 13:19:17 -07:00
Russ Cox
3b864e4195
convert low-level (used by testing) packages to
...
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
2009-08-12 13:18:37 -07:00
Rob Pike
68e250516c
make a simpler regexp implementation with fewer dependencies and put it inside testing.
...
remove "regexp." from regexp tests.
R=rsc
DELTA=1173 (1152 added, 1 deleted, 20 changed)
OCL=33028
CL=33037
2009-08-11 13:54:47 -07:00
Rob Pike
d08f0067b5
commentary about extern register
...
R=rsc
DELTA=16 (12 added, 0 deleted, 4 changed)
OCL=33030
CL=33035
2009-08-11 13:30:35 -07:00
Robert Griesemer
fed0435257
renamed fast.arith.s to include $GOARCH
...
R=rsc
DELTA=80 (40 added, 40 deleted, 0 changed)
OCL=33024
CL=33027
2009-08-11 11:23:05 -07:00
Russ Cox
0496040bd6
remove unnecessary pkg. references
...
R=r
DELTA=95 (0 added, 0 deleted, 95 changed)
OCL=33012
CL=33012
2009-08-10 22:02:51 -07:00
Robert Griesemer
8db8682453
- factored out 128-bit muladd and div into arith.go
...
- wrote corresponding fast versions in fast.arith.s
- implemented in-place operations for some routines
- updated existing code to be compatible with in-place
routines
These changes allow the pidigits benchmark to run
approx. 30% faster. Enabling the assembly routines
in fast.arith.s will give another approx. 3%.
R=r
DELTA=486 (252 added, 68 deleted, 166 changed)
OCL=32980
CL=33003
2009-08-10 17:29:55 -07:00
Stephen Ma
e4603db393
Add methods AllMatches, AllMatchesString, AllMatchesIter,
...
AllMatchesStringIter, based on sawn and sawzall functions in sawzall.
APPROVED=rsc
DELTA=218 (218 added, 0 deleted, 0 changed)
OCL=32408
CL=32949
2009-08-09 19:30:47 -07:00
David Symonds
ffed3ade19
Regenerate v7.tar with a real V7 tar.
...
Fix octal parsing that it unearthed.
R=rsc
APPROVED=rsc
DELTA=11 (5 added, 0 deleted, 6 changed)
OCL=32924
CL=32945
2009-08-09 15:03:30 -07:00
Robert Griesemer
081bc69cde
- initial version of pidigits.go benchmark
...
- extra bignum.go functionality for pidigits.go
- tuned bignum multiplication
R=r
DELTA=193 (186 added, 0 deleted, 7 changed)
OCL=32852
CL=32856
2009-08-06 18:16:51 -07:00
Robert Griesemer
2b87d95f01
- allow more general type switch syntax
...
- support for reverse printing of AST
(for compiler testing)
- added -reverse flag to gofmt
R=rsc
DELTA=163 (125 added, 11 deleted, 27 changed)
OCL=32808
CL=32853
2009-08-06 17:44:56 -07:00
Rob Pike
7955490de2
add runtime.GOMAXPROCS, allowing a program to, in effect, set $GOMAXPROCS
...
R=rsc
DELTA=29 (28 added, 1 deleted, 0 changed)
OCL=32829
CL=32837
2009-08-06 13:07:05 -07:00
Robert Griesemer
5876cb0e63
- bufio.ReadRune fix for empty reads w/o errors
...
- added testcases
R=rsc
DELTA=61 (56 added, 2 deleted, 3 changed)
OCL=32831
CL=32834
2009-08-06 12:05:16 -07:00
Robert Griesemer
2117ad192d
minor fix
...
R=rsc
DELTA=2 (1 added, 1 deleted, 0 changed)
OCL=32828
CL=32830
2009-08-06 10:53:29 -07:00
Robert Griesemer
a288095813
- FieldByName lookup through anonymous fields
...
- FieldByIndex
- changed StructField.Index type from int -> []int
- adjustments to reflect clients
R=rsc,r
DELTA=336 (263 added, 47 deleted, 26 changed)
OCL=32731
CL=32802
2009-08-05 15:56:44 -07:00
Rob Pike
3355cadf3f
support []byte (more efficient) as well as string in the interfaces.
...
change the names; Match is for []byte and MatchString is for string, etc.
R=rsc
DELTA=195 (155 added, 0 deleted, 40 changed)
OCL=32800
CL=32800
2009-08-05 15:44:45 -07:00
Rob Pike
5a4d431dd1
special case: recognize '[^\n]' and make it as fast as '.'
...
R=rsc
DELTA=25 (23 added, 1 deleted, 1 changed)
OCL=32793
CL=32799
2009-08-05 14:40:34 -07:00
Austin Clements
3776f31144
Make os.RemoveAll return no error if path does not exist.
...
This fixes a problem introduced by CL 32684 into gobuild,
which used to use 'rm -rf' to remove the _obj directory.
R=rsc
APPROVED=rsc
DELTA=8 (4 added, 0 deleted, 4 changed)
OCL=32794
CL=32796
2009-08-05 14:18:54 -07:00
Russ Cox
4dec8ef35a
get function calls out of the way before
...
allocating registers in shift and div.
fix behavior when res == a reserved register.
R=ken
OCL=32765
CL=32767
2009-08-04 19:16:57 -07:00
Rob Pike
2495c14d5c
WriteString
...
R=rsc
DELTA=41 (41 added, 0 deleted, 0 changed)
OCL=32692
CL=32697
2009-08-03 18:28:05 -07:00
Rob Pike
cb9c973829
don't crash printing a nil map
...
R=rsc
DELTA=19 (18 added, 0 deleted, 1 changed)
OCL=32656
CL=32670
2009-08-03 13:34:20 -07:00
Robert Griesemer
178089056e
printer.go:
...
- emit line tag id's in html mode
- support for general html tags
- better names for a few identifiers
godoc.go:
- emit links from exported names to source code
(actual placement needs fine-tuning)
R=rsc
DELTA=108 (68 added, 4 deleted, 36 changed)
OCL=32639
CL=32654
2009-08-03 09:53:00 -07:00
Robert Griesemer
22ec539920
fix long-standing bug in doc reader:
...
- replace forward-declared types with complete
declaration when it is found
R=rsc
DELTA=23 (15 added, 0 deleted, 8 changed)
OCL=32618
CL=32618
2009-07-31 18:40:11 -07:00
Robert Griesemer
62718fb5d4
printer:
...
- prepare for generation of HTML id tags and links
- do HTML-escaping in central print routine
- move tabwriter setup into printer
- fixed various TODOs
godoc:
- removed tabwriter setup, need for various HTML-escaping
R=rsc
DELTA=210 (107 added, 36 deleted, 67 changed)
OCL=32612
CL=32616
2009-07-31 18:04:53 -07:00
Rob Pike
9f2f8eadb6
add test of invariant in findVar
...
R=rsc
DELTA=23 (23 added, 0 deleted, 0 changed)
OCL=32592
CL=32595
2009-07-31 12:52:03 -07:00
Rob Pike
783986c64b
delete unused arg to empty.
...
add commentary about findVar's invariant.
R=rsc
DELTA=6 (3 added, 0 deleted, 3 changed)
OCL=32583
CL=32594
2009-07-31 12:42:29 -07:00
Rob Pike
318b67cb73
make %v and %p consistent
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=32591
CL=32593
2009-07-31 12:42:21 -07:00
Robert Griesemer
9299ae461d
- don't call String method of AST nodes when converting them to text
...
- make token.Position.String more robust
TBR=rsc
DELTA=20 (10 added, 6 deleted, 4 changed)
OCL=32564
CL=32564
2009-07-30 19:39:47 -07:00
Robert Griesemer
c670dc450b
bug fix
...
R=rsc
OCL=32563
CL=32563
2009-07-30 19:29:31 -07:00
Rob Pike
d9c914e985
dotted names
...
R=rsc
DELTA=28 (19 added, 0 deleted, 9 changed)
OCL=32550
CL=32554
2009-07-30 18:17:07 -07:00
Robert Griesemer
90e6656c51
go/ast/filter.go:
...
- more orthogonal functionality of filter functions for better re-use
go/doc/doc.go:
- simplified interface
- collect filenames of packages so that they can be shown
godoc:
- removed TODO, show list of package (linked) files used to create documentation
R=rsc
DELTA=130 (68 added, 24 deleted, 38 changed)
OCL=32549
CL=32552
2009-07-30 18:13:55 -07:00
Austin Clements
9717a794f4
String method for token.Position. Extracted from gri's tree.
...
R=gri
APPROVED=gri
DELTA=33 (20 added, 6 deleted, 7 changed)
OCL=32544
CL=32546
2009-07-30 16:58:19 -07:00
Rob Pike
07a497fee0
fix a long-standing typo
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=32540
CL=32545
2009-07-30 16:57:46 -07:00
Rob Pike
98607d01fc
handle unsupported types safely.
...
R=rsc
DELTA=154 (71 added, 6 deleted, 77 changed)
OCL=32483
CL=32492
2009-07-29 17:24:25 -07:00
Robert Griesemer
312bd7a1fc
parser:
...
- Changed filter function for parser.ParsePackage to
take an *os.Dir instead of a filename for more
powerful filters
- Removed TODO in ast.PackageInterface: Now collect
package comments from all package files
- Cleanups in godoc: Use the new ParsePackage and
PackageInterface functions; as a result computing
package information is much simpler now.
R=rsc
DELTA=285 (80 added, 110 deleted, 95 changed)
OCL=32473
CL=32486
2009-07-29 17:01:09 -07:00
Robert Griesemer
f9057c7b59
break tabwriter columns when starting a new block of indented statements
...
R=r
DELTA=16 (15 added, 0 deleted, 1 changed)
OCL=32475
CL=32481
2009-07-29 16:23:17 -07:00
Rob Pike
43c7fc04b8
fix typo
...
R=rsc
OCL=32472
CL=32472
2009-07-29 15:33:12 -07:00
Rob Pike
1fc0960fb4
clean up EOF
...
R=rsc
DELTA=5 (0 added, 1 deleted, 4 changed)
OCL=32465
CL=32467
2009-07-29 15:24:42 -07:00
Rob Pike
1f6e18fdce
handle some error conditions involving bad data.
...
R=rsc
DELTA=32 (24 added, 1 deleted, 7 changed)
OCL=32461
CL=32463
2009-07-29 15:10:29 -07:00
Rob Pike
75e0569b99
statistics HTML page for rpc
...
R=rsc
DELTA=121 (115 added, 0 deleted, 6 changed)
OCL=32427
CL=32429
2009-07-29 13:26:49 -07:00
Russ Cox
9346c6d901
make every func literal expression allocate,
...
so that == on func means that the
functions originated in the same
execution of a func literal or definition.
before, there was an inconsistency:
func() {x++} != func() {x++}
but
func() {} == func() {}
this CL makes the second case != too,
just like
make(map[int]int) != make(map[int]int)
R=r
DELTA=202 (71 added, 62 deleted, 69 changed)
OCL=32393
CL=32398
2009-07-28 20:01:00 -07:00
David Symonds
83940d7c4a
Add a unique list ID to list elements, and verify it as necessary.
...
This makes the list closed under its provided operations.
R=rsc,gri
APPROVED=rsc
DELTA=18 (14 added, 0 deleted, 4 changed)
OCL=32388
CL=32395
2009-07-28 18:19:16 -07:00
Robert Griesemer
40a66ef59e
missed changes to Makefiles for container/ring
...
R=rsc
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=32389
CL=32392
2009-07-28 17:52:30 -07:00
Rob Pike
b85147cd70
change the encoding of uints to simplify overflow checking and to make them
...
easier and faster to read. they are now either a one-byte value or a n-byte value
preceded by a byte holding -n.
R=rsc
DELTA=150 (45 added, 7 deleted, 98 changed)
OCL=32381
CL=32387
2009-07-28 17:20:19 -07:00
Russ Cox
123ff2ebb8
bug177: anonymous struct fields in reflect
...
(reported by iant)
R=r
DELTA=50 (32 added, 12 deleted, 6 changed)
OCL=32263
CL=32385
2009-07-28 17:01:46 -07:00
Robert Griesemer
2210a643b7
Intersperse comments nicely when printing an AST.
...
gofmt formatted source code looks pretty good already;
with a bit more fine-tuning it should be great.
printer.go:
- Implemented comment intersperse algorithm.
The approach is a result of many trial-and-error
experiments but at this point reasonably simple
and open to arbitrary fine-tuning.
parser.go:
- Simplified handling of lead and line comments
(formerly called leading and trailing comments).
- Use a comments list instead of an array (I may
change this back - this is not obviously better
and uses more space).
doc.go:
- Remove comments from AST nodes that have been
'consumed' in the documentation to avoid duplicate
printing of them. Allows for better control of
what is printed w/o use of printing control flags
(which are hard to use and not fine-grained enough).
Corresponding adjustments to various clients of these
files.
R=rsc
DELTA=478 (275 added, 108 deleted, 95 changed)
OCL=32185
CL=32380
2009-07-28 16:38:59 -07:00
Robert Griesemer
d27bae5033
Fixed typos in comments.
...
TBR=rsc
OCL=32330
CL=32330
2009-07-28 15:03:05 -07:00
Robert Griesemer
6d3d25de21
Ring ADT.
...
- Provides analogous functionality to a doubly-linked list
implementation.
- Completely symmetric set of operations.
- Operations on the ADT do not lead to results that are
outside the domain of the ADT (closed interface).
- Alternative to container/list.
R=rsc
DELTA=489 (489 added, 0 deleted, 0 changed)
OCL=32284
CL=32323
2009-07-28 14:54:49 -07:00
Russ Cox
e50d3ba7e4
floating-point limits and equations
...
R=r
DELTA=13 (8 added, 2 deleted, 3 changed)
OCL=32291
CL=32322
2009-07-28 14:50:50 -07:00
Rob Pike
483e4fc409
- clean up code creating keys for type maps
...
- derive int, uint, float, uintptr decoders based on their size
- add overflow checks in decode
R=rsc
DELTA=407 (281 added, 44 deleted, 82 changed)
OCL=32286
CL=32290
2009-07-28 12:59:39 -07:00
Rob Pike
08b5b4843b
constants for integer limits
...
R=rsc
DELTA=16 (16 added, 0 deleted, 0 changed)
OCL=32288
CL=32288
2009-07-28 12:57:33 -07:00
Rob Pike
326de9ca97
constants for floating point limits
...
R=rsc
DELTA=5 (5 added, 0 deleted, 0 changed)
OCL=32283
CL=32287
2009-07-28 11:53:16 -07:00
Rob Pike
5b1d52e81d
document rpc.
...
R=rsc
DELTA=160 (124 added, 0 deleted, 36 changed)
OCL=32233
CL=32256
2009-07-27 17:25:41 -07:00
Ivan Krasin
b388d84013
Fixed a small bug with compress/flate/Inflater. It incorrectly checked
...
the size of chunk with uncompressed data (00 is terms of DEFLATE).
APPROVED=rsc
DELTA=15 (14 added, 0 deleted, 1 changed)
OCL=32105
CL=32238
2009-07-27 14:33:21 -07:00
Russ Cox
7729c3f955
fix gc bug causing make smoketest to die in cmd/gofmt.
...
saving of sp was too far away from use in scanstack;
the stack had changed since the sp was saved.
R=r
DELTA=9 (4 added, 2 deleted, 3 changed)
OCL=32232
CL=32237
2009-07-27 14:16:28 -07:00
Russ Cox
ca01716934
fix build - broke with uint32 -> int change in reflect SliceHeader
...
TBR=r
OCL=32225
CL=32225
2009-07-27 11:23:49 -07:00
Rob Pike
5aa174557a
clean up for public use: make some stuff private, add doc comments.
...
R=rsc
DELTA=298 (202 added, 0 deleted, 96 changed)
OCL=32006
CL=32224
2009-07-27 11:02:06 -07:00
Russ Cox
3ff5e727e2
fix bug in CL 30057: missed if+continue in one place.
...
R=gri
DELTA=2 (2 added, 0 deleted, 0 changed)
OCL=32214
CL=32223
2009-07-27 10:59:59 -07:00
Russ Cox
22ea3f9e49
fix SliceHeader: len and cap are int, not uint32
...
R=r,iant
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=32215
CL=32222
2009-07-27 10:59:37 -07:00
David Symonds
a225706e5f
container/list: Add Len() method to List.
...
R=r
APPROVED=gri
DELTA=23 (23 added, 0 deleted, 0 changed)
OCL=32106
CL=32189
2009-07-25 17:18:05 -07:00
Ian Lance Taylor
b64b75daa7
If we can't parse the package, call Fatalf so that the test
...
fails without crashing.
R=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=32164
CL=32171
2009-07-24 13:07:12 -07:00
Russ Cox
052a66babd
runtime: fix init scheduling bug.
...
if there is a goroutine waiting to run
and the init goroutine enters a system call,
entersyscall was trying to kick off a new
scheduler for the other goroutine, causing
a panic (new goroutines can't run until main.main).
R=r
DELTA=32 (32 added, 0 deleted, 0 changed)
OCL=31982
CL=31982
2009-07-21 19:43:27 -07:00
Robert Griesemer
ff790f4704
adjust comment for better godoc output
...
R=rsc
DELTA=3 (0 added, 0 deleted, 3 changed)
OCL=31944
CL=31950
2009-07-21 15:09:59 -07:00
Robert Griesemer
e62dd7bce9
- split bignum package into 3 files
...
- use array for common small values
- integer.go, rational.go don't contain changes besides the added file header
R=rsc
DELTA=1475 (748 added, 713 deleted, 14 changed)
OCL=31939
CL=31942
2009-07-21 14:28:59 -07:00
Ian Lance Taylor
f0c00f7eee
Don't cast nil to a fixed array type.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31916
CL=31937
2009-07-21 14:06:14 -07:00
Robert Griesemer
2b1ec70d0f
implemented outstanding bit ops on negative integerts
...
R=rsc
DELTA=195 (146 added, 1 deleted, 48 changed)
OCL=31895
CL=31931
2009-07-21 13:35:51 -07:00
Ian Lance Taylor
39808db15a
Make struct field names unique.
...
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=31900
CL=31900
2009-07-20 23:26:03 -07:00
Austin Clements
fb65906367
Fix typo. MUL_ASSIGN is "*=", not "+=".
...
R=gri
APPROVED=gri
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31879
CL=31886
2009-07-20 16:14:48 -07:00
Robert Griesemer
9e2fa390da
- bignum.AndNot
...
- corresponding test cases
- some cleanups
R=rsc
DELTA=173 (68 added, 3 deleted, 102 changed)
OCL=31866
CL=31869
2009-07-20 13:37:28 -07:00
Robert Griesemer
821897bc96
- better documentation
...
- code cleanup
R=rsc,austin
DELTA=28 (12 added, 2 deleted, 14 changed)
OCL=31808
CL=31810
2009-07-17 16:22:55 -07:00
Austin Clements
25b4be5a55
Support exponential notation in RatFromString.
...
R=gri
APPROVED=gri
DELTA=30 (25 added, 0 deleted, 5 changed)
OCL=31796
CL=31799
2009-07-17 15:09:43 -07:00
Austin Clements
f95a42e6ba
Produce friendlier errors messages for malformed character
...
literals and when the parser hits an unexpected EOF. Also,
disallow newlines in character literals.
R=gri
APPROVED=gri
DELTA=23 (15 added, 1 deleted, 7 changed)
OCL=31790
CL=31797
2009-07-17 14:58:02 -07:00
Rob Pike
ba0cf083a2
change reflect.Type.Name() into two functions: Name() and PkgPath() for ease of use.
...
R=rsc
DELTA=31 (8 added, 2 deleted, 21 changed)
OCL=31778
CL=31792
2009-07-17 14:20:33 -07:00
Rob Pike
cb0a02f028
ignore missing structs
...
R=rsc
DELTA=113 (74 added, 14 deleted, 25 changed)
OCL=31776
CL=31776
2009-07-17 11:38:31 -07:00
Russ Cox
e52e9ca82e
another step toward eliminating forward declarations.
...
introduce NodeList* type in compiler to replace OLIST.
this clarifies where lists can and cannot occur.
list append and concatenation are now cheap.
the _r rules are gone from yacc.
rev and unrev are gone.
no more lists of lists.
the representation of assignments is a bit clunkier.
split into OAS (1=1) and OAS2 (2 or more on one side).
delete dead chanrecv3 code.
delay construction of func types.
R=ken
OCL=31745
CL=31762
2009-07-17 01:00:44 -07:00
Rob Pike
9b475bd2a4
fix up prints in flag.go
...
R=rsc
DELTA=11 (0 added, 0 deleted, 11 changed)
OCL=31760
CL=31760
2009-07-16 23:14:33 -07:00
Rob Pike
be2cf952a8
clean up the code, flow errors out to decoder.
...
R=rsc
DELTA=99 (32 added, 22 deleted, 45 changed)
OCL=31759
CL=31759
2009-07-16 23:01:10 -07:00
Rob Pike
1737157189
use FieldByName where possible.
...
R=rsc
DELTA=20 (0 added, 12 deleted, 8 changed)
OCL=31758
CL=31758
2009-07-16 21:24:30 -07:00
Rob Pike
a93c5c8550
add FieldByName to the interface of reflect.StructType
...
R=rsc
DELTA=34 (33 added, 0 deleted, 1 changed)
OCL=31752
CL=31754
2009-07-16 18:21:14 -07:00
Rob Pike
1399badb02
- allow wire type and receive type to differ.
...
- still TODO: ignoring struct fields.
R=rsc
DELTA=309 (240 added, 2 deleted, 67 changed)
OCL=31750
CL=31750
2009-07-16 17:55:16 -07:00
Robert Griesemer
f3ffd93a61
ast:
...
- renamed Program -> SourceFile
- added Package node representing the AST for an entire package
- added filter function to create a source file mimicking the
interface of an entire package
parser:
- parser entry to parse entire packages
- unified naming of parser entry points
- factored out entry points into new file (interface.go)
gofmt:
- extended to accept single .go files, and package paths:
gofmt file.go // formatting of a single file
gofmt -x file.go // interface of a single file
gofmt -x ./MyPackage // interface of a local package
gofmt -x math // interface of a $GOROOT relative package
Various adjustments in dependent files, documentation.
R=rsc
DELTA=634 (369 added, 153 deleted, 112 changed)
OCL=31743
CL=31748
2009-07-16 17:11:18 -07:00
Rob Pike
b75df2f695
fix some bad testing prints
...
R=rsc
DELTA=5 (0 added, 0 deleted, 5 changed)
OCL=31740
CL=31742
2009-07-16 15:01:21 -07:00
Rob Pike
04ae91cf71
clean up the decode loop and fix a couple of bad prints
...
R=rsc
DELTA=15 (8 added, 2 deleted, 5 changed)
OCL=31738
CL=31738
2009-07-16 13:05:46 -07:00
David Symonds
13960ae8ae
exvar: new Timer var type.
...
R=rsc
APPROVED=r
DELTA=146 (142 added, 0 deleted, 4 changed)
OCL=31654
CL=31716
2009-07-15 23:24:27 -07:00
Rob Pike
a9be3f46c6
add rpc to the build
...
R=rsc
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=31693
CL=31714
2009-07-15 21:28:45 -07:00
Rob Pike
7d94cfdfb9
/usr/local/bin might not exist so use /usr/bin in the chdir test.
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31708
CL=31713
2009-07-15 21:28:08 -07:00
Rob Pike
3fc7cfd55f
improve server handling of errors now that Decoder grabs full message.
...
R=rsc
DELTA=23 (4 added, 7 deleted, 12 changed)
OCL=31701
CL=31703
2009-07-15 16:11:14 -07:00
Rob Pike
e76a335ada
make the low-level encoder and decoder private and have them access byte.Buffers rather
...
than io.Readers and io.Writers.
change the Encoder/Decoder protocol so that each message is preceded by its length in bytes.
R=rsc
DELTA=468 (119 added, 23 deleted, 326 changed)
OCL=31700
CL=31702
2009-07-15 16:10:17 -07:00
Rob Pike
dc8c447689
post-submit tweaks to previous cl
...
R=rsc
DELTA=5 (4 added, 1 deleted, 0 changed)
OCL=31690
CL=31692
2009-07-15 12:38:50 -07:00
Rob Pike
8071cdf724
handle errors better:
...
1) terminate outstanding calls on the client when we see EOF from server
2) allow data to drain on server before closing the connection
R=rsc
DELTA=41 (23 added, 4 deleted, 14 changed)
OCL=31687
CL=31689
2009-07-15 11:47:29 -07:00
Russ Cox
aa1e8064b2
change HTTP access for RPC.
...
1. use CONNECT instead of GET.
CONNECT has exactly the meaning
we want; most of the time people
connect to ip:port; we're connecting
to /_goRPC_
2. wait for a successful HTTP response
before assuming we are connected to
the RPC protocol. this allows better
error reporting and also keeps the
protocol alternating between speakers,
so that the buffering in the HTTP request
reader cannot accidentally eat some
RPC bytes too.
gotest sometimes hangs, but not in HTTP.
gotest -match=Unknown hangs every few runs
even in a clean client.
R=r
DELTA=117 (57 added, 44 deleted, 16 changed)
OCL=31656
CL=31685
2009-07-15 10:49:47 -07:00
Robert Griesemer
3d486d0d26
- do not collect BUG comments w/o bug description
...
R=rsc
DELTA=17 (8 added, 0 deleted, 9 changed)
OCL=31670
CL=31674
2009-07-15 10:12:57 -07:00
Austin Clements
8d8245623f
Add a dummy WaitStatus.TrapCause for Darwin to unbreak the build.
...
R=gri
APPROVED=gri
DELTA=5 (5 added, 0 deleted, 0 changed)
OCL=31673
CL=31673
2009-07-15 10:12:06 -07:00
Austin Clements
d0e29f2852
Pretty printer for os.Waitmsg
...
R=rsc
APPROVED=rsc
DELTA=49 (49 added, 0 deleted, 0 changed)
OCL=31568
CL=31671
2009-07-15 09:58:42 -07:00
Rob Pike
964b6cf352
add HTTP support
...
R=rsc
DELTA=159 (110 added, 29 deleted, 20 changed)
OCL=31646
CL=31652
2009-07-14 20:47:39 -07:00
Austin Clements
b6e6663946
Return ptrace event message when there's no error instead of
...
only when there's an error.
R=rsc
APPROVED=rsc
DELTA=3 (0 added, 2 deleted, 1 changed)
OCL=31650
CL=31650
2009-07-14 18:05:29 -07:00
Rob Pike
ba9d697336
allow user to override the Usage function
...
R=gri
DELTA=15 (6 added, 5 deleted, 4 changed)
OCL=31649
CL=31649
2009-07-14 17:44:20 -07:00
Robert Griesemer
eb815c0fa2
fixed typo
...
TBR=r
OCL=31647
CL=31647
2009-07-14 17:08:09 -07:00
Robert Griesemer
4fb8f44ea7
- interface and comments cleanup
...
R=rsc
DELTA=33 (1 added, 3 deleted, 29 changed)
OCL=31620
CL=31642
2009-07-14 16:30:20 -07:00
Russ Cox
f752e909dc
darwin ptrace constants
...
R=austin
DELTA=42 (37 added, 5 deleted, 0 changed)
OCL=31618
CL=31633
2009-07-14 15:29:29 -07:00
Austin Clements
14bb806cb4
Support ptracing of fork'd children.
...
R=rsc
APPROVED=rsc
DELTA=26 (22 added, 1 deleted, 3 changed)
OCL=31613
CL=31629
2009-07-14 15:09:39 -07:00
Austin Clements
40f406afc4
Zero unused syscall arguments.
...
R=rsc
APPROVED=rsc
DELTA=12 (12 added, 0 deleted, 0 changed)
OCL=31619
CL=31621
2009-07-14 13:59:54 -07:00
Rob Pike
b07af158a4
improve rpc code. more robust. more tests.
...
R=rsc
DELTA=186 (133 added, 20 deleted, 33 changed)
OCL=31611
CL=31616
2009-07-14 13:23:14 -07:00
Austin Clements
bc2fda9c89
Regenerate Linux 386 syscall bindings to add ptrace.
...
R=rsc
APPROVED=rsc
DELTA=82 (80 added, 2 deleted, 0 changed)
OCL=31610
CL=31612
2009-07-14 11:59:19 -07:00
Austin Clements
9df528740a
Syscall wrappers for ptrace and supporting wait-related flags.
...
R=rsc
APPROVED=rsc
DELTA=311 (308 added, 3 deleted, 0 changed)
OCL=31569
CL=31606
2009-07-14 10:53:04 -07:00
Robert Griesemer
e48d8fe091
update remaining files to match new scanner/parser interface
...
and use shared error handling infrastructure
R=rsc
DELTA=109 (3 added, 86 deleted, 20 changed)
OCL=31600
CL=31605
2009-07-14 10:46:18 -07:00
Robert Griesemer
5945b25158
- adjust to new token.Position definition
...
R=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31574
CL=31604
2009-07-14 10:45:57 -07:00
Robert Griesemer
2d58fa6f18
- use new scanner error handling code
...
R=rsc
DELTA=109 (0 added, 87 deleted, 22 changed)
OCL=31573
CL=31603
2009-07-14 10:45:43 -07:00
Robert Griesemer
a010d45caa
- adjust to new scanner interface (pass filename to Init)
...
- delete error handling code which is not needed anymore
R=rsc
DELTA=83 (0 added, 65 deleted, 18 changed)
OCL=31572
CL=31602
2009-07-14 10:45:22 -07:00
Robert Griesemer
14228f3898
- added Filename field to token.Position
...
- handle //line filename:line comments in scanner
- moved error handling code used by various scanner clients
to errors.go
- added extra tests
R=rsc
DELTA=385 (343 added, 18 deleted, 24 changed)
OCL=31551
CL=31601
2009-07-14 10:44:57 -07:00
Austin Clements
ffb4b0d7b7
Avoid clash between os.WRUSAGE and Linux's WALL flag.
...
R=rsc
APPROVED=rsc
DELTA=5 (4 added, 0 deleted, 1 changed)
OCL=31564
CL=31567
2009-07-13 19:28:00 -07:00
Austin Clements
da1da8d07e
Add accessor for SIGTRAP cause in wait status
...
R=rsc
APPROVED=rsc
DELTA=7 (7 added, 0 deleted, 0 changed)
OCL=31563
CL=31565
2009-07-13 19:20:38 -07:00
Russ Cox
218c393029
add LockOSThread and UnlockOSThread to
...
runtime package for use by debugger,
which needs to make sure that all ptrace calls
about a given pid come from the same thread.
R=r
DELTA=175 (90 added, 63 deleted, 22 changed)
OCL=31546
CL=31558
2009-07-13 17:28:39 -07:00
Rob Pike
9126b75e35
rpc.
...
client library.
muxes on both ends.
R=rsc
DELTA=178 (132 added, 26 deleted, 20 changed)
OCL=31541
CL=31556
2009-07-13 16:52:57 -07:00
Russ Cox
8afc6008a8
add note about once and closures
...
R=r
DELTA=13 (13 added, 0 deleted, 0 changed)
OCL=31535
CL=31549
2009-07-13 15:54:41 -07:00
Robert Griesemer
32cd887574
- handle type forward declarations correctly
...
R=r
DELTA=8 (6 added, 0 deleted, 2 changed)
OCL=31537
CL=31537
2009-07-13 13:55:39 -07:00
Rob Pike
efb918b7db
the beginnings of an rpc service.
...
server side only; no client help yet (but it's easy).
no http yet.
service is synchronous.
all this will improve.
R=rsc
DELTA=403 (403 added, 0 deleted, 0 changed)
OCL=31522
CL=31536
2009-07-13 12:58:14 -07:00
Rob Pike
b2a66adc59
the name of the type was being sent twice. drop the outer instance.
...
R=rsc
DELTA=10 (5 added, 1 deleted, 4 changed)
OCL=31523
CL=31526
2009-07-13 11:41:02 -07:00
Robert Griesemer
ef4347f19e
Basic EBNF package:
...
- parsing of EBNF grammars
- basic consistency checks
R=rsc
DELTA=695 (695 added, 0 deleted, 0 changed)
OCL=31479
CL=31516
2009-07-13 10:10:56 -07:00
Kai Backman
7842b03f70
Fixed minor typo in asm file.
...
R=rsc
APPROVED=rsc
DELTA=1 (0 added, 0 deleted, 1 changed)
OCL=31487
CL=31500
2009-07-12 22:12:19 -07:00
Rob Pike
62011cfcdf
first cut at gob decoder.
...
R=rsc
DELTA=184 (181 added, 1 deleted, 2 changed)
OCL=31474
CL=31486
2009-07-11 15:45:54 -07:00
Russ Cox
92e925778e
reflection for interface set
...
rename map access methods to Elem, SetElem.
R=r
DELTA=95 (66 added, 7 deleted, 22 changed)
OCL=31456
CL=31469
2009-07-10 16:32:26 -07:00
Rob Pike
8a9e395f5f
one more piece of testing: 2nd send should not send type info.
...
R=rsc
DELTA=25 (25 added, 0 deleted, 0 changed)
OCL=31460
CL=31460
2009-07-10 13:50:44 -07:00
Rob Pike
f0a9840d04
a better encoder test, with a couple of fixes for bugs it uncovered.
...
R=rsc
DELTA=84 (65 added, 9 deleted, 10 changed)
OCL=31458
CL=31458
2009-07-10 13:44:37 -07:00
Rob Pike
1880b90aff
DeepEqual for maps
...
R=rsc
DELTA=47 (30 added, 16 deleted, 1 changed)
OCL=31455
CL=31455
2009-07-10 11:20:10 -07:00
Robert Griesemer
a47404bc1c
fix error messages
...
R=rsc
DELTA=2 (0 added, 0 deleted, 2 changed)
OCL=31449
CL=31451
2009-07-10 10:00:25 -07:00
Rob Pike
3928a4e11b
printing maps
...
R=rsc
DELTA=57 (39 added, 3 deleted, 15 changed)
OCL=31424
CL=31430
2009-07-09 17:30:07 -07:00
Russ Cox
12ebbe7463
reflection for methods
...
R=r
DELTA=156 (135 added, 8 deleted, 13 changed)
OCL=31407
CL=31428
2009-07-09 17:27:49 -07:00
Robert Griesemer
f7b92bb45d
fix to scanner_test after change to //-style comment token
...
R=rsc
OCL=31421
CL=31421
2009-07-09 16:54:08 -07:00
Robert Griesemer
38e7fddc21
Show BUG comments in godoc:
...
ast.go:
- rename Comments -> CommentGroup (less confusion)
- change all comments/docs to be *CommentGroup
filter.go:
- do not remove unassociated comments from program as part
of export filtering (they are needed by doc.go for BUG comments)
scanner.go:
- exclude '\n' from //-style comments
parser.go:
- rewrote collection of comments: now all collected comments
are *ast.CommentGroups
- clarified distinction between leading and trailing comments
- fixed a bug in comment collection (parseGenDecl);
corresponding test case is in printer/testdata
- extra documentation
doc.go:
- collect BUG comments
- corresponding fix for parser bug in comment collection
comment.go:
- simplified regex
printer.go:
- adjust comment printing to new representation
printer_test.go, testdata/*:
- enable printing of doc comments
- extended tests
package.html, package.txt:
- added Bugs section
gofmt:
- enable printing of doc comments
R=rsc
DELTA=339 (126 added, 38 deleted, 175 changed)
OCL=31403
CL=31416
2009-07-09 16:38:17 -07:00
Rob Pike
ec23467e65
store ids rather than Types in the structs so they can be encoded.
...
change Type to gobType.
fix some bugs around recursive structures.
lots of cleanup.
add the first cut at a type encoder.
R=rsc
DELTA=400 (287 added, 11 deleted, 102 changed)
OCL=31401
CL=31406
2009-07-09 14:33:43 -07:00
David Symonds
600d7828a7
archive/tar cleanups:
...
- rename untar{,_test}.go to reader{,_test}.go.
- fix up some comments.
- improve test output if it fails.
R=rsc
APPROVED=rsc
DELTA=821 (400 added, 392 deleted, 29 changed)
OCL=31376
CL=31378
2009-07-08 18:31:14 -07:00
Russ Cox
bba278a43b
reflection for functions
...
add channel send type check (thanks austin).
fix type mismatch message.
R=r
DELTA=241 (225 added, 5 deleted, 11 changed)
OCL=31370
CL=31375
2009-07-08 18:16:09 -07:00
David Symonds
d6d0a39050
Basic POSIX-compatible tar writer.
...
R=rsc
APPROVED=rsc
DELTA=456 (382 added, 66 deleted, 8 changed)
OCL=31246
CL=31372
2009-07-08 17:15:18 -07:00
Russ Cox
5ddaf9a098
reflection for channels
...
R=r
DELTA=188 (171 added, 6 deleted, 11 changed)
OCL=31352
CL=31361
2009-07-08 15:00:54 -07:00
Robert Griesemer
2ad7958b7e
- update functionality for printer test
...
- moved test files from data to testdata
- use tabs instead of spaces for layout
R=rsc
DELTA=129 (67 added, 60 deleted, 2 changed)
OCL=31353
CL=31360
2009-07-08 14:57:51 -07:00
Robert Griesemer
e7af3b8e05
comment change
...
R=r
OCL=31359
CL=31359
2009-07-08 14:56:20 -07:00
Robert Griesemer
ff9e657fb3
WriteFile util function
...
R=rsc
DELTA=41 (41 added, 0 deleted, 0 changed)
OCL=31349
CL=31358
2009-07-08 14:48:09 -07:00
Russ Cox
764b6ec1aa
reflection for maps
...
R=r
DELTA=304 (248 added, 34 deleted, 22 changed)
OCL=31345
CL=31347
2009-07-08 13:55:57 -07:00
Rob Pike
0ae7882b5c
bug fix: encOpFor etc. need to indirect
...
R=rsc
DELTA=28 (7 added, 7 deleted, 14 changed)
OCL=31312
CL=31322
2009-07-07 21:05:24 -07:00
Robert Griesemer
d7f1f53e86
printer_test: first cut
...
R=rsc
DELTA=169 (168 added, 0 deleted, 1 changed)
OCL=31319
CL=31321
2009-07-07 18:09:26 -07:00
Robert Griesemer
9809d73868
- print comments associated with declarations
...
- fix a bug w/ optional semicolons
R=rsc
DELTA=46 (24 added, 0 deleted, 22 changed)
OCL=31306
CL=31311
2009-07-07 16:07:34 -07:00
Austin Clements
17bc836127
Add entry points for parsing statements and expressions.
...
R=gri
APPROVED=gri
DELTA=73 (48 added, 0 deleted, 25 changed)
OCL=31302
CL=31308
2009-07-07 15:47:01 -07:00
Ian Lance Taylor
668fa7f677
Update the unsafe docs for the new type implementation.
...
Please correct as needed.
R=rsc,r
DELTA=10 (4 added, 1 deleted, 5 changed)
OCL=31305
CL=31305
2009-07-07 15:06:29 -07:00
Ian Lance Taylor
dbc6d91d70
typestring.c is no longer needed.
...
R=rsc
DELTA=35 (0 added, 34 deleted, 1 changed)
OCL=31301
CL=31303
2009-07-07 14:50:39 -07:00
Robert Griesemer
61824ff3a4
- ast.FilterExports: filter non-exported anonymous fields
...
- fixed typo in parser.go
- removed test w/ syntax errors from gofmt test script
R=rsc
DELTA=25 (21 added, 0 deleted, 4 changed)
OCL=31296
CL=31298
2009-07-07 12:02:54 -07:00
Russ Cox
877839333e
gob: use new reflect
...
R=r
DELTA=242 (68 added, 69 deleted, 105 changed)
OCL=31239
CL=31289
2009-07-07 11:04:42 -07:00
Russ Cox
e37f81b49c
template: use new reflect interface (CL 31107)
...
R=r
DELTA=16 (3 added, 1 deleted, 12 changed)
OCL=31121
CL=31288
2009-07-07 11:04:34 -07:00