- 13 Aug, 2013 23 commits
-
-
Alberto García Hierro authored
* Add a new kind of Name, "fpvar" which stands for function pointer variable * When walking the AST, find functions used as expressions and create a new Name object for them * Track functions which are only used in expr contexts, and avoid generating bridge code for them R=golang-dev, minux.ma, fullung, rsc, iant CC=golang-dev https://golang.org/cl/9835047
-
Russ Cox authored
Maybe these will work now. R=golang-dev, dvyukov, bradfitz CC=golang-dev https://golang.org/cl/12787044
-
Anthony Martin authored
R=bradfitz, dave, rsc, r CC=golang-dev https://golang.org/cl/10001045
-
Dmitriy Vyukov authored
R=golang-dev, bradfitz, rsc CC=golang-dev https://golang.org/cl/12790043
-
Dmitriy Vyukov authored
Ensure that deadlines affect already issued IO. R=golang-dev, mikioh.mikioh, bradfitz CC=golang-dev https://golang.org/cl/12847043
-
Dmitriy Vyukov authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/12851043
-
Dmitriy Vyukov authored
Fixes #5722. R=golang-dev, khr, cshapiro, rsc, r CC=golang-dev https://golang.org/cl/12670045
-
Mikio Hara authored
Just for readability reasons; to prevent overlooking deadline stuff across over platforms. R=golang-dev, dvyukov CC=golang-dev https://golang.org/cl/8656044
-
Dmitriy Vyukov authored
The new version does not require any memory allocations and is 30-50% faster. Also detect and painc if Cond is copied after first. benchmark old ns/op new ns/op delta BenchmarkCond1 317 195 -38.49% BenchmarkCond1-2 875 607 -30.63% BenchmarkCond1-4 1116 548 -50.90% BenchmarkCond1-8 1013 613 -39.49% BenchmarkCond1-16 983 450 -54.22% BenchmarkCond2 559 352 -37.03% BenchmarkCond2-2 1916 1378 -28.08% BenchmarkCond2-4 1518 1322 -12.91% BenchmarkCond2-8 2313 1291 -44.19% BenchmarkCond2-16 1885 1078 -42.81% BenchmarkCond4 1070 614 -42.62% BenchmarkCond4-2 4899 3047 -37.80% BenchmarkCond4-4 3813 3006 -21.16% BenchmarkCond4-8 3605 3045 -15.53% BenchmarkCond4-16 4148 2637 -36.43% BenchmarkCond8 2086 1264 -39.41% BenchmarkCond8-2 9961 6736 -32.38% BenchmarkCond8-4 8135 7689 -5.48% BenchmarkCond8-8 9623 7517 -21.89% BenchmarkCond8-16 11661 8093 -30.60% R=sougou, rsc, bradfitz, r CC=golang-dev https://golang.org/cl/11573043
-
Dmitriy Vyukov authored
If the timer goroutine is wakeup by timeout, other goroutines will still notewakeup because sleeping is still set. R=golang-dev, r CC=golang-dev https://golang.org/cl/12763043
-
Dmitriy Vyukov authored
Fixes #5517. Fixes #5659. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12183044
-
Dmitriy Vyukov authored
Fixes #6103. R=golang-dev, alex.brainman CC=golang-dev https://golang.org/cl/12686045
-
Andrew Gerrand authored
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/12836044
-
David Symonds authored
R=gri, r CC=golang-dev https://golang.org/cl/12822043
-
Andrew Gerrand authored
R=golang-dev, go.peter.90, rsc, r CC=golang-dev https://golang.org/cl/12016043
-
Russ Cox authored
The compilers assume they can generate temporary variables as needed to preserve the right semantics or simplify code generation and the back end will still generate good code. This turns out not to be true. The back ends will only track the first 128 variables per function and give up on the remainder. That needs to be fixed too, in a later CL. This CL merges temporary variables with equal types and non-overlapping lifetimes using the greedy algorithm in Poletto and Sarkar, "Linear Scan Register Allocation", ACM TOPLAS 1999. The result can be striking in the right functions. Top 20 frame size changes in a 6g godoc binary by bytes saved: 5464 1984 (-3480, -63.7%) go/build.(*Context).Import 4456 1824 (-2632, -59.1%) go/printer.(*printer).expr1 2560 80 (-2480, -96.9%) time.nextStdChunk 3496 1608 (-1888, -54.0%) go/printer.(*printer).stmt 1896 272 (-1624, -85.7%) net/http.init 2688 1400 (-1288, -47.9%) fmt.(*pp).printReflectValue 2800 1512 (-1288, -46.0%) main.main 3296 2016 (-1280, -38.8%) crypto/tls.(*Conn).clientHandshake 1664 488 (-1176, -70.7%) time.loadZoneZip 1760 608 (-1152, -65.5%) time.parse 4104 3072 (-1032, -25.1%) runtime/pprof.writeHeap 1680 712 ( -968, -57.6%) go/ast.Walk 2488 1560 ( -928, -37.3%) crypto/x509.parseCertificate 1128 392 ( -736, -65.2%) math/big.nat.divLarge 1528 864 ( -664, -43.5%) go/printer.(*printer).fieldList 1360 712 ( -648, -47.6%) regexp/syntax.(*parser).factor 2104 1528 ( -576, -27.4%) encoding/asn1.parseField 1064 504 ( -560, -52.6%) encoding/xml.(*Decoder).text 584 48 ( -536, -91.8%) html.init 1400 864 ( -536, -38.3%) go/doc.playExample In the same godoc build, cuts the number of functions with too many vars from 83 to 32. R=ken2 CC=golang-dev https://golang.org/cl/12829043
-
Rob Pike authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12830043
-
Brad Fitzpatrick authored
If the hg checkout of go.tools fails, check for Internet connectivity before failing. R=golang-dev, shivakumar.gn CC=golang-dev https://golang.org/cl/12814043
-
Russ Cox authored
R=ken2 CC=golang-dev https://golang.org/cl/12827043
-
Russ Cox authored
Now there's only one copy of the flow graph construction and dominator computation, and different optimizations can attach different annotations to the instructions. R=ken2 CC=golang-dev https://golang.org/cl/12797045
-
Rob Pike authored
Out of context, it can be very confusing because there can be lots of Go files in the directory, but the error message says there aren't. R=golang-dev, dsymonds, rsc CC=golang-dev https://golang.org/cl/12823043
-
Elias Naur authored
The call builtin unconditionally tries to convert a second return value from a function to the error type. This fails in case nil is returned, effectively making call useless for functions returning two values. This CL adds a nil check for the second return value, and adds a test. Note that for regular function and method calls the nil error case is handled correctly and is verified by a test. R=r CC=golang-dev https://golang.org/cl/12804043
-
Russ Cox authored
Bugs pointed out by cshapiro in CL 12637051. R=cshapiro CC=golang-dev https://golang.org/cl/12815043
-
- 12 Aug, 2013 17 commits
-
-
Russ Cox authored
Code in gc/popt.c is compiled as part of 5g, 6g, and 8g, meaning it can use arch-specific headers but there's just one copy of the code. This is the same arrangement we use for the portable code generation logic in gc/pgen.c. Move fixjmp and noreturn there to get the ball rolling. R=ken2 CC=golang-dev https://golang.org/cl/12789043
-
Volker Dobler authored
Malformed domain attributes are not sent in a Set-Cookie header. Instead the domain attribute is dropped which turns the cookie into a host-only cookie. This is much safer than dropping characters from domain attribute. Domain attributes with a leading dot '.' are still allowed, even if discouraged by RFC 6265 section 4.1.1. Fixes #6013 R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12745043
-
Keith Randall authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12798043
-
Dmitriy Vyukov authored
Fixes #5933. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12699051
-
Dmitriy Vyukov authored
The original plan was to collect allocation stacks for all memory blocks. But it was never implemented and it's not in near plans and it's unclear how to do it at all. R=golang-dev, dave, bradfitz CC=golang-dev https://golang.org/cl/12724044
-
Dmitriy Vyukov authored
Fixes #6098. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12717043
-
Russ Cox authored
Like CL 12637051, but for 5g instead of 6g. R=ken2 CC=golang-dev https://golang.org/cl/12779043
-
Russ Cox authored
They are just like MOVW and should be setting only two register fields, not three. R=ken2 CC=golang-dev, remyoudompheng https://golang.org/cl/12781043
-
Dmitriy Vyukov authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12702048
-
Keith Randall authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12774043
-
Keith Randall authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12773044
-
Keith Randall authored
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/12773043
-
Russ Cox authored
Like CL 12637051, but for 8g instead of 6g. Fix a few minor 6g errors too. R=ken2 CC=golang-dev https://golang.org/cl/12778043
-
Andrew Gerrand authored
Update #5530 R=golang-dev, r CC=golang-dev https://golang.org/cl/12504044
-
Rob Pike authored
Fixes #5530. R=golang-dev, iant, com.liigo CC=golang-dev https://golang.org/cl/12688044
-
Rob Pike authored
No need for the complex condition. Fixes #6089 R=golang-dev, mischief, adg CC=golang-dev https://golang.org/cl/12731043
-
Russ Cox authored
Add new proginfo function that returns information about a Prog*. The information includes various instruction description bits as well as a list of required registers set and used and indexing registers used. Convert the large instruction switches to use proginfo. This information was formerly duplicated in multiple optimization passes, inconsistently. For example, the information about which registers an instruction requires appeared three times for most instructions. Most of the switches were incomplete or incorrect in some way. For example, the switch in copyu did not list cases for INCB, JPS, MOVAPD, MOVBWSX, MOVBWZX, PCDATA, POPQ, PUSHQ, STD, TESTB, TESTQ, and XCHGL. Those were all falling into the "unknown instruction" default case and stopping the rewrite, perhaps unnecessarily. Similarly, the switch in needc only listed a handful of the instructions that use or set the carry bit. We still need to decide whether to use proginfo to generalize a few of the remaining smaller switches in peep.c. If this goes well, we'll make similar changes in 8g and 5g. R=ken2 CC=golang-dev https://golang.org/cl/12637051
-