- 27 Feb, 2013 25 commits
-
-
Brad Fitzpatrick authored
Permits all sorts of custom HTTP timeout policies without adding a new Transport timeout Duration for each combination of HTTP phases. This keeps track internally of which TCP connection a given Request is on, and lets callers forcefully close the TCP connection for a given request, without actually getting the net.Conn directly. Additionally, a future CL will implement res.Body.Close (Issue 3672) in terms of this. Update #3362 Update #3672 R=golang-dev, rsc, adg CC=golang-dev https://golang.org/cl/7372054
-
Brad Fitzpatrick authored
R=golang-dev, adg CC=golang-dev https://golang.org/cl/7420043
-
Rob Pike authored
Fixes #4897. R=golang-dev, adg CC=golang-dev https://golang.org/cl/7377061
-
Robert Griesemer authored
R=adonovan CC=golang-dev https://golang.org/cl/7369059
-
Alan Donovan authored
Use portable ReadDirent, not linux Getdents. R=gri TBR=gri CC=golang-dev https://golang.org/cl/7405051
-
Alan Donovan authored
ssadump: - permit naming a package (not just *.go files) on command line. - set BuildSerially flag when setting Log* flags (Q. should instead the logging functions take a lock?) Builder: - fixed bug when calling variadic function with zero '...'-params. Added regression test. interp: - more external functions: the 'error' interface bytes.{Equal,IndexByte} reflect.(Value).{Bool,NumOut,Out} syscall.{Close,Fstat,Read,Open,Stat,Lstat,Fstat, Getdents,ParseDirents,Getwd} - permit comparisons between *Function and *closure. With this CL, ssadump can now interpret ssadump itself (!), loading, parsing, typing, SSA-building, and running println("Hello, World!"). While a fmt-based equivalent still lacks some external routines, e.g. math/big, I think there are diminishing returns in expanding the interpreter (and debugging it is starting to feel like "Inception"). I'm pretty confident this package is now good enough for wider use. R=gri CC=golang-dev https://golang.org/cl/7392053
-
Brad Fitzpatrick authored
R=golang-dev, iant CC=golang-dev https://golang.org/cl/7392054
-
Brad Fitzpatrick authored
Add DialOpt. So we have: func Dial(net, addr string) (Conn, error) func DialTimeout(net, addr string, timeout time.Duration) (Conn, error) func DialOpt(addr string, opts ...DialOption) (Conn, error) DialTimeout (and Dial) are regrettable in retrospect. Maybe in a future Go we'll be back down to one Dial, with DialOpt becoming Dial. DialOpt looks like: c, err := net.DialOpt("google.com:80") // tcp is default c, err := net.DialOpt("google.com:80", net.Timeout(30 * time.Second)) c, err := net.DialOpt("google.com:80", net.TCPFastOpen()) c, err := net.DialOpt("google.com:80", net.LocalAddr(..)) c, err := net.DialOpt("google.com:53", net.Network("udp6")) And then: (clustered in godoc) type DialOption interface { /* private only */ } func Deadline(time.Time) DialOption func LocalAddr(Addr) DialOption func Network(string) DialOption func TCPFastOpen() DialOption func Timeout(time.Duration) DialOption I'm pretty confident we could add Happy Eyeballs to this too. Fixes #3097 Update #3610 Update #4842 R=golang-dev, r, dave, minux.ma, rsc CC=golang-dev https://golang.org/cl/7365049
-
Dmitriy Vyukov authored
add per-P cache of dead G's add global runnable queue (not used for now) add list of idle P's (not used for now) R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7397061
-
Daniel Morsing authored
If all locals are optimized away, the type instructions would stay in the instruction stream. Call fixautoused to scrub the output. Fixes #4915. R=rsc CC=golang-dev https://golang.org/cl/7385055
-
Volker Dobler authored
The values for the planet masses are given in earth mass, not solar mass. R=golang-dev, dave, r CC=golang-dev https://golang.org/cl/7368054
-
Brad Fitzpatrick authored
Update #3362 R=golang-dev, adg, rsc CC=golang-dev https://golang.org/cl/7369055
-
Alan Donovan authored
While submitting CL 7371051 I accidentally reverted much of CL 7395052. This change restores it. R=gri TBR=gri CC=golang-dev https://golang.org/cl/7364051
-
Jan Ziak authored
R=rsc CC=golang-dev https://golang.org/cl/7383054
-
Alan Donovan authored
The correct semantics of named result parameters and deferred procedures cannot be implemented with the existing Ret instruction alone, since the required sequence is: (1) evaluate return operands and parallel-assign them to named result parameters (2) invoke deferred procedures (3) load named result parameters to form result tuple. We introduce a new 'rundefers' instruction that explicitly invokes the deferred procedure calls, and we generate code that follows the sequence above. Most functions do not use deferred procedures but this cannot be known in a single pass. So, we add an optimisation to eliminate redundant 'rundefers'; it is piggybacked on the existing pass done for "lifting". Added tests. R=gri CC=golang-dev https://golang.org/cl/7411043
-
Alan Donovan authored
Details: - move Builder.nTo1Vars into package => thread-safe. - add BuildSerially builder mode flag to disable concurrency. - add Builder.BuildAllPackages method. Benchmark: BuildAllPackages for $GOROOT/test/append.go drops to 83ms from 190ms (GOMAXPROCS=8). R=gri CC=golang-dev https://golang.org/cl/7371051
-
Marcel van Lohuizen authored
R=r, dave CC=golang-dev https://golang.org/cl/7403055
-
Marcel van Lohuizen authored
which was submitted earlier. R=r CC=golang-dev https://golang.org/cl/7402048
-
Matthew Dempsky authored
Fixes #3349. R=bradfitz, dave, minux.ma CC=golang-dev https://golang.org/cl/7383056
-
Russ Cox authored
TBR=golang-dev CC=golang-dev https://golang.org/cl/7401053
-
Russ Cox authored
The current code uses 64-bit pc-relative on 64-bit systems, but in ELF linkers there is no such thing, so we cannot express this in a .o file. Change to 32-bit. R=golang-dev, iant CC=golang-dev https://golang.org/cl/7383055
-
Russ Cox authored
This CL changes the encoding used for the Go symbol table, stored in the binary and used at run time. It does not change any of the semantics or structure: the bits are just packed a little differently. The comment at the top of runtime/symtab.c describes the new format. Compared to the Go 1.0 format, the main changes are: * Store symbol addresses as full-pointer-sized host-endian values. (For 6g, this means addresses are 64-bit little-endian.) * Store other values (frame sizes and so on) varint-encoded. The second change more than compensates for the first: for the godoc binary on OS X/amd64, the new symbol table is 8% smaller than the old symbol table (1,425,668 down from 1,546,276). This is a required step for allowing the host linker (gcc) to write the final Go binary, since it will have to fill in the symbol address slots (so the slots must be host-endian) and on 64-bit systems it may choose addresses above 4 GB. R=golang-dev, iant CC=golang-dev https://golang.org/cl/7403054
-
Nigel Tao authored
R=dr.volker.dobler CC=golang-dev https://golang.org/cl/7389048
-
Rob Pike authored
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/7376058
-
Brad Fitzpatrick authored
And one real leak in TimeoutHandler. Fixes #4821 R=golang-dev, adg CC=golang-dev https://golang.org/cl/7369056
-
- 26 Feb, 2013 15 commits
-
-
Robert Griesemer authored
- better documentation of Check - better handling of (explicit) internal panics - gotype: don't stop after 1st error R=adonovan, r CC=golang-dev https://golang.org/cl/7406052
-
Dave Cheney authored
Fixes #3348. R=devon.odell, minux.ma, bradfitz, mdempsky CC=golang-dev https://golang.org/cl/7406050
-
Alan Donovan authored
Actually it already worked since the spec only requires that the one immediately preceding a for/switch/... be usable as the target of a break or continue statement. Added a test. Also: allocate Function.lblocks on first use. R=gri CC=golang-dev https://golang.org/cl/7365058
-
Dominik Honnef authored
The original go-mode is plagued with odd behaviour, lack of behaviour typical to modes in Emacs and bugs. This change rewrites great parts of go-mode (basically only keeping the gofmt and godoc functions). Additionally it adds new features such as manipulating package imports. For more information please see https://groups.google.com/group/golang-nuts/browse_frm/thread/3a9d6dae3369c0b5/1efe65e2f7afb190 Fixes #3618. Fixes #4240. Fixes #4322. Fixes #4671. Fixes #4726. R=golang-dev, fullung, sameer, cw, arthur, proppy, adonovan, rsc, bradfitz CC=golang-dev https://golang.org/cl/7314113
-
Rob Pike authored
And fix test. Pointer to unsafe.Pointer tests nothing important... Also identify the incorrect type: go/types.Type is a Stringer. Also fix a couple of incorrect format verbs found by new printf checker, now that we can run it on more files. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7385051
-
Alan Donovan authored
The previous approach desugared the ast.SelectorExpr to make implicit field selections explicit. But: 1) it was clunky since it required allocating temporary syntax trees. 2) it was not thread-safe since it required poking types into the shared type map for the new ASTs. 3) the desugared syntax had no place to represent the package lexically enclosing each implicit field selection, so it was as if they all occurred in the same package as the explicit field selection. This meant unexported field names changed meaning. This CL does what I should have done all along: just generate the SSA instructions directly from the original AST and the promoted field information. Also: - add logStack util for paired start/end log messages. Useful for debugging crashes. R=gri CC=golang-dev https://golang.org/cl/7395052
-
Brad Fitzpatrick authored
Generated by addca (mostly, until codereview blew up) R=golang-dev CC=golang-dev https://golang.org/cl/7386054
-
Anthony Martin authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7370050
-
Anthony Martin authored
R=minux.ma, rsc, akumar, bradfitz CC=golang-dev https://golang.org/cl/7313070
-
Akshat Kumar authored
Adjust the exit status string for Plan 9. Upon allocating >100 file descriptors, Plan 9 raises a warning. Moreover, the Go runtime for 32-bit version of Plan 9 keeps /dev/bintime open for its implementation of runtime.nanotime(). This change accounts for these things in TestExtraFiles. R=rsc, rminnich, ality, bradfitz CC=golang-dev https://golang.org/cl/7363056
-
Anthony Martin authored
Also, I synced the rc files with changes that have been made to make.bash, etc. R=seed, rminnich, r CC=golang-dev https://golang.org/cl/7389049
-
Anthony Martin authored
R=seed, rminnich, r, minux.ma CC=golang-dev https://golang.org/cl/7397059
-
Robert Griesemer authored
Context.Alignof/Offsetsof/Sizeof now provide means to customize the type checker for a given platform. - provide Context.Offsetsof to specify the offsets of struct fields - use the correct sizes for ints, uint, uintptrs in constant computations - moved all size computations into separate file (sizes.go) - fixed a bug with string constant slicing R=adonovan, axwalk CC=golang-dev https://golang.org/cl/7363054
-
Robert Griesemer authored
- imported objects don't have position information - gc exported data contains non-exported objects at the top-level, guard against them - better error message when dot-imports conflict with local declarations R=adonovan, r CC=golang-dev https://golang.org/cl/7379052
-
Robert Griesemer authored
R=adonovan, r CC=golang-dev https://golang.org/cl/7376055
-