- 02 Nov, 2012 11 commits
-
-
Rob Pike authored
It was well-defined but easy to miss that the return value for "not found" is len(input) not -1 as many expect. Fixes #4205. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/6820080
-
Rémy Oudompheng authored
It happens that blocks are used for function calls in a quite low-level way so they cannot be instrumented as usual. Blocks are also used for inlined functions. R=golang-dev, rsc, dvyukov CC=golang-dev https://golang.org/cl/6821068
-
Dmitriy Vyukov authored
The issue is that server still sends body, when client closes the fd. Fixes #4329. R=golang-dev, dave, rsc CC=golang-dev https://golang.org/cl/6822072
-
Shenghou Ma authored
This is the last CL for FreeBSD/ARM support. Also update cmd/ld/doc.go for 5l support of -Hfreebsd. R=rsc CC=golang-dev https://golang.org/cl/6650051
-
Jeff R. Allen authored
R=minux.ma, dave, extraterrestrial.neighbour, rsc CC=golang-dev https://golang.org/cl/6587069
-
Alex Brainman authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6811069
-
Rémy Oudompheng authored
Compiling expressions like: s[s[s[s[s[s[s[s[s[s[s[s[i]]]]]]]]]]]] make 5g and 6g run out of registers. Such expressions can arise if a slice is used to represent a permutation and the user wants to iterate it. This is due to the usual problem of allocating registers before going down the expression tree, instead of allocating them in a postfix way. The functions cgenr and agenr (that generate a value to a newly allocated register instead of an existing location), are either introduced or modified when they already existed to allocate the new register as late as possible, and sudoaddable is disabled for OINDEX nodes so that igen/agenr is used instead. Update #4207. R=dave, daniel.morsing, rsc CC=golang-dev https://golang.org/cl/6733055
-
Nigel Tao authored
R=r CC=golang-dev https://golang.org/cl/6817070
-
Oling Cat authored
R=golang-dev CC=golang-dev https://golang.org/cl/6818083
-
Russ Cox authored
This is an experiment in static analysis of Go programs to understand which struct fields a program might use. It is not part of the Go language specification, it must be enabled explicitly when building the toolchain, and it may be removed at any time. After building the toolchain with GOEXPERIMENT=fieldtrack, a specific field can be marked for tracking by including `go:"track"` in the field tag: package pkg type T struct { F int `go:"track"` G int // untracked } To simplify usage, only named struct types can have tracked fields, and only exported fields can be tracked. The implementation works by making each function begin with a sequence of no-op USEFIELD instructions declaring which tracked fields are accessed by a specific function. After the linker's dead code elimination removes unused functions, the fields referred to by the remaining USEFIELD instructions are the ones reported as used by the binary. The -k option to the linker specifies the fully qualified symbol name (such as my/pkg.list) of a string variable that should be initialized with the field tracking information for the program. The field tracking string is a sequence of lines, each terminated by a \n and describing a single tracked field referred to by the program. Each line is made up of one or more tab-separated fields. The first field is the name of the tracked field, fully qualified, as in "my/pkg.T.F". Subsequent fields give a shortest path of reverse references from that field to a global variable or function, corresponding to one way in which the program might reach that field. A common source of false positives in field tracking is types with large method sets, because a reference to the type descriptor carries with it references to all methods. To address this problem, the CL also introduces a comment annotation //go:nointerface that marks an upcoming method declaration as unavailable for use in satisfying interfaces, both statically and dynamically. Such a method is also invisible to package reflect. Again, all of this is disabled by default. It only turns on if you have GOEXPERIMENT=fieldtrack set during make.bash. R=iant, ken CC=golang-dev https://golang.org/cl/6749064
-
Alex Brainman authored
Fixes #4320. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6810064
-
- 01 Nov, 2012 29 commits
-
-
Robert Griesemer authored
R=iant CC=golang-dev https://golang.org/cl/6775093
-
Robert Griesemer authored
- removes exp/types/staging - the only code change is in exp/gotype/gotype.go R=iant CC=golang-dev https://golang.org/cl/6822068
-
Robert Griesemer authored
The only code change is in exp/gotype/gotype.go. The latest reviewed version of exp/types is now exp/types/staging. First step toward replacing exp/types with exp/types/staging. R=iant CC=golang-dev https://golang.org/cl/6819071
-
Ian Lance Taylor authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6821067
-
Eric Roshan-Eisner authored
Labels the existing benchmark as stream, and add benchmarks that compute the checksum. R=golang-dev, agl CC=golang-dev https://golang.org/cl/6814060
-
Rémy Oudompheng authored
Discovered by adding OBLOCK support to race instrumentation. R=golang-dev, minux.ma, rsc CC=golang-dev https://golang.org/cl/6819067
-
Robert Griesemer authored
- minor unrelated cleanups - performance impact in the noise benchmark old ns/op new ns/op delta BenchmarkReadSlice1000Int32s 83462 83346 -0.14% BenchmarkReadStruct 4141 4247 +2.56% BenchmarkReadInts 1588 1586 -0.13% BenchmarkWriteInts 1550 1489 -3.94% BenchmarkPutUvarint32 39 39 +1.02% BenchmarkPutUvarint64 142 144 +1.41% benchmark old MB/s new MB/s speedup BenchmarkReadSlice1000Int32s 47.93 47.99 1.00x BenchmarkReadStruct 16.90 16.48 0.98x BenchmarkReadInts 18.89 18.91 1.00x BenchmarkWriteInts 19.35 20.15 1.04x BenchmarkPutUvarint32 101.90 100.82 0.99x BenchmarkPutUvarint64 56.11 55.45 0.99x Fixes #4185. R=r, rsc CC=golang-dev https://golang.org/cl/6750053
-
Russ Cox authored
R=dvyukov CC=golang-dev https://golang.org/cl/6810067
-
Dmitriy Vyukov authored
R=golang-dev CC=golang-dev https://golang.org/cl/6826047
-
Dmitriy Vyukov authored
1. Prepend racefuncenter() to fn->enter -- fn->enter can contain new() calls, and we want them to be in the scope of the function. 2. Dump fn->enter and fn->exit. 3. Add TODO that OTYPESW expression can contain interesting memory accesses. 4. Ignore only _ names instead of all names starting with _. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6822048
-
Han-Wen Nienhuys authored
R=golang-dev, minux.ma, fullung, dave, rsc, hanwenn CC=golang-dev https://golang.org/cl/6350074
-
Rémy Oudompheng authored
go test -race -run none -bench . encoding/json benchmark old ns/op new ns/op delta BenchmarkCodeEncoder 3207689000 1716149000 -46.50% BenchmarkCodeMarshal 3206761000 1715677000 -46.50% BenchmarkCodeDecoder 8647304000 4482709000 -48.16% BenchmarkCodeUnmarshal 8032217000 3451248000 -57.03% BenchmarkCodeUnmarshalReuse 8016722000 3480502000 -56.58% BenchmarkSkipValue 10340453000 4560313000 -55.90% benchmark old MB/s new MB/s speedup BenchmarkCodeEncoder 0.60 1.13 1.88x BenchmarkCodeMarshal 0.61 1.13 1.85x BenchmarkCodeDecoder 0.22 0.43 1.95x BenchmarkCodeUnmarshal 0.24 0.56 2.33x BenchmarkCodeUnmarshalReuse 0.24 0.56 2.33x BenchmarkSkipValue 0.19 0.44 2.32x Fixes #4248. R=dvyukov, golang-dev, rsc CC=golang-dev https://golang.org/cl/6815066
-
Robert Griesemer authored
- simplified assignment checking by removing duplicate code - implemented field lookup (methods, structs, embedded fields) - importing methods (not just parsing them) - type-checking functions and methods - typechecking more statements (inc/dec, select, return) - tracing support for easier debugging - handling nil more correctly (comparisons) - initial support for [...]T{} arrays - initial support for method expressions - lots of bug fixes All packages under pkg/go as well as pkg/exp/types typecheck now with pkg/exp/gotype applied to them; i.e., a significant amount of typechecking works now (several statements are not implemented yet, but handling statements is almost trivial in comparison with typechecking expressions). R=rsc CC=golang-dev https://golang.org/cl/6768063
-
Ian Lance Taylor authored
Use wrapper functions to tell scheduler what we are doing. With this patch, and a separate patch to the go tool, all the cgo tests pass with gccgo. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6812058
-
Ian Lance Taylor authored
* Use -fgo-pkgpath and -gccgopkgpath rather than -fgo-prefix and -gccgoprefix. * Define GOPKGPATH when compiling .c or .s files for gccgo. * Use -fgo-relative-import-path. * Produce .o files for gccgo, not .[568] files. * Pass -E when linking if using cgo. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6820064
-
Ian Lance Taylor authored
This supports writing different .c/.s code when using gccgo. R=golang-dev, dsymonds, iant, rsc CC=golang-dev https://golang.org/cl/6823055
-
Dmitriy Vyukov authored
The idea is to (1) process ninit of all nodes, and (2) put instrumentation of ninit into the nodes themselves (not the top-level statement ninit). Fixes #4304. R=golang-dev, rsc CC=golang-dev, lvd https://golang.org/cl/6818049
-
Rémy Oudompheng authored
When local declarations needed unexported types, these could be missing in the export data. Fixes build with -gcflags -lll, except for exp/gotype. R=golang-dev, rsc, lvd CC=golang-dev https://golang.org/cl/6813067
-
Dmitriy Vyukov authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/6612064
-
Rémy Oudompheng authored
Fixes #4323. R=rsc, lvd, golang-dev CC=golang-dev https://golang.org/cl/6815061
-
Ryan Hitchman authored
Helps with issue 2703. R=dave, minux.ma, rsc CC=golang-dev https://golang.org/cl/5536078
-
Daniel Morsing authored
This should make the compiler emit errors specific to the bounds checking instead of overflow errors on the underlying types. Updates #4232. R=rsc CC=golang-dev https://golang.org/cl/6783054
-
Robert Griesemer authored
This is an attempt at making the interaction between these three constructs clearer. Specifically: - return statements terminate a function, execute deferred functions, return to the caller, and then execution continues after the call - panic calls terminate a function, execute deferred functions, return to the caller, and then re-panic - deferred functions are executed before a function _returns_ to its caller The hope is that with this change it becomes clear when a deferred function is executed (when a function returns), and when it is not (when a program exits). R=r, rsc, iant, ken, iant CC=golang-dev https://golang.org/cl/6736071
-
Jan Ziak authored
The 'type' field of Itab will be used by the garbage collector. R=rsc CC=golang-dev https://golang.org/cl/6815059
-
Alexey Borzenkov authored
Incorrect cast was causing panics when calling String() on dnsMsg with dnsRR_A answers. R=golang-dev, dave, rsc CC=golang-dev https://golang.org/cl/6818043
-
Jan Ziak authored
R=golang-dev CC=golang-dev, remyoudompheng, rsc https://golang.org/cl/6780059
-
Russ Cox authored
Plan 9 and Go's lib9/fmt disagree on whether %#x includes the 0x prefix when printing 0, because ANSI C gave bad advice long ago. Avoiding that case makes binaries compiled on different systems compatible. R=ken2 CC=akumar, golang-dev https://golang.org/cl/6814066
-
Andrew Gerrand authored
This caused more problems than it was worth. Fixes #4301. Fixes #4317. R=golang-dev, minux.ma, rsc CC=golang-dev https://golang.org/cl/6818076
-
Rémy Oudompheng authored
The move to 64-bit ints in 6g made componentgen ineffective. In componentgen, the code already selects which values it can handle. On amd64: benchmark old ns/op new ns/op delta BenchmarkBinaryTree17 9477970000 9582314000 +1.10% BenchmarkFannkuch11 5928750000 5255080000 -11.36% BenchmarkGobDecode 37103040 31451120 -15.23% BenchmarkGobEncode 16042490 16844730 +5.00% BenchmarkGzip 811337400 741373600 -8.62% BenchmarkGunzip 197928700 192844500 -2.57% BenchmarkJSONEncode 224164100 140064200 -37.52% BenchmarkJSONDecode 258346800 231829000 -10.26% BenchmarkMandelbrot200 7561780 7601615 +0.53% BenchmarkParse 12970340 11624360 -10.38% BenchmarkRevcomp 1969917000 1699137000 -13.75% BenchmarkTemplate 296182000 263117400 -11.16% R=nigeltao, dave, daniel.morsing CC=golang-dev https://golang.org/cl/6821052
-