Still TODO: parsing optimizations
make_perl_groups.pl is copied with minimal modifications
(just to generate Go syntax instead of C++) from RE2.
Google Inc is "The RE2 Author" of that file and is one of
the Go Authors, so copyright changed to the Go Authors instead.
R=sam.thorogood, r, fvbommel, robert.hencke
CC=golang-dev
https://golang.org/cl/4612041
The "elf.h" header changes involve only comments, the released
Plan 9 C preprocessing function does not cope with multiline
comments following the #define keyword. All multiline comments
have been moved to the line above the associated definition.
Sigh! Fixing the Plan 9 compiler is not an option.
<time.h> does not exist in the Plan 9 Native library. I have
moved it from src/cmd/ld/pe.h to include/u.h. RSC correctly points
out that this copy of <u.h> is not the one used to compile the
Go release on Plan 9 platforms.
R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/4574042
.o files are commonly found in default ignore lists by
source management tools, including dpkg-source, bzr, etc.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4568078
The ptrace syscall remains gutted on darwin, but usable. This
also makes the syscall addition process reproducible on darwin
instead of relying on a file path in rsc's home directory.
I've also removed an override of $PATH in env.bash that made
tooling harder.
R=rsc, dave, r
CC=golang-dev
https://golang.org/cl/4517147
Create a new spdy.Error type that includes the enumerated error type and
the associated stream id (0 if not associated with a specific stream).
This will let users handle errors differently (RST_STREAM vs GOAWAY).
R=bradfitz, rsc, rogpeppe
CC=golang-dev
https://golang.org/cl/4532131
Move mmapper from syscall.go to syscall_unix.go.
Remove Sendfile from syscall_plan9.go.
R=rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/4368060
Required moving some parts of gc/pgen.c to ?g/ggen.c
on linux tests pass for all 3 architectures, and
frames are actually compacted (diagnostic code for
that has been removed from the CL).
R=rsc
CC=golang-dev
https://golang.org/cl/4571071
If we fail due to a missing command (always bison)
during the build, it is running many things in parallel
and the error message gets lost in the noise.
Also diagnose bison++.
$ ./make.bash
Your system's bison is bison++, a buggy copy of the original bison.
Go needs the original bison instead.
See http://golang.org/doc/install.html#ctools
$ sudo apt-get remove bison++
... ridiculous amount of output ...
$ ./make.bash
Cannot find 'bison' on search path.
See http://golang.org/doc/install.html#ctools
$ sudo apt-get install bison
... ridiculous amount of output ...
$ ./make.bash
... works
Fixes#1938.
Fixes#1946.
R=bradfitz
CC=golang-dev
https://golang.org/cl/4528137
That gcc does not include enumerator names and values
in its DWARF debug output. Create a data block from which
we can read the values instead.
Fixes#1881.
R=iant
CC=golang-dev
https://golang.org/cl/4607045
Makes it possible for older tools like objdump to find the filenames,
fixes objdump -d -l --start-address=0x400c00 --stop-address=0x400c36 6.out
fixes#1950
R=rsc
CC=golang-dev
https://golang.org/cl/4609043
Parser is a work in progress but can populate most of the
interesting parts of the data structure, so a good checkpoint.
All the complicated Perl syntax is missing, as are various
important optimizations made during parsing to the
syntax tree.
The plan is that exp/regexp's API will mimic regexp,
and exp/regexp/syntax provides the parser directly
for programs that need it (and for implementing exp/regexp).
Once finished, exp/regexp will replace regexp.
R=r, sam.thorogood, kevlar, edsrzf
CC=golang-dev
https://golang.org/cl/4538123
An unusual design using slice and a goroutine makes for a
compact scanner with very little allocation.
R=rsc, r
CC=golang-dev, kevlar
https://golang.org/cl/4610041
%+q uses strconv.Quote[Rune]ToASCII, guaranteeing ASCII-only output.
%#U a quoted character if the rune is printable: 'x'=U+0078; otherwise
it's as before: U+000A.
R=golang-dev, gri, rsc
CC=golang-dev
https://golang.org/cl/4589047
It comes up often enough that it's time to provide
the utility of a standard package.
R=r, mirtchovski, adg, rsc, n13m3y3r, ality, go.peter.90, lstoakes, iant, jan.mercl, bsiegert, robert.hencke, rogpeppe, befelemepeseveze, kevlar
CC=golang-dev
https://golang.org/cl/4557047
With the ReadFrom change in the sendfile CL, it became
possible to illegally send a response to a HEAD request if you
did it via io.Copy.
Fixes#1939
R=rsc
CC=golang-dev
https://golang.org/cl/4584049
Thumb code and ARM pre-V4 code is unused,
unmaintained, and almost certainly wrong by now.
Every time I try to change 5l I have to sort out
what's dead code and what's not.
30% of lines of code in this directory deleted.
R=ken2
CC=golang-dev
https://golang.org/cl/4601049
After allocparams and walk, remove unused auto variables
and re-layout the remaining in reverse alignment order.
R=rsc
CC=golang-dev
https://golang.org/cl/4568068
5a: add SQRTF and SQRTD
5l: add ASQRTF and ASQRTD
Use ARMv7 VFP VSQRT instruction to speed up math.Sqrt
R=rsc, dave, m
CC=golang-dev
https://golang.org/cl/4551082
Via Russ Ross' bug report on golang-nuts, it was not possible
to send an HTTP request with a zero length body with either a
Content-Length (it was stripped) or chunking (it wasn't set).
This means Go couldn't upload 0-length objects to Amazon S3.
(which aren't as silly as they might sound, as S3 objects can
have key/values associated with them, set in the headers)
Amazon further doesn't supported chunked uploads. (not Go's
problem, but we should be able to let users set an explicit
Content-Length, even if it's zero.)
To fix the ambiguity of an explicit zero Content-Length and
the Request struct's default zero value, users need to
explicit set TransferEncoding to []string{"identity"} to force
the Request.Write to include a Content-Length: 0. identity is
in RFC 2616 but is ignored pretty much everywhere. We don't
even then serialize it on the wire, since it's kinda useless,
except as an internal sentinel value.
The "identity" value is then documented, but most users can
ignore that because NewRequest now sets that.
And adds more tests.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4603041
This replaces most the map[string][]string usage with
a new Values type name, with the usual methods.
It also changes client.PostForm to take a Values, rather
than a map[string]string, closing a TODO in the code.
R=rsc
CC=golang-dev
https://golang.org/cl/4532123
This change was adapted from gccgo's libgo/runtime/mem.c at
Ian Taylor's suggestion. It fixes all.bash failing with
"address space conflict: map() =" on amd64 Linux with kernel
version 2.6.32.8-grsec-2.1.14-modsign-xeon-64.
With this change, SysMap will use MAP_FIXED to allocate its desired
address space, after first calling mincore to check that there is
nothing else mapped there.
R=iant, dave, n13m3y3r, rsc
CC=golang-dev
https://golang.org/cl/4438091
Three optimizations: First, special-case power of two bases
that partion a Word(), bases 2, 4, 16, and 256. These can
be moved directly from internal Word() storage to the output
without multiprecision operations. Next, same approach for
the other power-of-two bases, 8, 32, 64, and 128. These
don't fill a Word() evenly, so special handling is needed
for those cases where input spans the high-bits of one Word
and the low bis of the next one. Finally, implement the
general case for others bases in 2 <= base <= 256 using
superbases, the largest power of base representable in a
Word(). For base ten, this is 9 digits and a superbase of
10^9 for 32-bit Words and 19 digits and 10^19 for 64-bit
compiles. This way we do just 1/9th or 1/19th of the expensive
multiprecision divisions, unpacking superdigits using fast
native machine arithmetic. The resulting code runs 7x to
800x the speed of the previous approach, depending on the
length of the number to be converted--longer is relatively
faster.
Also, extended the tests and benchmarks for string to nat
(scan()) and nat to string (string()) functions. A further
enhancement awaits the next CL to make general cases about
7x faster for long cases.
R=gri
CC=golang-dev
https://golang.org/cl/4595041
Programs expect that Read and Write are synchronous.
The background goroutines make the implementation
a little easier, but they introduce asynchrony that
trips up calling code. Remove them.
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/4548080
I started looking at this code because the nm in GNU
binutils was ignoring the first symbol in the .symtab
section. Apparently, the System V ABI reserves the
first entry and requires all fields inside to be set
to zero.
The list of changes is as follows:
· reserve the first symbol entry (as noted above)
· fix the section indices for .data and .bss symbols
· factor out common code for Elf32 and Elf64
· remove the special case for elfsymo in [568]l/asm.c:/^asmb
· add the "etext" symbol in 6l
· add static symbols
R=rsc
CC=golang-dev
https://golang.org/cl/4524075
add QuoteToASCII.
The Quote and QuoteRune functions now let printable
runes (as defined by unicode.IsPrint) through. When
true 7-bit clean stuff is necessary, there are now two
new functions: QuoteToASCII and QuoteRuneToASCII.
Printf("%q") uses Quote. To get the old behavior, it
will now be necessary to say
Printf("%s", strconv.QuoteToASCII(s))
but that should rarely be necessary.
R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/4561061
The single file was getting unwieldy.
Also remove use of vector; a slice works fine - although
it's an unusual one.
R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/4576042
This change moves a number of common PKIX structures into
crypto/x509/pkix, from where x509, and ocsp can reference
them, saving duplication. It also removes x509/crl and merges it into
x509 and x509/pkix.
x509 is changed to take advantage of the big.Int support that now
exists in asn1. Because of this, the public/private key pair in
http/httptest/server.go had to be updated because it was serialised
with an old version of the code that didn't zero pad ASN.1 INTEGERs.
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4532115
To build under clang, pass the path to clang in CC when
calling ./make.bash
CC=/opt/llvm/llvm-2.9/bin/clang ./make.bash
Credit goes to jmhodges for suggestions.
R=jeff, r, ality
CC=golang-dev
https://golang.org/cl/4527098
The brace style in these files are a little inconsistent so I rolled with
it on a per-file basis.
R=dave, r
CC=golang-dev
https://golang.org/cl/4515194
The long-term goal is that %q will use IsPrint to decide
what to show natively vs. as hexadecimal.
R=rsc, r
CC=golang-dev
https://golang.org/cl/4526095