Robert Griesemer [Tue, 3 Nov 2009 04:55:40 +0000 (20:55 -0800)]
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.
Russ Cox [Tue, 3 Nov 2009 02:37:30 +0000 (18:37 -0800)]
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.
Ian Lance Taylor [Mon, 2 Nov 2009 21:17:12 +0000 (13:17 -0800)]
Set LANG to control sorting. This affects the order in which
tests are processed, and thus the run.out output. The default
LANG on Fedora 10, en_US.utf8, causes the tests to be sorted
differently--e.g., arrayindex1.go and arrayindex.go are sorted
in the opposite order.
Adam Langley [Mon, 2 Nov 2009 20:02:16 +0000 (12:02 -0800)]
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.
Robert Griesemer [Mon, 2 Nov 2009 17:25:39 +0000 (09:25 -0800)]
- initial steps towards showing directory tree instead of
just a single directory
- all pieces present but not well integrated
- directory tree served at the moment under /tree
Robert Griesemer [Mon, 2 Nov 2009 17:18:02 +0000 (09:18 -0800)]
- collect line comments for methods in interfaces
(previously not shown in godoc)
- simplify parsing of struct types (match code structure for parsing interface types)
Robert Griesemer [Sun, 1 Nov 2009 23:27:10 +0000 (15:27 -0800)]
enable all (but one) test cases in test.sh that
were excluded before because of incorrect comment
formatting (comment formatting is mostly idempotent
at this point)
Russ Cox [Sun, 1 Nov 2009 19:13:27 +0000 (11:13 -0800)]
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
Russ Cox [Sun, 1 Nov 2009 13:49:35 +0000 (05:49 -0800)]
code review fixes
* clean up error handling: show Exception info
* white space fixes
* clean up output when creating CL
* simplify hg change command; add hg file
* fix stale cookie bug (thanks iant)
* in LoadAllCL, load each CL in a different thread,
to parallelize the slow web fetches
* throw away support for Mercurial before version 1.3
* add @CL-number file pattern for commands like diff
* make hg sync show files being sync'ed
Russ Cox [Sun, 1 Nov 2009 13:43:26 +0000 (05:43 -0800)]
Make.pkg: add DEPS= support
allow Makefiles using Make.pkg to specify a
list of directories that should be installed
before trying to build the package.
this is a stopgap for small package trees
maintained outside the standard tree.
Robert Griesemer [Fri, 30 Oct 2009 20:17:14 +0000 (13:17 -0700)]
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
Adam Langley [Thu, 29 Oct 2009 01:23:53 +0000 (18:23 -0700)]
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.
Robert Griesemer [Wed, 28 Oct 2009 23:19:09 +0000 (16:19 -0700)]
- added missing formatters in templates
- replaced deprecated use of </font> with </span> tag
- added html escaping to godoc formatters where missing
- enabled text format for package documentation
Robert Griesemer [Tue, 27 Oct 2009 23:08:12 +0000 (16:08 -0700)]
godoc search bug fixes:
- sort by package name (instead of package path) for results with snippets
- sort line numbers in results without snippets
- properly characterize package clauses
- experiment with a leaner look: no underlines for top-level godoc links in the left side bar
Still using colors to distinguish results. Next step.
Robert Griesemer [Tue, 27 Oct 2009 17:34:31 +0000 (10:34 -0700)]
code search for godoc:
- added goroutine to automatically index in the background
- added handler for search requests
- added search box to top-level godoc template
- added search.html template for the display of search results
- changes to spec.go because of name conflicts
- added extra styles to style.css (for shorter .html files)