The old loop was a bit odd; change it to be more regular.
This also enables a diagnostic for Printf("%", 3): %!(NOVERB)
R=rsc, Kyle C
CC=golang-dev
https://golang.org/cl/3749044
changeset: 6839:545c9926d61a
user: Robert Griesemer <gri@golang.org>
date: Mon Dec 06 14:23:18 2010 -0800
summary: go/ast: use token.Pos instead of token.Position; adjust all dependent code
broke 'godoc -src fmt', one of the example uses of godoc. It gives a stack backtrace essentially
caused by dereferencing a NULL pointer (in C terms). This change fixes the particular issue, but
the code probably should be made more robust.
Fixes#3818044.
R=gri
CC=golang-dev
https://golang.org/cl/3818044
- add End() method to all nodes; the text range of a node n is [n.Pos(), n.End())
- various small bug fixes in the process
- fixed several comments
R=r, rsc
CC=golang-dev
https://golang.org/cl/3769042
The original change 3378041 was submitted in December 2010:
template: change the signature of formatters for future development.
R=adg
CC=golang-dev
https://golang.org/cl/3862041
After a prefix match, the old code advanced the length of the
prefix. This is incorrect since the full match might begin
in the middle of the prefix. (Consider "aaaab+" matching
"aaaaaab").
Fixes#1373
R=rsc
CC=golang-dev
https://golang.org/cl/3795044
The bug was that for an anchored pattern such as ^x, the prefix
scan ignored the anchor, and could scan the whole file if there was
no x present. The fix is to do prefix matching after the anchor;
the cost miniscule; the speedups huge.
R=rsc, gri
CC=golang-dev
https://golang.org/cl/3837042
Implementation uses fast suffixarray lookup to find
initial matches if the regular expression starts with
a suitable prefix without meta characters.
R=r, rsc
CC=golang-dev
https://golang.org/cl/3720042
#pragma dynexport is no longer needed for
this use of cgo, since the gcc and gc code are
now linked together into the same binary.
It may still be necessary later.
On the Mac, you cannot use the GOT to resolve
symbols that exist in the current binary, so 6l and 8l
translate the GOT-loading mov instructions into lea
instructions.
On ELF systems, we could use the GOT for those
symbols, but for consistency 6l and 8l apply the
same translation.
The translation is sketchy in the extreme
(depending on the relocation being in a mov
instruction) but it verifies that the instruction
is a mov before rewriting it to lea.
Also makes typedefs global across files.
Fixes#1335.
Fixes#1345.
R=iant, r
CC=golang-dev
https://golang.org/cl/3650042
The former is a boolean function to test whether a string
contains a regular expression metacharacter; the second
returns the string used to compile the regexp.
R=gri, rsc
CC=golang-dev
https://golang.org/cl/3728041