Age | Commit message (Collapse) | Author |
|
Refactor walkrange to treat "for _ = range a" as "for range a".
This avoids generating some later discarded nodes in the compiler.
Passes toolstash -cmp.
Change-Id: Ifb2e1ca3b8519cbb67e8ad5aad514af9d18f1ec4
Reviewed-on: https://go-review.googlesource.com/61017
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
|
|
Fixes #18376.
Change-Id: I4fe24f479311cd4cd1bdad9a966b681e50e3d500
Reviewed-on: https://go-review.googlesource.com/35955
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
|
|
- removes the runtime function stringtoslicebytetmp
- removes the generation of calls to stringtoslicebytetmp from the frontend
- adds handling of OSTRARRAYBYTETMP in the backend
This reduces binary sizes and avoids function call overhead.
Change-Id: Ib9988d48549cee663b685b4897a483f94727b940
Reviewed-on: https://go-review.googlesource.com/32158
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Martin Möhrmann <martisch@uos.de>
TryBot-Result: Gobot Gobot <gobot@golang.org>
|
|
Fixes #6102.
LGTM=gri
R=ken, r, gri
CC=golang-codereviews
https://golang.org/cl/113120043
|
|
Details:
- reorder.go: delete p8.
(Once expectation is changed per b/4627 it is identical to p1.)
- switch.go: added some more (degenerate) switches.
- range.go: improved error messages in a few cases.
- method.go: added tests of calls to promoted methods.
R=iant
CC=golang-dev
https://golang.org/cl/7306087
|
|
for expr1, expr2 = range slice
was assigning to expr1 and expr2 in sequence
instead of in parallel. Now it assigns in parallel,
as it should. This matters for things like
for i, x[i] = range slice.
Fixes #3464.
R=ken2
CC=golang-dev
https://golang.org/cl/6252048
|
|
The rename ones needed redoing.
R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5698054
|
|
X ,s;^// \$G (\$D/)?\$F\.go *$;// compile;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A *$;// build;g
X ,s;^// \$G (\$D/)?\$F\.go && \$L \$F\.\$A && \./\$A\.out *$;// run;g
X ,s;^// errchk \$G( -e)? (\$D/)?\$F\.go *$;// errorcheck;g
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5671080
|
|
use rune
Nothing terribly interesting here.
R=golang-dev, bradfitz, gri, r
CC=golang-dev
https://golang.org/cl/5300043
|
|
Fixes #885.
R=ken2
CC=golang-dev
https://golang.org/cl/1680048
|
|
in the tests, println+panic.
gofmt some tests too.
R=rsc
CC=golang-dev
https://golang.org/cl/741041
|
|
R=rsc
CC=golang-dev
https://golang.org/cl/189088
|
|
R=r
DELTA=127 (38 added, 3 deleted, 86 changed)
OCL=34640
CL=34650
|
|
also fix multiple-evaluation bug in range over arrays.
R=ken
OCL=26576
CL=26576
|