Implement the (3-per-family) Noah's Ark clause (i.e. don't put
more than three identical elements on the list of active formatting
elements.
Also, when running tests, sort attributes by name before dumping
them.
Pass 4 additional tests with Noah's Ark clause (including one
that needs attributes to be sorted).
Pass 5 additional, unrelated tests because of sorting attributes.
R=nigeltao, rsc
CC=golang-dev
https://golang.org/cl/6247056
CanonicalHeaderKey didn't allocate, but it did use unnecessary
CPU in the hot path, deciding it didn't need to allocate.
I considered using constants for all these common header keys
but I didn't think it would be prettier. "Content-Length" looks
better than contentLength or hdrContentLength, etc.
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/6255053
Comment on cache keys above connectMethod says "http to proxy, http
anywhere after that", however in reality target address was always
included, which prevented http requests to different target
addresses to reuse the same http proxy connection.
R=golang-dev, r, rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5901064
CL 5956051 introduced too many call != nil checks, so
attempt to improve this by splitting logic into three
distinct parts.
R=r
CC=golang-dev
https://golang.org/cl/6248048
for expr1, expr2 = range slice
was assigning to expr1 and expr2 in sequence
instead of in parallel. Now it assigns in parallel,
as it should. This matters for things like
for i, x[i] = range slice.
Fixes#3464.
R=ken2
CC=golang-dev
https://golang.org/cl/6252048
This is from CL 5451105 but was dropped from that CL.
See also CL 6137051.
The only change compared to 5451105 is to check for
h != nil in reflect·mapiterinit; allowing use of nil maps
must have happened after that original CL.
Fixes#3573.
R=golang-dev, dave, r
CC=golang-dev
https://golang.org/cl/6215078
Remove redundant checks for integration points.
Ignore null bytes in text.
Don't break out of foreign content for a <font> tag unless it
has a color, face, or size attribute.
Check for MathML text integration points when breaking out of
foreign content.
Pass two new tests.
R=nigeltao
CC=golang-dev
https://golang.org/cl/6256045
The bulk of the gains come from hoisting the modulo ops outside of
the inner loop.
Reducing the digest type from 8 bytes to 4 bytes gains another 1% on
the hash/adler32 micro-benchmark.
Benchmarks for $GOOS,$GOARCH = linux,amd64 below.
hash/adler32 benchmark:
benchmark old ns/op new ns/op delta
BenchmarkAdler32KB 1660 1364 -17.83%
image/png benchmark:
benchmark old ns/op new ns/op delta
BenchmarkDecodeGray 2466909 2425539 -1.68%
BenchmarkDecodeNRGBAGradient 9884500 9751705 -1.34%
BenchmarkDecodeNRGBAOpaque 8511615 8379800 -1.55%
BenchmarkDecodePaletted 1366683 1330677 -2.63%
BenchmarkDecodeRGB 6987496 6884974 -1.47%
BenchmarkEncodePaletted 6292408 6040052 -4.01%
BenchmarkEncodeRGBOpaque 19780680 19178440 -3.04%
BenchmarkEncodeRGBA 80738600 79076800 -2.06%
Wall time for Denis Cheremisov's PNG-decoding program given in
https://groups.google.com/group/golang-nuts/browse_thread/thread/22aa8a05040fdd49
Before: 2.44s
After: 2.26s
Delta: -7%
R=rsc
CC=golang-dev
https://golang.org/cl/6251044
When client fails to write a request is sends caller that error,
however server might have failed to read that request in the mean
time and replied with that error. When client then reads the
response the call would no longer be pending, so call will be nil
Handle this gracefully by discarding such server responses
R=golang-dev, r
CC=golang-dev, rsc
https://golang.org/cl/5956051
* Eliminate bounds check on known small shifts.
* Rewrite x<<s | x>>(32-s) as a rotate (constant s).
* More aggressive (but still minimal) range analysis.
R=ken, dave, iant
CC=golang-dev
https://golang.org/cl/6209077
The previous attempt to explain this got it backwards (all the more reason to be
sad we couldn't make the two functions behave the same).
Fixes#3669.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6249051
There's no need for the 16-bit arithmetic here,
and it tickles a long-standing compiler bug.
Fix the exp code not to use 16-bit math and
create an explicit test for the compiler bug.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6256048
- interface methods appeared under VarDecl in search results
(long-standing TODO)
- don't walk parts of AST which contain no indexable material
(minor performance tuning)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6228047
The documentation says so, but in the case of a normalized
integral Rat, the denominator was a new value. Changed the
internal representation to use an Int to represent the
denominator (with the sign ignored), so a reference to it
can always be returned.
Clarified documentation and added test cases.
Fixes#3521.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6237045
* Shift/rotate by constant doesn't have to stop subprop. (also in 8g)
* Remove redundant MOVLQZX instructions.
* An attempt at issuing loads early.
Good for 0.5% on a good day, might not be worth keeping.
Need to understand more about whether the x86
looks ahead to what loads might be coming up.
R=ken2, ken
CC=golang-dev
https://golang.org/cl/6203091
Detect HTML integration points and MathML text integration points.
At these points, process tokens as HTML, not as foreign content.
Pass 33 more tests.
R=nigeltao
CC=golang-dev
https://golang.org/cl/6249044
Import updated test data from the WebKit Subversion repository (SVN revision 118111).
Some of the old tests were failing because we were HTML5 compliant, but the tests weren't.
R=nigeltao
CC=golang-dev
https://golang.org/cl/6228049
I needed this to explore per-GOOS/GOARCH differences in pkg
syscall for a recent CL. Others may find it useful too.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6236046
- there is no label scope at package level
- open/close all scopes symmetrically now
that there is only one parse entry point
(parseFile)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6230047
CL 5823055 removed a line introduced in Linux/ARM cgo support.
Because readsym() now returns nil for "$a", "$d" mapping symbols,
no matter the settings of `needSym', we still have to guard against
them in ldelf().
R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6220073
This quiets all.bash noise for upcoming features we know about.
The all.bash warnings will now only print for things not in next.txt
(or in next.txt but not in the API).
Once an API is frozen, we rename next.txt to a new frozen file
(like go1.txt)
Fixes#3651
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6218069
Handle text, comment, and doctype tokens in afterBodyIM, afterAfterBodyIM,
and afterAfterFramesetIM.
Pass three more tests.
R=nigeltao
CC=golang-dev
https://golang.org/cl/6231043
Also: simplified some existing tests.
No support for Rats for now because the precision-preserving
default notation (fractions of the form a/b) is not a valid
JSON value.
Fixes#3657.
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/6211079
Currently, if you pass some data to a template as an interface (e.g. interface{})
and extract that value that value as a parameter for a function, it fails, saying
wrong type.
This is because it is only looking at the interface type, not the interface content.
This CL uses the underlying content as the parameter to the func.
Fixes#3642.
R=golang-dev, r, r
CC=golang-dev
https://golang.org/cl/6218052