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
It was only used by exp/4s, and even if it is general purpose, I think
it belongs in a graphics library atop exp/draw, not in exp/draw itself.
R=rsc
CC=golang-dev
https://golang.org/cl/3705041
This is largely based on ality's CL 2747042.
crypto/rc4: API break in order to conform to crypto/cipher's
Stream interface
cipher/cipher: promote to the default build
Since CBC differs between TLS 1.0 and 1.1, we downgrade and
support only 1.0 at the current time. 1.0 is what most of the
world uses.
Given this CL, it would be trival to add support for AES 256,
SHA 256 etc, but I haven't in order to keep the change smaller.
R=rsc
CC=ality, golang-dev
https://golang.org/cl/3659041
The recent linker changes broke NaCl support
a month ago, and there are no known users of it.
The NaCl code can always be recovered from the
repository history.
R=adg, r
CC=golang-dev
https://golang.org/cl/3671042
This Flush is equivalent to zlib's Z_SYNC_FLUSH.
The addition of the explicit Writer type opens the
door to adding a PartialFlush if needed for SSH
and maybe even FullFlush. It also opens the door
for a SetDictionary method to be added.
http://www.bolet.org/~pornin/deflate-flush.html
documents the various intricacies of flushing a
DEFLATE stream.
R=agl1, r
CC=golang-dev
https://golang.org/cl/3637041
The code used interfaces in a pretty, pedagogical way but not efficiently.
Remove unnecessary interface code for significant speedups.
Before:
regexp.BenchmarkLiteral 1000000 2629 ns/op
regexp.BenchmarkNotLiteral 100000 18131 ns/op
regexp.BenchmarkMatchClass 100000 26647 ns/op
regexp.BenchmarkMatchClass_InRange 100000 27092 ns/op
regexp.BenchmarkReplaceAll 100000 27014 ns/op
After:
regexp.BenchmarkLiteral 1000000 2077 ns/op
regexp.BenchmarkNotLiteral 100000 13738 ns/op
regexp.BenchmarkMatchClass 100000 20418 ns/op
regexp.BenchmarkMatchClass_InRange 100000 20999 ns/op
regexp.BenchmarkReplaceAll 100000 21825 ns/op
There's likely more to do without major surgery, but this is a simple, significant step.
R=rsc
CC=golang-dev
https://golang.org/cl/3572042