Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixes issue 470.
R=rsc
CC=golang-dev
http://codereview.appspot.com/183074
|
|
tabs after an empty line where not converted.
Also, made it more robust in the presence of
(unexpected) ' ' and '\v' chars in indentation
mode.
R=r
CC=golang-dev
http://codereview.appspot.com/181085
|
|
Use uint index variables in some cases instead
of int to enable strength reduction; this makes
it possible for the compiler to reduce % into
masks.
Old code: 6g -S md4.go md4block.go | grep "md4block.go:44"
0471 (md4block.go:44) MOVL AX,BX
0472 (md4block.go:44) MOVL AX,BP
0473 (md4block.go:44) MOVL AX,R8
0474 (md4block.go:44) SARL $31,R8
0475 (md4block.go:44) SHRL $30,R8
0476 (md4block.go:44) ADDL R8,BP
0477 (md4block.go:44) SARL $2,BP
0478 (md4block.go:44) IMULL $4,BP
0479 (md4block.go:44) SUBL BP,BX
0480 (md4block.go:44) MOVLQSX BX,BX
0481 (md4block.go:44) LEAQ shift1+0(SB),BP
0482 (md4block.go:44) CMPL BX,8(BP)
0483 (md4block.go:44) JCS ,485
0484 (md4block.go:44) CALL ,runtime.throwindex+0(SB)
0485 (md4block.go:44) MOVQ (BP),BP
0486 (md4block.go:44) MOVL (BP)(BX*4),DI
New code: 6g -S md4.go md4block.go | grep "md4block.go:44"
0471 (md4block.go:44) MOVL AX,BX
0472 (md4block.go:44) ANDL $3,BX
0473 (md4block.go:44) MOVLQZX BX,BX
0474 (md4block.go:44) LEAQ shift1+0(SB),BP
0475 (md4block.go:44) CMPL BX,8(BP)
0476 (md4block.go:44) JCS ,478
0477 (md4block.go:44) CALL ,runtime.throwindex+0(SB)
0478 (md4block.go:44) MOVQ (BP),BP
0479 (md4block.go:44) MOVL (BP)(BX*4),DI
R=agl, agl1
CC=golang-dev
http://codereview.appspot.com/181086
|
|
(I was looking at this code accidentally because of some gofmt
issues and thought that one could write this more effectively.
You may have deliberately chosen not to use ranges here to make
the index range clearer. Just let me know.)
R=agl, agl1
CC=golang-dev
http://codereview.appspot.com/181084
|
|
Fixes issue 459.
R=rsc, imkrasin, sonia
CC=golang-dev
http://codereview.appspot.com/181073
|
|
R=agl, agl1
CC=golang-dev
http://codereview.appspot.com/181080
|
|
Listener contains private members and 6g now enforces that private
members cannot be assigned outside of their package.
R=rsc
CC=golang-dev
http://codereview.appspot.com/183073
|
|
reported by erik quanstrom.
R=ken2
http://codereview.appspot.com/181071
|
|
a possible interface for more granular sleep times.
Fixes issue #260.
R=rsc, r
CC=golang-dev
http://codereview.appspot.com/181058
Committer: Rob Pike <r@golang.org>
|
|
R=dsymonds1
CC=golang-dev
http://codereview.appspot.com/183049
|
|
This was convenient for me to have without being forced
to parse the regexp myself. I'd understand if it's not
really wanted, but I also think that some meta information
about compiled regexps would be fine.
R=r, rsc
CC=golang-dev
http://codereview.appspot.com/183044
Committer: Rob Pike <r@golang.org>
|
|
R=rsc
CC=golang-dev
http://codereview.appspot.com/181049
|
|
Fixes issue 309.
R=rsc
CC=golang-dev
http://codereview.appspot.com/181044
|
|
for now, it's amd64 and 386 only but it's trivial to add more.
Fixes issue 385.
(why couldn't it have been issue 386?)
tested for amd64 and 386 on darwin.
R=rsc
CC=golang-dev
http://codereview.appspot.com/182043
|
|
Add support for TLS extensions in general and Next Protocol
Negotiation in particular.
R=rsc
CC=golang-dev
http://codereview.appspot.com/181045
|
|
It's expected to be shared between all files so that all types are output.
Fixes bug reported on mailing list by Peter Froehlich.
R=rsc, phf
CC=golang-dev
http://codereview.appspot.com/183043
Committer: Russ Cox <rsc@golang.org>
|
|
R=r, rsc
CC=golang-dev
http://codereview.appspot.com/183042
Committer: Russ Cox <rsc@golang.org>
|
|
as it is not needed anymore (only one impl.
of vector package).
Makefile, vector_test.go, and nogen_test.go
were modified manually (find/replace), the
other files (intvector_test.go, strinvector_test.go
are generated).
Runs all tests.
R=r
http://codereview.appspot.com/182041
|
|
Manual changes to the following files:
src/pkg/Makefile
src/pkg/exp/vector/Makefile (now: src/pkg/container/vector/Makefile)
R=rsc, r
CC=golang-dev
http://codereview.appspot.com/181041
|
|
R=r
CC=golang-dev
http://codereview.appspot.com/180108
|
|
- use an interface {Get()}
- implement Get for maps, slices
- for slices, retrieves the address of the end of the array, which will give the
same value for every slice of the same array.
R=rsc
CC=golang-dev
http://codereview.appspot.com/179129
|
|
R=gri
CC=golang-dev
http://codereview.appspot.com/179128
|
|
(Also fix case sensitivity in test for PTR inside fmt_test.go)
Fixes issue 441.
R=rsc, iant
CC=golang-dev
http://codereview.appspot.com/180112
|
|
R=r
CC=golang-dev
http://codereview.appspot.com/179120
|
|
R=gri
CC=rsc
http://codereview.appspot.com/178048
Committer: Robert Griesemer <gri@golang.org>
|
|
Fixes issue 436.
R=ken2
http://codereview.appspot.com/180105
|
|
R=dho
CC=golang-dev
http://codereview.appspot.com/180099
|
|
R=ken2
http://codereview.appspot.com/180092
|
|
corrects a common misunderstanding about NewBuffer.
R=rsc
CC=golang-dev
http://codereview.appspot.com/179106
|
|
(Thanks to ken and rsc for pointing this out)
rsc:
ken pointed out that there's a race in the new
one-lock-per-channel code. the issue is that
if one goroutine has gone to sleep doing
select {
case <-c1:
case <-c2:
}
and then two more goroutines try to send
on c1 and c2 simultaneously, the way that
the code makes sure only one wins is the
selgen field manipulation in dequeue:
// if sgp is stale, ignore it
if(sgp->selgen != sgp->g->selgen) {
//prints("INVALID PSEUDOG POINTER\n");
freesg(c, sgp);
goto loop;
}
// invalidate any others
sgp->g->selgen++;
but because the global lock is gone both
goroutines will be fiddling with sgp->g->selgen
at the same time.
This results in a 7% slowdown in the single threaded case for a
ping-pong microbenchmark.
Since the cas predominantly succeeds, adding a simple check first
didn't make any difference.
R=rsc
CC=golang-dev
http://codereview.appspot.com/180068
|
|
now that the parser doesn't do this test anymore
R=rsc
CC=golang-dev
http://codereview.appspot.com/179105
|
|
added more test cases
some capitalization cleanups
R=rsc
CC=golang-dev
http://codereview.appspot.com/180085
|
|
R=rsc
CC=golang-dev
http://codereview.appspot.com/179099
|
|
R=dho, phf
CC=golang-dev
http://codereview.appspot.com/180082
|
|
Fixes issue 443.
R=dho
CC=golang-dev
http://codereview.appspot.com/179095
|
|
them in the stream.
R=rsc
http://codereview.appspot.com/174052
|
|
R=rsc
CC=golang-dev
http://codereview.appspot.com/179096
|
|
R=ken2
CC=dho
http://codereview.appspot.com/179097
|
|
leading tabs into spaces to ensure a good outcome in
most browsers
R=rsc
http://codereview.appspot.com/165051
|
|
Fixes issue 431.
R=r, rsc
CC=golang-dev
http://codereview.appspot.com/179079
Committer: Russ Cox <rsc@golang.org>
|
|
Fixes issue 342.
R=rsc
CC=golang-dev
http://codereview.appspot.com/179062
Committer: Russ Cox <rsc@golang.org>
|
|
structs containing bitfields.
Fixes issue 163.
R=rsc
CC=golang-dev
http://codereview.appspot.com/180059
Committer: Russ Cox <rsc@golang.org>
|
|
source for xproto.go.
R=rsc
CC=golang-dev
http://codereview.appspot.com/180074
Committer: Russ Cox <rsc@golang.org>
|
|
most signals, so that ordinary programs
can be killed, for example.
Fixes issue 434.
R=dsymonds1
CC=golang-dev, hoisie
http://codereview.appspot.com/180064
|
|
Allows stand-alone types (e.g. []int as patterns) and doesn't require
a semicolon at the end (which are now mandatory terminators).
- Fix a matcher bug.
R=rsc
CC=golang-dev
http://codereview.appspot.com/179088
|
|
This is not a complete JPEG implementation (e.g. it does not handle
progressive JPEGs or restart markers), but I was able to take a photo
with my phone, and view the resultant JPEG in pure Go.
The decoder is simple, but slow. The Huffman decoder in particular
should be easily improvable, but optimization is left to future
changelists. Being able to inline functions in the inner loop should
also help performance.
The output is not pixel-for-pixel identical to libjpeg, although
identical behavior isn't necessarily a goal, since JPEG is a lossy
codec. There are at least two reasons for the discrepancy.
First, the inverse DCT algorithm used is the same as Plan9's
src/cmd/jpg, which has different rounding errors from libjpeg's
default IDCT implementation. Note that libjpeg actually has three
different IDCT implementations: one floating point, and two fixed
point. Out of those four, Plan9's seemed the simplest to understand,
partly because it has no #ifdef's or C macros.
Second, for 4:2:2 or 4:2:0 chroma sampling, this implementation does
nearest neighbor upsampling, compared to libjpeg's triangle filter
(e.g. see h2v1_fancy_upsample in jdsample.c).
The difference from the first reason is typically zero, but sometimes
1 (out of 256) in YCbCr space, or double that in RGB space. The
difference from the second reason can be as large as 8/256 in YCbCr
space, in regions of steep chroma gradients. Informal eyeballing
suggests that the net difference is typically imperceptible, though.
R=r
CC=golang-dev, rsc
http://codereview.appspot.com/164056
|
|
in parser's ParsePkgFile and ParsePackage functions.
R=rsc
CC=golang-dev, rog
http://codereview.appspot.com/180070
|
|
Fixes issue 389.
R=rsc
CC=golang-dev
http://codereview.appspot.com/180061
|
|
into consts in the resulting Go source. Previously known as issue 161047,
which I deleted accidentally. Fixes issue 207.
R=rsc
http://codereview.appspot.com/166059
Committer: Russ Cox <rsc@golang.org>
|
|
R=rsc
http://codereview.appspot.com/176070
Committer: Russ Cox <rsc@golang.org>
|