Previously comparisons with NaN led to contradictory results if it was
compared to anything not NaN, since Less always returned false, thus
breaking monotonicity of ordering.
This fix makes NaN less than anything else and adds NaN and (+-)Inf to
testcases.
Fixes#2092.
R=golang-dev, r, rsc, r
CC=golang-dev
https://golang.org/cl/4805051
Replace cas with xadd in scheduler.
Suggested by Dmitriy in last code review.
Verified with Promela model.
When there's actual contention for the atomic word,
this avoids the looping that compare-and-swap requires.
benchmark old ns/op new ns/op delta
runtime_test.BenchmarkSyscall 32 26 -17.08%
runtime_test.BenchmarkSyscall-2 155 59 -61.81%
runtime_test.BenchmarkSyscall-3 112 52 -52.95%
runtime_test.BenchmarkSyscall-4 94 48 -48.57%
runtime_test.BenchmarkSyscallWork 871 872 +0.11%
runtime_test.BenchmarkSyscallWork-2 481 477 -0.83%
runtime_test.BenchmarkSyscallWork-3 338 335 -0.89%
runtime_test.BenchmarkSyscallWork-4 263 256 -2.66%
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/4800047
This is the last piece (I hope) of the set creation code.
These helpers create sets from files containing individual
template definitions, free of {{define}} clauses. This
design is helpful if the templates live one per file,
undecorated.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4801052
Fixes a problem where Readdir would always return
empty directories (Readdir is only called by godoc
if the usual directory handler is commented out
in godoc.go, and if a zip file system is provided;
thus, this bug never manifested itself in godoc).
Also:
- better choice of variable/field names
- simplified error handling a bit
- better comments
R=bradfitz
CC=golang-dev
https://golang.org/cl/4813047
This surprisingly takes 30 seconds on my fast machine
so disabling by default. Need to optimize the Writer
at some point.
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/4815048
This makes the full file paths recorded by 6g
prefer $PWD over the actual directory name
(relevant when $PWD gets to the current directory
via symlinks). It's what everyone else does, and
what people expect.
R=iant, r, mattn.jp
CC=golang-dev
https://golang.org/cl/4824041
Don't report that a directory was found just because we found
the list index where the directory would be if it were there...
R=iant
CC=golang-dev
https://golang.org/cl/4812051
Also:
- Add parser.SpuriousError flag. If set, the parser reports all (including
spurious) errors rather then at most one error per line.
- Add -e flag to gofmt and gotype: If set, gofmt and gotype report all
(including spurious) errors rather than at most one error per line.
- Updated the respective documentation.
Fixes#2088.
R=rsc
CC=golang-dev
https://golang.org/cl/4803047
- remove calls to print
- make units compile again
- make units.y closer to gofmt style
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4802052
Drops mallocrep1.go back to a reasonable
amount of time. (154 -> 0.8 seconds on my Mac)
Fixes#2085.
R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/4811045
Also make the Set.Parse methods variadic so you can parse static lists of files without loops.
R=rsc, dsymonds, r
CC=golang-dev
https://golang.org/cl/4802051
Now handles standard precision specifications, standard interactions of
redundant specifications (such as precision and zero-fill), handles the
special case of precision specified but equal to zero, and generates the
output without recursive calls to format/printf to be clearer and faster.
R=gri, mtj, gri
CC=golang-dev
https://golang.org/cl/4703050
ServeMux depends on having a URL
in order to mux. It might be that the right
fix is to have CONNECT handlers just not
look at URL.
««« original CL description
http: do not parse req.URL for CONNECT
CONNECT's argument is not a URL.
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/4808044
»»»
TBR=bradfitz
CC=golang-dev
https://golang.org/cl/4798046
It makes it clear what benchmark is currently running.
Especially useful in case of hangup or crash.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4816043
Something is broken, and investigation is underway.
In the meantime, godoc is broken, so disable sniffing for now
by reverting to the pre-sniffer state.
R=r
CC=golang-dev
https://golang.org/cl/4809046
The C-stdlib heritage of printf/fprintf/sprintf has two odd
aspects for precisions of zero with integers. First, the zero
can be specified in any of these ways, "%4.0d", "%.0d" and
"%.d" which was not previously supported here. Secondly, the
seemingly universal interpretation of precision for integers
is that precision==0 and value==0 means print nothing at all.
The code here now handles this for integers just as the code
in big/int.c does the same for the Int type. New tests are
added to fmt_test.go to verify these changes.
R=r, r
CC=golang-dev
https://golang.org/cl/4717045
This simplifies the API and makes it easier to make the template
invocation statically secure, at the cost of some minor flexibility.
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/4794045
As $GOROOT/src/pkg/html/testdata/webkit/README says, we're pulling from
$WEBKITROOT/LayoutTests/html5lib/resources.
R=r
CC=golang-dev
https://golang.org/cl/4810043
This is the "adoption agency" algorithm.
The test case input is "<a><p>X<a>Y</a>Z</p></a>". The correct parse is:
| <html>
| <head>
| <body>
| <a>
| <p>
| <a>
| "X"
| <a>
| "Y"
| "Z"
R=gri
CC=golang-dev
https://golang.org/cl/4771042
This follows draft-ietf-websec-mime-sniff-03 in its intent,
though not its algorithmic specification.
R=rsc
CC=golang-dev
https://golang.org/cl/4746042
Remove complicated PRNG algorithm
(argument is limited by uint16 and can't be <= 1).
Do not require chansend/chanrecv selgen to be bumped with CAS.
R=rsc, ken
CC=golang-dev
https://golang.org/cl/4816041
The dynamic ELF sections were pointing to the proper data,
but that data was already owned by the rodata and text sections.
Some ELF references explicitly prohibit multiple sections from
owning the same data, and strip behaves accordingly.
The data for these sections was moved out and their ranges are
now owned by their respective sections. This change makes strip
happy both with and without -s being provided at link time.
A test was added in debug/elf to ensure there are no regressions
on this area in the future.
Fixes#1242.
Fixes#2022.
NOTE: Tested on Linux amd64/386/arm only.
R=rsc
CC=golang-dev
https://golang.org/cl/4808043