- 11 Mar, 2016 26 commits
-
-
Robert Griesemer authored
This is really moving all the non-lexer pieces out of lex.go into main.go. It's always been confusing that the top-most compiler entry point (Main) is in the same file with the lexer. Both files remain of substantial size (> 1000 lines), which justifies this even more. No other changes. Change-Id: I03895589d5e3cc2340580350bbc1420539893dfc Reviewed-on: https://go-review.googlesource.com/20601 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
Change-Id: Id041c1b2d364aecd7a6613a53237f7de2c650a7e Reviewed-on: https://go-review.googlesource.com/20599 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
Fixes #14740 Change-Id: Iad8d971c21977b0a1f4ef55a08bb180a8125e976 Reviewed-on: https://go-review.googlesource.com/20562Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
Removes an intermediate layer of functions that was clogging up a corner of the compiler's profile graph. I can't measure a performance improvement running a large build like jujud, but the profile reports less total time spent in gc.(*lexer).getr. Change-Id: I3000585cfcb0f9729d3a3859e9023690a6528591 Reviewed-on: https://go-review.googlesource.com/20565Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
In addition to reflect.Value.Call, exported methods can be invoked by the Func value in the reflect.Method struct. This CL has the compiler track what functions get access to a legitimate reflect.Method struct by looking for interface calls to either of: Method(int) reflect.Method MethodByName(string) (reflect.Method, bool) This is a little overly conservative. If a user implements a type with one of these methods without using the underlying calls on reflect.Type, the linker will assume the worst and include all exported methods. But it's cheap. No change to any of the binary sizes reported in cl/20483. For #14740 Change-Id: Ie17786395d0453ce0384d8b240ecb043b7726137 Reviewed-on: https://go-review.googlesource.com/20489Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
While we're here, remove a bit of dead code. Change-Id: I1344bb41e5d368825ca5748189382f9e7023c59a Reviewed-on: https://go-review.googlesource.com/20596 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Use an early return. Check errors. Deduplicate. Change-Id: Iabefd563b5ef82a16fab4791277630804fd09003 Reviewed-on: https://go-review.googlesource.com/20597 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Change-Id: I298b9d389ac33a24365f4c06a122c3af989906c0 Reviewed-on: https://go-review.googlesource.com/20594 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
Might as well sort them while they're still in a slice. Change-Id: I40c25ddc5c054dcb4da2aeefa79947967609d599 Reviewed-on: https://go-review.googlesource.com/20591 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Klaus Post authored
Part 1 of optimizing the deflater. This optimizes the bitwriter by: * Removing allocations. * Storing compound values for bit codes instead of 2 separate tables. * Accumulate 48 bits between writes instead of 24. * Inline bit flushing. This also contains code that will be used in later CL's (writeBlockDynamic, writeBlockHuff). Tests for Huffman bit writer encoding regressions has been added. name old speed new speed delta EncodeDigitsSpeed1e4-4 19.3MB/s ± 1% 21.6MB/s ± 1% +11.77% EncodeDigitsSpeed1e5-4 25.0MB/s ± 6% 30.7MB/s ± 1% +22.70% EncodeDigitsSpeed1e6-4 28.2MB/s ± 1% 32.3MB/s ± 1% +14.64% EncodeDigitsDefault1e4-4 13.3MB/s ± 0% 14.2MB/s ± 1% +7.07% EncodeDigitsDefault1e5-4 6.43MB/s ± 1% 6.64MB/s ± 1% +3.27% EncodeDigitsDefault1e6-4 5.81MB/s ± 0% 5.85MB/s ± 1% +0.69% EncodeDigitsCompress1e4-4 13.2MB/s ± 0% 14.4MB/s ± 0% +9.10% EncodeDigitsCompress1e5-4 6.40MB/s ± 1% 6.61MB/s ± 0% +3.20% EncodeDigitsCompress1e6-4 5.80MB/s ± 1% 5.90MB/s ± 1% +1.64% EncodeTwainSpeed1e4-4 18.4MB/s ± 1% 20.7MB/s ± 1% +12.72% EncodeTwainSpeed1e5-4 27.7MB/s ± 1% 31.0MB/s ± 1% +11.78% EncodeTwainSpeed1e6-4 29.1MB/s ± 0% 32.9MB/s ± 2% +13.25% EncodeTwainDefault1e4-4 12.4MB/s ± 0% 13.1MB/s ± 1% +5.88% EncodeTwainDefault1e5-4 7.52MB/s ± 1% 7.83MB/s ± 0% +4.19% EncodeTwainDefault1e6-4 7.08MB/s ± 1% 7.26MB/s ± 0% +2.54% EncodeTwainCompress1e4-4 12.0MB/s ± 1% 12.8MB/s ± 1% +6.70% EncodeTwainCompress1e5-4 5.96MB/s ± 1% 6.16MB/s ± 0% +3.27% EncodeTwainCompress1e6-4 5.37MB/s ± 0% 5.39MB/s ± 1% +0.47% >Allocations: benchmark old allocs new allocs delta BenchmarkEncodeDigitsSpeed1e4-4 50 0 -100.00% BenchmarkEncodeDigitsSpeed1e5-4 110 0 -100.00% BenchmarkEncodeDigitsSpeed1e6-4 1032 0 -100.00% BenchmarkEncodeDigitsDefault1e4-4 56 0 -100.00% BenchmarkEncodeDigitsDefault1e5-4 120 0 -100.00% BenchmarkEncodeDigitsDefault1e6-4 966 0 -100.00% BenchmarkEncodeDigitsCompress1e4-4 56 0 -100.00% BenchmarkEncodeDigitsCompress1e5-4 120 0 -100.00% BenchmarkEncodeDigitsCompress1e6-4 966 0 -100.00% BenchmarkEncodeTwainSpeed1e4-4 58 0 -100.00% BenchmarkEncodeTwainSpeed1e5-4 132 0 -100.00% BenchmarkEncodeTwainSpeed1e6-4 1082 0 -100.00% BenchmarkEncodeTwainDefault1e4-4 52 0 -100.00% BenchmarkEncodeTwainDefault1e5-4 126 0 -100.00% BenchmarkEncodeTwainDefault1e6-4 886 0 -100.00% BenchmarkEncodeTwainCompress1e4-4 52 0 -100.00% BenchmarkEncodeTwainCompress1e5-4 120 0 -100.00% BenchmarkEncodeTwainCompress1e6-4 880 0 -100.00% benchmark old bytes new bytes delta BenchmarkEncodeDigitsSpeed1e4-4 4288 2 -99.95% BenchmarkEncodeDigitsSpeed1e5-4 8896 15 -99.83% BenchmarkEncodeDigitsSpeed1e6-4 84098 153 -99.82% BenchmarkEncodeDigitsDefault1e4-4 4480 3 -99.93% BenchmarkEncodeDigitsDefault1e5-4 9216 76 -99.18% BenchmarkEncodeDigitsDefault1e6-4 73920 768 -98.96% BenchmarkEncodeDigitsCompress1e4-4 4480 3 -99.93% BenchmarkEncodeDigitsCompress1e5-4 9216 76 -99.18% BenchmarkEncodeDigitsCompress1e6-4 73920 768 -98.96% BenchmarkEncodeTwainSpeed1e4-4 4544 2 -99.96% BenchmarkEncodeTwainSpeed1e5-4 9600 15 -99.84% BenchmarkEncodeTwainSpeed1e6-4 77633 153 -99.80% BenchmarkEncodeTwainDefault1e4-4 4352 3 -99.93% BenchmarkEncodeTwainDefault1e5-4 9408 76 -99.19% BenchmarkEncodeTwainDefault1e6-4 65984 768 -98.84% BenchmarkEncodeTwainCompress1e4-4 4352 3 -99.93% BenchmarkEncodeTwainCompress1e5-4 9216 76 -99.18% BenchmarkEncodeTwainCompress1e6-4 65792 768 -98.83% Updates #14258 Change-Id: Ibaa97b9619743ad623094727228eb2ada1ec7f1f Reviewed-on: https://go-review.googlesource.com/19336Reviewed-by: Nigel Tao <nigeltao@golang.org> Reviewed-by: Joe Tsai <joetsai@digital-static.net> Run-TryBot: Joe Tsai <joetsai@digital-static.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Klaus Post authored
This will test if deflate output is deterministic between two runs of the deflater, when write sizes differ. The deflater makes no official promises that results are deterministic between runs, but this is a good test to determine unintentional randomness. Note that this does not guarantee that results are deterministic across platforms nor that results will be deterministic between Go versions. This is also not guarantees we should imply. Change-Id: Id7dd89fe276060fd83a43d0b34ac35d50fcd32d9 Reviewed-on: https://go-review.googlesource.com/20573Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Munday authored
p can be nil in Dconv so we need to do a check before dereferencing it. Fixes a problem I was having running toolstash. Change-Id: I34d6d278b319583d8454c2342ac88e054fc4b641 Reviewed-on: https://go-review.googlesource.com/20595Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
I don't know what they're used for, but that's the only file they're referenced in. Change-Id: Ie39d7d4621e2d5224408243b5789597ca0dc14be Reviewed-on: https://go-review.googlesource.com/20593Reviewed-by: Dave Cheney <dave@cheney.net>
-
Matthew Dempsky authored
This code is an eye sore to keep scrolling past in subr.go, so move it out of the way. Change-Id: I8eafc1725d868a4924ee7ca9b7738cce309f9eff Reviewed-on: https://go-review.googlesource.com/20592Reviewed-by: Dave Cheney <dave@cheney.net>
-
Ian Lance Taylor authored
Still fails about 20% of the time on my laptop. Fixes #14766. Change-Id: I169ab728c6022dceeb91188f5ad466ed6413c062 Reviewed-on: https://go-review.googlesource.com/20590 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
Change-Id: If2a174f482ecd56dee43f921d13fef98439872fc Reviewed-on: https://go-review.googlesource.com/20559Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Emmanuel Odeke authored
Change-Id: Ia2273c3a9f0001d16b0c767fea91498a9acb0af5 Reviewed-on: https://go-review.googlesource.com/19963Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Use idiomatic slicing operations instead of incrementally building a linked list. Passes toolstash -cmp. Change-Id: Idb0e40c7b4d7d1110d23828afa8ae1d157ba905f Reviewed-on: https://go-review.googlesource.com/20556Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
In particular, make Alignof work more like Sizeof. Other idiomatic cleanups while here. Passes toolstash -cmp. Change-Id: I4def20894f3d95e49ab6a50ddba189be36fdd258 Reviewed-on: https://go-review.googlesource.com/20555 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
This could be done by threading the Iter value down through memrun and ispaddedfield, but that ends up a bit clunky. This way is also closer to how we'll want the code to look once fields are kept in slices. Passes toolstash -cmp. Change-Id: I8a44445c85f921eb18d97199df2026c5ce0f4f67 Reviewed-on: https://go-review.googlesource.com/20558 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
x86 has a lot of instructions that require the output to be in the same register as one of the inputs. When allocating the output register, allocate the same register as the input if it is available. Improves the performance of golang.org/x/crypto/sha3 by 10% (from 6% slower than 1.6 to 4% faster). Fixes #14745 Change-Id: I4d81785240c9368e4dc75107b45c959d200df8e6 Reviewed-on: https://go-review.googlesource.com/20488Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Robert Griesemer authored
Not calling popdcl doesn't have an impact on generated code but the result is a growing (rather than empty) stack of symbols, possibly causing more data to remain alive than necessary. Also: minor cleanups. Change-Id: Ic4fdbcd8843637d69ab1aa15e896a7e6339bc990 Reviewed-on: https://go-review.googlesource.com/20554Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
Use a map to detect duplicate symbols. Allows eliminating an otherwise unneeded field from Sym and gets rid of a global variable. Change-Id: Ic004bca7e9130a1261a1cddbc17244529a2a1df4 Reviewed-on: https://go-review.googlesource.com/20552Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com>
-
Todd Neal authored
Change the existing flags from compile time consts to be configurable from the command line. Change-Id: I4aab4bf3dfcbdd8e2b5a2ff51af95c2543967769 Reviewed-on: https://go-review.googlesource.com/20560Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
The location of VARDEFs is incorrect for PPARAMOUT variables which are also used as temporary locations. We put in VARDEFs when setting the variable at return time, but when the location is also used as a temporary the lifetime values are wrong. Fix copyelim to update the names map properly. This is a real name bug fix which, as a result, allows me to write a reasonable test to trigger the PPARAMOUT bug. This is kind of a band-aid fix for #14591. A more pricipled fix (which allows values to be stored in the return variable earlier than the return point) will be harder. Fixes #14591 Change-Id: I7df8ae103a982d1f218ed704c080d7b83cdcfdd9 Reviewed-on: https://go-review.googlesource.com/20457Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Ian Lance Taylor authored
Fixes #14759. Change-Id: I6cef0b49ba00ab85b25ce1e7bad80ad85e2d5076 Reviewed-on: https://go-review.googlesource.com/20545 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
-
- 10 Mar, 2016 14 commits
-
-
Adam Langley authored
PKIX versions are off-by-one, so v1 is actually a zero on the wire, v2 is a one, and so on. The RFC says that the version in a CRL is optional, but doesn't say what the default is. Since v2 is the only accepted version, I had made the default v2. However, OpenSSL considers the default to be v1. Also, if the default is v2 and the element is optional then we'll never actually write v2 on the wire. That's contrary to the RFC which clearly assumes that v2 will be expressed on the wire in some cases. Therefore, this change aligns with OpenSSL and assumes that v1 is the default CRL version. Fixes #13931 [1] https://tools.ietf.org/html/rfc5280#section-5.1 Change-Id: Ic0f638ebdd21981d92a99a882affebf3a77ab71a Reviewed-on: https://go-review.googlesource.com/20544Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Adam Langley authored
The default version of an X.509 certificate is v1, which is encoded on the wire as a zero. Fixes #13382. Change-Id: I5fd725c3fc8b08fd978ab694a3e2d6d2a495918b Reviewed-on: https://go-review.googlesource.com/20548Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
Allows safely eliminating more direct uses of Type's Type and Down fields. Passes toolstash -cmp. Change-Id: I5c17fe541a0473c3cd2978d8314c4ab759079a61 Reviewed-on: https://go-review.googlesource.com/20541 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
I would like to add a func (t *Type) Elem() *Type method to package gc, but that would collide with the existing func (t *Type) Elem() ssa.Type method needed to make *gc.Type implement ssa.Type. Because the latter is much less widely used right now than the former will be, this CL renames it to ElemType. Longer term, hopefully gc and ssa will share a common Type interface, and ElemType can go away. Change-Id: I270008515dc4c01ef531cf715637a924659c4735 Reviewed-on: https://go-review.googlesource.com/20546 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Matthew Dempsky authored
Eliminate "else_clause" parameter and move error messages about bad if statements into the if_stmt parsing method. Passes toolstash -cmp. Change-Id: Ibc31619bdb2e7e0cf28712b14640f7d9b6124a40 Reviewed-on: https://go-review.googlesource.com/20543 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Ian Lance Taylor authored
Change-Id: I06dedf4ebfa32b598f5545dc9354c8e4a95610b1 Reviewed-on: https://go-review.googlesource.com/20525 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shenghou Ma authored
Fixes #14741. Change-Id: Idb8de8b0c1059c15e4c3df4a60bbd340d4e74aba Reviewed-on: https://go-review.googlesource.com/20487Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Keith Randall authored
Make sure we do any just-before-return cleanup on all paths out of a function, including when recovering. Each exit path should include deferreturn (if there are any defers) and then the exit code (e.g. copying heap-escaping return values back to the stack). Introduce a Defer SSA block type which has two outgoing edges - one the fallthrough edge (the defer was queued successfully) and one which immediately returns (the defer had a successful recover() call and normal execution should resume at the return point). Fixes #14725 Change-Id: Iad035c9fd25ef8b7a74dafbd7461cf04833d981f Reviewed-on: https://go-review.googlesource.com/20486Reviewed-by: David Chase <drchase@google.com>
-
Josh Bleecher Snyder authored
Passes toolstash -cmp. Change-Id: I014613985005780d1a622c1981b35a94cda798bb Reviewed-on: https://go-review.googlesource.com/20530 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Change-Id: I055e986c3f27d5c07badcd1684f4fe1d65a917a9 Reviewed-on: https://go-review.googlesource.com/20523 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
This CL was mostly produced by a one-off automated rewrite tool looking for statements like "for X := T.Type; X != nil; X = X.Down" and a few minor variations. Passes toolstash -cmp. Change-Id: Ib22705e37d078ef97841ee2e08f60bdbcabb94ad Reviewed-on: https://go-review.googlesource.com/20520 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Passes toolstash -cmp. Change-Id: I05322fb5afd213f13fb247ec1a5f655c17a58774 Reviewed-on: https://go-review.googlesource.com/20522 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
That was easy. Fixes #14473. Change-Id: I9d1d20a5c5a9b1423e6c72c0460ee4a78130864f Reviewed-on: https://go-review.googlesource.com/20521 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Fixes #14554. Change-Id: I37ab4e4dc1aee84ac448d437314f8eecbbc02994 Reviewed-on: https://go-review.googlesource.com/20021Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-