Until now, each scan of a file added a new file to the file set.
With this change, a file can be re-scanned using the same *token.File
w/o changing the file set. Eventually this will enable the re-use of
cached source code in godoc (for the fulltext index). At the moment,
source files are read over and over again from disk.
This is the first step in that direction.
R=r, rsc, r2
CC=golang-dev
https://golang.org/cl/4001041
Also adds some tests for Issue 900 which was the reason
the current URL parsing is broken. (the previous fix
was wrong)
R=rsc, adg, dangabrad, bradfitzwork
CC=golang-dev
https://golang.org/cl/3910042
When searching for regular expressions such as
".", there are many consecutive matches.
In the generated HTML, combine them instead of
generating a new <span> for each adjacent text
segment highlighting a match.
Massively reduces the size of the generated
HTML in those cases.
R=r, rsc
CC=golang-dev
https://golang.org/cl/3971041
This implements the algorithm qsufsort using the sort package
as a sorting primitive. Its worst-case performance is O(N*log(N)), and it
uses only an additional slice of N ints of memory during creation.
Benchmarks (seconds):
old new
10k nulls 149 0.044
1M English corpus 32.0 3.6
R=gri, gri1
CC=golang-dev
https://golang.org/cl/3752044
error is needed by all the OpenPGP packages as they return a shared
family of error types.
armor implements OpenPGP armoring. It's very like PEM except:
a) it includes a CRC24 checksum
b) PEM values are small (a few KB) and so encoding/pem assumes that
they fit in memory. Armored data can be very large and so this
package presents a streaming interface.
R=r, nsz, rsc
CC=golang-dev
https://golang.org/cl/3786043
I missed that environment is used during runtime setup,
well before go init() functions run. Implemented os-dependent
runtime.goenvs functions to allow for different unix, plan9 and
windows versions of environment discovery.
R=rsc, paulzhol
CC=golang-dev
https://golang.org/cl/3787046
In the case where r.Method == "POST", was
calling Printf with an argument but "" format string,
causing a spurious %!EXTRA(...) message.
Also escape string properly in HTML generation.
R=r
CC=golang-dev
https://golang.org/cl/3923043
* Avoid confusion between imported and exported symbols.
* Record number of imported and exported symbols correctly.
* Explictly relocate SMACHOSYM section, since it is not in datap.
R=rsc
CC=golang-dev
https://golang.org/cl/3920042
A few system call numbers on x86 Linux are
defined in terms of a previous definition,
e.g.,
#define __NR_timer_create 259
#define __NR_timer_settime (__NR_timer_create+1)
...
#define __NR_mq_open 277
#define __NR_mq_unlink (__NR_mq_open+1)
This change assumes the numbers are sorted
sequentially in the input file.
R=rsc, bradfitzwork
CC=golang-dev
https://golang.org/cl/3946041
This change prevents enum consts from conflicting with themselves
when loaded twice in different go files.
Fixes#1400.
R=rsc
CC=golang-dev
https://golang.org/cl/3849044
Regular expressions may now be used in conjuction with full text
search. Godoc will show the first 10000 occurences in the source
code and highlight the respective text segments.
- added new flag -testDir to specify a small directory for testing
(fast index creation; default = "")
- use new FormatText function to format text and Go source
code in HTML, supporting multiple kinds of text selections
simulatenously); this replaces the uses of go/printer
Stylers
- for now removed currently unused mechanism for identifier-
specific JS popups (will come back in some form once we
have type or other useful information)
- various typo fixes and minor cleanups throughout
Missing:
- indexing of non-.go files
R=r, r2
CC=golang-dev, rsc
https://golang.org/cl/3699041