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
- Added some additional examples.
- 6g appears to implement this semantics already.
Fixes#658.
R=rsc, r, iant, ken
CC=golang-dev
https://golang.org/cl/4538119
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
1) runLog to return err==nil if program runs, but returns exitcode!=0;
2) runLog to return err!=nil when fails to create log file;
3) print failed program name, not just "all.bash".
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/4532117
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
This CL introduces new API into package net to identify the network
interface. A functionality of new API is very similar to RFC3493 -
"Interface Identification".
R=r, gri, bradfitz, robert.hencke, fullung, rsc
CC=golang-dev
https://golang.org/cl/4437087