Don't assume the test has a clean environment within /tmp.
Use an actual new tempdir for its tests.
Fixes FreeBSD build failure as seen at:
http://build.golang.org/log/396738676356d7fb6bab6eaf1b97cac820f8a90f
--- FAIL: TestMkdirAllWithSymlink (0.00 seconds)
path_test.go:178: Mkdir /tmp/dir: mkdir /tmp/dir: file exists
FAIL
FAIL os 1.091s
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6615057
t.Log("line 1\nline 2\nline 3")
Old output:
=== RUN TestLine3
--- PASS: TestLine3 (0.00 seconds)
testing_test.go:25: line 1
line 2
line 3
PASS
New output:
=== RUN TestLine3
--- PASS: TestLine3 (0.00 seconds)
testing_test.go:24: line 1
line 2
line 3
PASS
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6613069
decoder struct, inside the unmappedzero limit, to eliminate some
TESTB instructions in the inner decoding loop.
benchmark old ns/op new ns/op delta
BenchmarkDecode 2943204 2746360 -6.69%
R=r, dave
CC=golang-dev
https://golang.org/cl/6625058
The nil dereference in the next few lines doesn't seem
to cause a segmentation fault on Unix, but does seem
to halt the Go compiler.
The following is a test case:
>>>
package main
func mine(int b) int {
return b + 2
}
func main() {
mine()
c = mine()
}
<<<
Without this change only the following is caught:
typecheck.go:3: undefined: b
typecheck.go:4: undefined: b
with it, we catch all the errors:
typecheck.go:3: undefined: b
typecheck.go:4: undefined: b
typecheck.go:10: undefined: c
typecheck.go:10: cannot assign to c .
R=rsc, minux.ma
CC=golang-dev
https://golang.org/cl/6542060
to be consistent with the fdct function, and to ease any future
idct rewrites in assembly.
The BenchmarkIDCT delta is obviously just an accounting change and not
a real saving, but it does give an indication of what proportion of
time was spent in the actual IDCT and what proportion was in shift and
clip. The idct time taken is now comparable to fdct.
The BenchmarkFDCT delta is an estimate of benchmark noise.
benchmark old ns/op new ns/op delta
BenchmarkFDCT 3842 3837 -0.13%
BenchmarkIDCT 5611 3478 -38.01%
BenchmarkDecodeRGBOpaque 2932785 2929751 -0.10%
R=r
CC=golang-dev
https://golang.org/cl/6625057
refer to opacity. Those references were copy/pasted from the
image/png encoding benchmarks, which cares whether or not the
source image is opaque, but the JPEG encoder does not care.
R=r
CC=golang-dev
https://golang.org/cl/6623052
elimination) in idct.go.
benchmark old ns/op new ns/op delta
BenchmarkIDCT 5649 5610 -0.69%
BenchmarkDecodeRGBOpaque 2948607 2941051 -0.26%
The "type block" declaration moved so that idct.go is compilable
as a stand-alone file: "go tool 6g -S idct.go" works.
R=r
CC=golang-dev
https://golang.org/cl/6619056
The profiler collects goroutine blocking information similar to Google Perf Tools.
You may see an example of the profile (converted to svg) attached to
http://code.google.com/p/go/issues/detail?id=3946
The public API changes are:
+pkg runtime, func BlockProfile([]BlockProfileRecord) (int, bool)
+pkg runtime, func SetBlockProfileRate(int)
+pkg runtime, method (*BlockProfileRecord) Stack() []uintptr
+pkg runtime, type BlockProfileRecord struct
+pkg runtime, type BlockProfileRecord struct, Count int64
+pkg runtime, type BlockProfileRecord struct, Cycles int64
+pkg runtime, type BlockProfileRecord struct, embedded StackRecord
R=rsc, dave, minux.ma, r
CC=gobot, golang-dev, r, remyoudompheng
https://golang.org/cl/6443115
rundir will compile each file in the directory in lexicographic order, link the last file as the main package and run the resulting program. rundircmpout is an related command, that will compare the output of the program to an corresponding .out file
errorcheckdir will compile each file in a directory in lexicographic order, running errorcheck on each file as it compiles. All compilations are assumed to be successful except for the last file. However, If a -0 flag is present on the command, the last compilation will also be assumed successful
This CL also includes a small refactoring of run.go. It was getting unwieldy and the meaning of the run commands was hidden behind argument line formatting.
Fixes#4058.
R=rsc, minux.ma, remyoudompheng, iant
CC=golang-dev
https://golang.org/cl/6554071
The Go run-time assumes that all SSE floating-point exceptions
are masked so that Go programs are not broken by such invalid
operations. By default, the 64-bit version of the Plan 9 kernel
masks only some SSE floating-point exceptions. Here, we mask
them all on a per-thread basis.
R=rsc, rminnich, minux.ma
CC=golang-dev
https://golang.org/cl/6592056
The AST representation is already identical. Making the
code (nearly) identical in the parser reduces code size
and ensures that the ast.ValueSpec nodes have the same
values (specifically, iota). This in turn permits the
sharing of much of the respective code in the typechecker.
While at it: type functions work now, so use them.
R=r
CC=golang-dev
https://golang.org/cl/6624047
Code for parsing email addresses was already partially part of the public API with "func (Header) AddressList". This CL adds a trivial implementation for two public methods to parse address and lists from a string. With tests.
R=dsymonds
CC=golang-dev
https://golang.org/cl/5676067
Adds a DecryptBlock function which takes a password and a *pem.Block and
returns the decrypted DER bytes suitable for passing into other crypto/x509
functions.
R=golang-dev, agl, leterip
CC=golang-dev
https://golang.org/cl/6555052
For golang.org I intend to rewrite the jquery link in godoc.html
to point to the Google-hosted jquery.js.
R=dsymonds, minux.ma
CC=golang-dev
https://golang.org/cl/6589071
Also: Be explicit what operator means with respect to conversion types.
The parenthesis requirement is a language change. At the moment,
literal function types in conversions that cannot possibly be
followed by a '(' don't need parentheses. For instance:
func(int)int(x) -> same as (func(int)int)(x)
func()()(x) -> same as (func())(x)
but:
func(int)(x) -> could be func(int)x {...}
Fixes#4109.
R=rsc, r, iant, ken, iant
CC=golang-dev
https://golang.org/cl/6584065
They now show the correct name, the byte offset on the line, and context for the failed evaluation.
Before:
template: three:7: error calling index: index out of range: 5
After:
template: top:7:20: executing "three" at <index "hi" $>: error calling index: index out of range: 5
Here top is the template that was parsed to create the set, and the error appears with the action
starting at byte 20 of line 7 of "top", inside the template called "three", evaluating the expression
<index "hi" $>.
Also fix a bug in index: it didn't work on strings. Ouch.
Also fix bug in error for index: was showing type of index not slice.
The real previous error was:
template: three:7: error calling index: can't index item of type int
The html/template package's errors can be improved by building on this;
I'll do that in a separate pass.
Extends the API for text/template/parse but only by addition of a field and method. The
old API still works.
Fixes#3188.
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6576058