An error occurred fetching the project authors.
- 07 Mar, 2018 1 commit
-
-
Kunpei Sakai authored
by including *types.Type in typeVal. Updates #21866 Fixes #24159 Change-Id: I2f8cac252d88d43e723124f2867b1410b7abab7b Reviewed-on: https://go-review.googlesource.com/98476 Run-TryBot: Kunpei Sakai <namusyaka@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 27 Feb, 2018 1 commit
-
-
Michael Fraenkel authored
Updates #23834. Change-Id: I1789525a992d37aae9e9b69c1e9d91437d3d0d3b Reviewed-on: https://go-review.googlesource.com/97001 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 26 Feb, 2018 1 commit
-
-
Robert Griesemer authored
For dependency reasons, the data structure implementing source positions in the compiler is in cmd/internal/src. It contains highly compiler specific details (e.g. inlining index). This change introduces a parallel but simpler position representation, defined in the syntax package, which removes that package's dependency on cmd/internal/src, and also removes the need to deal with certain filename-specific operations (defined by the needs of the compiler) in the syntax package. As a result, the syntax package becomes again a compiler- independent, stand-alone package that at some point might replace (or augment) the existing top-level go/* syntax-related packages. Additionally, line directives that update column numbers are now correctly tracked through the syntax package, with additional tests added. (The respective changes also need to be made in cmd/internal/src; i.e., the compiler accepts but still ignores column numbers in line directives.) This change comes at the cost of a new position translation step, but that step is cheap because it only needs to do real work if the position base changed (i.e., if there is a new file, or new line directive). There is no noticeable impact on overall compiler performance measured with `compilebench -count 5 -alloc`: name old time/op new time/op delta Template 220ms ± 8% 228ms ±18% ~ (p=0.548 n=5+5) Unicode 119ms ±11% 113ms ± 5% ~ (p=0.056 n=5+5) GoTypes 684ms ± 6% 677ms ± 3% ~ (p=0.841 n=5+5) Compiler 3.19s ± 7% 3.01s ± 1% ~ (p=0.095 n=5+5) SSA 7.92s ± 8% 7.79s ± 1% ~ (p=0.690 n=5+5) Flate 141ms ± 7% 139ms ± 4% ~ (p=0.548 n=5+5) GoParser 173ms ±12% 171ms ± 4% ~ (p=1.000 n=5+5) Reflect 417ms ± 5% 411ms ± 3% ~ (p=0.548 n=5+5) Tar 205ms ± 5% 198ms ± 2% ~ (p=0.690 n=5+5) XML 232ms ± 4% 229ms ± 4% ~ (p=0.690 n=5+5) StdCmd 28.7s ± 5% 28.2s ± 2% ~ (p=0.421 n=5+5) name old user-time/op new user-time/op delta Template 269ms ± 4% 265ms ± 5% ~ (p=0.421 n=5+5) Unicode 153ms ± 7% 149ms ± 3% ~ (p=0.841 n=5+5) GoTypes 850ms ± 7% 862ms ± 4% ~ (p=0.841 n=5+5) Compiler 4.01s ± 5% 3.86s ± 0% ~ (p=0.190 n=5+4) SSA 10.9s ± 4% 10.8s ± 2% ~ (p=0.548 n=5+5) Flate 166ms ± 7% 167ms ± 6% ~ (p=1.000 n=5+5) GoParser 204ms ± 8% 206ms ± 7% ~ (p=0.841 n=5+5) Reflect 514ms ± 5% 508ms ± 4% ~ (p=0.548 n=5+5) Tar 245ms ± 6% 244ms ± 3% ~ (p=0.690 n=5+5) XML 280ms ± 4% 278ms ± 4% ~ (p=0.841 n=5+5) name old alloc/op new alloc/op delta Template 37.9MB ± 0% 37.9MB ± 0% ~ (p=0.841 n=5+5) Unicode 28.8MB ± 0% 28.8MB ± 0% ~ (p=0.841 n=5+5) GoTypes 113MB ± 0% 113MB ± 0% ~ (p=0.151 n=5+5) Compiler 468MB ± 0% 468MB ± 0% -0.01% (p=0.032 n=5+5) SSA 1.50GB ± 0% 1.50GB ± 0% ~ (p=0.548 n=5+5) Flate 24.4MB ± 0% 24.4MB ± 0% ~ (p=1.000 n=5+5) GoParser 30.7MB ± 0% 30.7MB ± 0% ~ (p=1.000 n=5+5) Reflect 76.5MB ± 0% 76.5MB ± 0% ~ (p=0.548 n=5+5) Tar 38.9MB ± 0% 38.9MB ± 0% ~ (p=0.222 n=5+5) XML 41.6MB ± 0% 41.6MB ± 0% ~ (p=0.548 n=5+5) name old allocs/op new allocs/op delta Template 382k ± 0% 382k ± 0% +0.01% (p=0.008 n=5+5) Unicode 343k ± 0% 343k ± 0% ~ (p=0.841 n=5+5) GoTypes 1.19M ± 0% 1.19M ± 0% +0.01% (p=0.008 n=5+5) Compiler 4.53M ± 0% 4.53M ± 0% +0.03% (p=0.008 n=5+5) SSA 12.4M ± 0% 12.4M ± 0% +0.00% (p=0.008 n=5+5) Flate 235k ± 0% 235k ± 0% ~ (p=0.079 n=5+5) GoParser 318k ± 0% 318k ± 0% ~ (p=0.730 n=5+5) Reflect 978k ± 0% 978k ± 0% ~ (p=1.000 n=5+5) Tar 393k ± 0% 393k ± 0% ~ (p=0.056 n=5+5) XML 405k ± 0% 405k ± 0% ~ (p=0.548 n=5+5) name old text-bytes new text-bytes delta HelloSize 672kB ± 0% 672kB ± 0% ~ (all equal) CmdGoSize 7.12MB ± 0% 7.12MB ± 0% ~ (all equal) name old data-bytes new data-bytes delta HelloSize 133kB ± 0% 133kB ± 0% ~ (all equal) CmdGoSize 390kB ± 0% 390kB ± 0% ~ (all equal) name old exe-bytes new exe-bytes delta HelloSize 1.07MB ± 0% 1.07MB ± 0% ~ (all equal) CmdGoSize 11.2MB ± 0% 11.2MB ± 0% ~ (all equal) Passes toolstash compare. For #22662. Change-Id: I19edb53dd9675af57f7122cb7dba2a6d8bdcc3da Reviewed-on: https://go-review.googlesource.com/94515Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 20 Feb, 2018 1 commit
-
-
philhofer authored
Introduce a new SSA pass to generate CondSelect intstrutions, and add CondSelect lowering rules for arm64. In order to make the CSEL instruction easier to optimize, and to simplify the introduction of CSNEG, CSINC, and CSINV in the future, modify the CSEL instruction to accept a condition code in the aux field. Notably, this change makes the go1 Gzip benchmark more than 10% faster. Benchmarks on a Cavium ThunderX: name old time/op new time/op delta BinaryTree17-96 15.9s ± 6% 16.0s ± 4% ~ (p=0.968 n=10+9) Fannkuch11-96 7.17s ± 0% 7.00s ± 0% -2.43% (p=0.000 n=8+9) FmtFprintfEmpty-96 208ns ± 1% 207ns ± 0% ~ (p=0.152 n=10+8) FmtFprintfString-96 379ns ± 0% 375ns ± 0% -0.95% (p=0.000 n=10+9) FmtFprintfInt-96 385ns ± 0% 383ns ± 0% -0.52% (p=0.000 n=9+10) FmtFprintfIntInt-96 591ns ± 0% 586ns ± 0% -0.85% (p=0.006 n=7+9) FmtFprintfPrefixedInt-96 656ns ± 0% 667ns ± 0% +1.71% (p=0.000 n=10+10) FmtFprintfFloat-96 967ns ± 0% 984ns ± 0% +1.78% (p=0.000 n=10+10) FmtManyArgs-96 2.35µs ± 0% 2.25µs ± 0% -4.63% (p=0.000 n=9+8) GobDecode-96 31.0ms ± 0% 30.8ms ± 0% -0.36% (p=0.006 n=9+9) GobEncode-96 24.4ms ± 0% 24.5ms ± 0% +0.30% (p=0.000 n=9+9) Gzip-96 1.60s ± 0% 1.43s ± 0% -10.58% (p=0.000 n=9+10) Gunzip-96 167ms ± 0% 169ms ± 0% +0.83% (p=0.000 n=8+9) HTTPClientServer-96 311µs ± 1% 308µs ± 0% -0.75% (p=0.000 n=10+10) JSONEncode-96 65.0ms ± 0% 64.8ms ± 0% -0.25% (p=0.000 n=9+8) JSONDecode-96 262ms ± 1% 261ms ± 1% ~ (p=0.579 n=10+10) Mandelbrot200-96 18.0ms ± 0% 18.1ms ± 0% +0.17% (p=0.000 n=8+10) GoParse-96 14.0ms ± 0% 14.1ms ± 1% +0.42% (p=0.003 n=9+10) RegexpMatchEasy0_32-96 644ns ± 2% 645ns ± 2% ~ (p=0.836 n=10+10) RegexpMatchEasy0_1K-96 3.70µs ± 0% 3.49µs ± 0% -5.58% (p=0.000 n=10+10) RegexpMatchEasy1_32-96 662ns ± 2% 657ns ± 2% ~ (p=0.137 n=10+10) RegexpMatchEasy1_1K-96 4.47µs ± 0% 4.31µs ± 0% -3.48% (p=0.000 n=10+10) RegexpMatchMedium_32-96 844ns ± 2% 849ns ± 1% ~ (p=0.208 n=10+10) RegexpMatchMedium_1K-96 179µs ± 0% 182µs ± 0% +1.20% (p=0.000 n=10+10) RegexpMatchHard_32-96 10.0µs ± 0% 10.1µs ± 0% +0.48% (p=0.000 n=10+9) RegexpMatchHard_1K-96 297µs ± 0% 297µs ± 0% -0.14% (p=0.000 n=10+10) Revcomp-96 3.08s ± 0% 3.13s ± 0% +1.56% (p=0.000 n=9+9) Template-96 276ms ± 2% 275ms ± 1% ~ (p=0.393 n=10+10) TimeParse-96 1.37µs ± 0% 1.36µs ± 0% -0.53% (p=0.000 n=10+7) TimeFormat-96 1.40µs ± 0% 1.42µs ± 0% +0.97% (p=0.000 n=10+10) [Geo mean] 264µs 262µs -0.77% Change-Id: Ie54eee4b3092af53e6da3baa6d1755098f57f3a2 Reviewed-on: https://go-review.googlesource.com/55670 Run-TryBot: Philip Hofer <phofer@umich.edu> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Cherry Zhang <cherryyz@google.com> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 11 Oct, 2017 2 commits
-
-
Daniel Martí authored
Noticed while reading some code that the two branches in this loop body shared the last statements. Rewrite it in a way that they are not duplicated. Passes toolstash -cmp on std. Change-Id: I3356ca9fa37c32eee496e221d7830bfc581dade1 Reviewed-on: https://go-review.googlesource.com/66470 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Daniel Martí authored
Focused on ranges, selects and switches for this one. While at it, simplify some vars in typecheckselect. Updates #19683. Change-Id: Ib6aabe0f6826cb1930483aeb4bb2de1ff8052d9e Reviewed-on: https://go-review.googlesource.com/69690 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 10 Oct, 2017 1 commit
-
-
Daniel Martí authored
Before, -1 meant a node being nil or not an OLITERAL, and 0 meant an OLITERAL missing a Val. However, the use of this value was confusing and led to some issues, such as swt.go checking for < 0 instead of <= 0, causing panics. We never need to differentiate these two cases, so collapse both into 0. To make it clear that negative values can no longer happen, make Ctype an uint8. With this change, we can now get rid of the two n.Type == nil checks in swt.go added to fix a couple of these panics. Thanks to Matthew Dempsky for spotting this inconsistency. Fixes #22001. Change-Id: I51c65a76f38a3e16788b6a3b57932dad3436dc7e Reviewed-on: https://go-review.googlesource.com/69510 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 03 Oct, 2017 1 commit
-
-
griesemer authored
Apply gofmt to src, misc. Fixes #22111. Change-Id: Ib1bda0caaf2c1787a8137b7a61bbef7a341cc68c Reviewed-on: https://go-review.googlesource.com/67633 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 27 Sep, 2017 1 commit
-
-
Daniel Martí authored
Very similar fix to the one made in golang.org/cl/65655. This time it's for switches on interface values, as we look for duplicates in a different manner to keep types in mind. As before, add a small regression test. Updates #22001. Fixes #22063. Change-Id: I9a55d08999aeca262ad276b4649b51848a627b02 Reviewed-on: https://go-review.googlesource.com/66450 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 24 Sep, 2017 1 commit
-
-
Daniel Martí authored
This is a regression introduced by myself in golang.org/cl/41852, confirmed by the program that reproduces the crash that can be seen in the added test. Fixes #21988. Change-Id: I18d5b2b3de63ced84db705b18490b00b16b59e02 Reviewed-on: https://go-review.googlesource.com/65655 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 19 Sep, 2017 1 commit
-
-
Matthew Dempsky authored
Previously, we used OXFALL vs OFALL to distinguish fallthrough statements that had been validated. Because in the Node AST we flatten statement blocks, OXCASE and OXFALL needed to keep track of their block scopes for this purpose. Now that we have an AST that keeps these separate, we can just perform the validation earlier. Passes toolstash-check. Fixes #14540. Change-Id: I8421eaba16c2b3b72c9c5483b5cf20b14261385e Reviewed-on: https://go-review.googlesource.com/61130 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Robert Griesemer <gri@golang.org>
-
- 15 Aug, 2017 1 commit
-
-
Keith Randall authored
We don't use it any more, remove it. Change-Id: I76ce1a4c2e7048fdd13a37d3718b5abf39ed9d26 Reviewed-on: https://go-review.googlesource.com/44474Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
- 19 May, 2017 1 commit
-
-
Daniel Martí authored
Instead of just printing the value, print the original node to make the error more human-friendly. Also print the value if its string form is different than the original node, to make sure it's obvious what value was duplicated. This means that "case '@', '@':", which used to print: duplicate case 64 in switch Will now print: duplicate case '@' (value 64) in switch Factor this logic out into its own function to reuse it in range cases and any other place where we might want to print a node and its value in the future. Also needed to split the errorcheck files because expression switch case duplicates are now detected earlier, so they stop the compiler before it gets to generating the AST and detecting the type switch case duplicates. Fixes #20112. Change-Id: I9009b50dec0d0e705e5de9c9ccb08f1dce8a5a99 Reviewed-on: https://go-review.googlesource.com/41852 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 30 Apr, 2017 1 commit
-
-
Todd Neal authored
Fixes #20185 Fixes #19977 Change-Id: I8434713d20616ff0c0bc8f33f017e2548a5cccfa Reviewed-on: https://go-review.googlesource.com/42210 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
- 26 Apr, 2017 1 commit
-
-
Josh Bleecher Snyder authored
Change-Id: Id5aa4a1499068bf2d3497b21d794f970b7e47fdf Reviewed-on: https://go-review.googlesource.com/41795 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 07 Apr, 2017 1 commit
-
-
Robert Griesemer authored
- created new package cmd/compile/internal/types - moved Pkg, Sym, Type to new package - to break cycles, for now we need the (ugly) types/utils.go file which contains a handful of functions that must be installed early by the gc frontend - to break cycles, for now we need two functions to convert between *gc.Node and *types.Node (the latter is a dummy type) - adjusted the gc's code to use the new package and the conversion functions as needed - made several Pkg, Sym, and Type methods functions as needed - renamed constructors typ, typPtr, typArray, etc. to types.New, types.NewPtr, types.NewArray, etc. Passes toolstash-check -all. Change-Id: I8adfa5e85c731645d0a7fd2030375ed6ebf54b72 Reviewed-on: https://go-review.googlesource.com/39855Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 06 Apr, 2017 1 commit
-
-
Matthew Dempsky authored
Passes toolstash-check -all. Change-Id: Ic9eb0c52bedac185ab86cc62207f199d93700344 Reviewed-on: https://go-review.googlesource.com/39795 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Robert Griesemer <gri@golang.org>
-
- 01 Apr, 2017 1 commit
-
-
Emmanuel Odeke authored
Replace yyerror usages with yyerrorl in function typecheckswitch. Updates #19683. Change-Id: I7188cdecddd2ce4e06b8cee45b57f3765a979405 Reviewed-on: https://go-review.googlesource.com/38597Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 27 Mar, 2017 1 commit
-
-
Josh Bleecher Snyder authored
This eliminates references to lineno and other globals from ssa conversion. Passes toolstash-check. Updates #15756 Change-Id: I9792074fab0036b42f454b79139d0b27db913fb5 Reviewed-on: https://go-review.googlesource.com/38721 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 14 Mar, 2017 1 commit
-
-
Josh Bleecher Snyder authored
Reduces duplication and centralizes documentation. Moves all uses of FmtUnsigned and tconv inside fmt.go. Passes toolstash -cmp. Change-Id: If6d906e7e839de05f36423523a3a1d596e29807d Reviewed-on: https://go-review.googlesource.com/38141 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Robert Griesemer <gri@golang.org>
-
- 03 Mar, 2017 1 commit
-
-
Aliaksandr Valialkin authored
This reduces compiler memory usage by up to 4% - see compilebench results below. name old time/op new time/op delta Template 245ms ± 4% 241ms ± 2% -1.88% (p=0.029 n=10+10) Unicode 126ms ± 3% 124ms ± 3% ~ (p=0.105 n=10+10) GoTypes 805ms ± 2% 813ms ± 3% ~ (p=0.515 n=8+10) Compiler 3.95s ± 2% 3.83s ± 1% -2.96% (p=0.000 n=9+10) MakeBash 47.4s ± 4% 46.6s ± 1% -1.59% (p=0.028 n=9+10) name old user-ns/op new user-ns/op delta Template 324M ± 5% 326M ± 3% ~ (p=0.935 n=10+10) Unicode 186M ± 5% 178M ±10% ~ (p=0.067 n=9+10) GoTypes 1.08G ± 7% 1.09G ± 4% ~ (p=0.956 n=10+10) Compiler 5.34G ± 4% 5.31G ± 1% ~ (p=0.501 n=10+8) name old alloc/op new alloc/op delta Template 41.0MB ± 0% 39.8MB ± 0% -3.03% (p=0.000 n=10+10) Unicode 32.3MB ± 0% 31.0MB ± 0% -4.13% (p=0.000 n=10+10) GoTypes 119MB ± 0% 116MB ± 0% -2.39% (p=0.000 n=10+10) Compiler 499MB ± 0% 487MB ± 0% -2.48% (p=0.000 n=10+10) name old allocs/op new allocs/op delta Template 380k ± 1% 379k ± 1% ~ (p=0.436 n=10+10) Unicode 324k ± 1% 324k ± 0% ~ (p=0.853 n=10+10) GoTypes 1.15M ± 0% 1.15M ± 0% ~ (p=0.481 n=10+10) Compiler 4.41M ± 0% 4.41M ± 0% -0.12% (p=0.007 n=10+10) name old text-bytes new text-bytes delta HelloSize 623k ± 0% 623k ± 0% ~ (all equal) CmdGoSize 6.64M ± 0% 6.64M ± 0% ~ (all equal) name old data-bytes new data-bytes delta HelloSize 5.81k ± 0% 5.81k ± 0% ~ (all equal) CmdGoSize 238k ± 0% 238k ± 0% ~ (all equal) name old bss-bytes new bss-bytes delta HelloSize 134k ± 0% 134k ± 0% ~ (all equal) CmdGoSize 152k ± 0% 152k ± 0% ~ (all equal) name old exe-bytes new exe-bytes delta HelloSize 967k ± 0% 967k ± 0% ~ (all equal) CmdGoSize 10.2M ± 0% 10.2M ± 0% ~ (all equal) Change-Id: I1f40af738254892bd6c8ba2eb43390b175753d52 Reviewed-on: https://go-review.googlesource.com/37445Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 24 Feb, 2017 1 commit
-
-
Martin Möhrmann authored
Add Set3 function to complement existing Set1 and Set2 functions. Consistently use Set1, Set2 and Set3 for []*Node instead of Set where applicable. Add SetFirst and SetSecond for setting elements of []*Node to mirror First and Second for accessing elements in []*Node. Replace uses of Index by First and Second and SetIndex with SetFirst and SetSecond where applicable. Passes toolstash -cmp. Change-Id: I8255aae768cf245c8f93eec2e9efa05b8112b4e5 Reviewed-on: https://go-review.googlesource.com/37430 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 13 Feb, 2017 1 commit
-
-
Keith Randall authored
When doing i.(T) for non-empty-interface i and concrete type T, there's no need to read the type out of the itab. Just compare the itab to the itab we expect for that interface/type pair. Also optimize type switches by putting the type hash of the concrete type in the itab. That way we don't need to load the type pointer out of the itab. Update #18492 Change-Id: I49e280a21e5687e771db5b8a56b685291ac168ce Reviewed-on: https://go-review.googlesource.com/34810 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
David Chase <drchase@google.com>
-
- 02 Feb, 2017 1 commit
-
-
Emmanuel Odeke authored
Fixes #10561. Provides a better diagnostic message for failed type switch satisfaction in the case that a value receiver is being used in place of the pointer receiver that implements and satisfies the interface. Change-Id: If8c13ba13f2a8d81bf44bac7c3a66c12921ba921 Reviewed-on: https://go-review.googlesource.com/35235Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 08 Dec, 2016 1 commit
-
-
Robert Griesemer authored
Various minor adjustments. Change-Id: Iedfb97989f7bedaa3e9e8993b167e05f162434a7 Reviewed-on: https://go-review.googlesource.com/34136Reviewed-by:
David Lazar <lazard@golang.org>
-
- 16 Nov, 2016 1 commit
-
-
Daniel Martí authored
The use of these has been removed in recent commits. Change-Id: Iff36a3ee4dcdfe39c40e93e2601f44d3c59f7024 Reviewed-on: https://go-review.googlesource.com/33274 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 21 Oct, 2016 1 commit
-
-
Matthew Dempsky authored
Previously, the check to make sure we only considered constant cases for duplicates was skipping past integer ranges, because those use n.List instead of n.Left. Thanks to Emmanuel Odeke for investigating and helping to identify the root cause. Fixes #17517. Change-Id: I46fcda8ed9c346ff3a9647d50b83f1555587b740 Reviewed-on: https://go-review.googlesource.com/31716 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by:
Robert Griesemer <gri@golang.org>
-
- 26 Sep, 2016 1 commit
-
-
Alberto Donizetti authored
When processing a fallthrough, the casebody function in swt.go checks that the last statement has indeed Op == OXFALL (not-processed fallthrough) before setting it to OFALL (processed fallthrough). Unfortunately, sometimes the fallthrough statement won't be in the last node. For example, in case 0: return func() int {return 1}() fallthrough the compiler generates autotmp_0 = (func literal)(); return autotmp_0; fallthrough; <node VARKILL> with an OVARKILL node in the last position. casebody will find that last.Op != OXFALL, won't mark the fallthrough as processed, and the fallthrough line will cause a "fallthrough statement out of place" error. To fix this, we change casebody so that it searches for the fallthrough statement backwards in the statements list, without assuming that it'll be in the last position. Fixes #13262 Change-Id: I366c6caa7fd7442d365bd7a08cc66a552212d9b2 Reviewed-on: https://go-review.googlesource.com/22921 Run-TryBot: Quentin Smith <quentin@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Quentin Smith <quentin@golang.org>
-
- 16 Sep, 2016 1 commit
-
-
Dave Cheney authored
Follow up to CL 29134. Generated with gofmt -r 'Nod -> nod', plus three manual adjustments to the comments in syntax/parser.go Change-Id: I02920f7ab10c70b6e850457b42d5fe35f1f3821a Reviewed-on: https://go-review.googlesource.com/29136Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 15 Sep, 2016 2 commits
-
-
Dave Cheney authored
After the removal of the old backend many types are no longer referenced outside internal/gc. Make these functions private so that tools like honnef.co/go/unused can spot when they become dead code. In doing so this CL identified several previously public helpers which are no longer used, so removes them. This should be the last of the public functions. Change-Id: I7e9c4e72f86f391b428b9dddb6f0d516529706c3 Reviewed-on: https://go-review.googlesource.com/29134 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Dave Cheney authored
After the removal of the old backend many types are no longer referenced outside internal/gc. Make these functions private so that tools like honnef.co/go/unused can spot when they become dead code. In doing so this CL identified several previously public helpers which are no longer used, so removes them. Change-Id: Idc2d485f493206de9d661bd3cb0ecb4684177b32 Reviewed-on: https://go-review.googlesource.com/29133 Run-TryBot: Dave Cheney <dave@cheney.net> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 14 Sep, 2016 1 commit
-
-
Matthew Dempsky authored
Prepared with gofmt -r. Change-Id: Ib9f224cc20353acd9c5850dead1a2d32ca5427d3 Reviewed-on: https://go-review.googlesource.com/29165 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 13 Sep, 2016 1 commit
-
-
Robert Griesemer authored
Also: update fmt_test.go. Together with the previous commits, we are now at or below c85b77c2 levels in terms of allocation for the benchmark described in #16897 (old = c85b77c2, new = this commit): name old time/op new time/op delta Template 297ms ± 5% 284ms ± 3% -4.53% (p=0.000 n=27+29) Unicode 159ms ± 5% 151ms ± 5% -4.91% (p=0.000 n=28+30) GoTypes 985ms ± 5% 935ms ± 2% -5.13% (p=0.000 n=28+29) name old alloc/op new alloc/op delta Template 46.8MB ± 0% 45.7MB ± 0% -2.37% (p=0.000 n=30+30) Unicode 37.8MB ± 0% 37.9MB ± 0% +0.29% (p=0.000 n=29+30) GoTypes 143MB ± 0% 138MB ± 0% -3.64% (p=0.000 n=29+30) name old allocs/op new allocs/op delta Template 444k ± 0% 440k ± 0% -0.94% (p=0.000 n=30+30) Unicode 369k ± 0% 369k ± 0% +0.19% (p=0.000 n=29+30) GoTypes 1.35M ± 0% 1.34M ± 0% -1.24% (p=0.000 n=30+30) For #16897. Change-Id: Iedbeb408e2f1e68dd4a3201bf8813c8066ebf7ed Reviewed-on: https://go-review.googlesource.com/29089Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 12 Sep, 2016 1 commit
-
-
Robert Griesemer authored
- also consistently use %v instead of %s when we have a (gc) Formatter - rewrite done automatically using Formats test in -u (update) mode - manual update of format strings that were not single string constants - updated fmt.go, fmt_test.go accordingly - fmt_test: permit "%T" always Change-Id: I8f0704286aba5704600ad0c4a4484005b79b905d Reviewed-on: https://go-review.googlesource.com/28954Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 08 Sep, 2016 2 commits
-
-
Robert Griesemer authored
Change-Id: I80ed668cdeab0c4342b734d34b429927e0213e5a Reviewed-on: https://go-review.googlesource.com/28335Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Robert Griesemer authored
Change-Id: I878ac549430abc7859c30d176d52d52ce02c5827 Reviewed-on: https://go-review.googlesource.com/28333Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 30 Aug, 2016 1 commit
-
-
Josh Bleecher Snyder authored
Consider a switch statement like: switch x { case 1: // ... case 2, 3, 4, 5, 6: // ... case 5: // ... } Prior to this CL, the generated code treated 2, 3, 4, 5, and 6 independently in a binary search. With this CL, the generated code checks whether 2 <= x && x <= 6. walkinrange then optimizes that range check into a single unsigned comparison. Experiments suggest that the best min range size is 2, using binary size as a proxy for optimization. Binary sizes before/after this CL: cmd/compile: 14209728 / 14165360 cmd/go: 9543100 / 9539004 Change-Id: If2f7fb97ca80468fa70351ef540866200c4c996c Reviewed-on: https://go-review.googlesource.com/26770 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 23 Aug, 2016 3 commits
-
-
Josh Bleecher Snyder authored
No functional changes. Change-Id: I0961227e8a7be2d7c611452896843b6955303fa6 Reviewed-on: https://go-review.googlesource.com/26768Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
This sort is now only reachable for constant clauses for a non-interface switch expression value. Refactor a bit so that the few tests that remain are concise and easy to read. Add a test that string length takes priority over built-in string order. Change-Id: Iedaa11ff77049d5ad1bf14f54cbb8c3411d589a7 Reviewed-on: https://go-review.googlesource.com/26767 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
This is simpler than the sorting technique. It also allows us to simplify or eliminate some of the sorting decisions. Most important, sorting will not work when case clauses represent ranges of integers: There is no correct sort order that allows overlap detection by comparing neighbors. Using a map allows of a cheap, simple approach to ranges, namely to insert every int in the map. The equivalent approach for sorting means juggling temporary Nodes for every int, which is a lot more expensive. Change-Id: I84df3cb805992a1b04d14e0e4b2334f943e0ce05 Reviewed-on: https://go-review.googlesource.com/26766 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-