aboutsummaryrefslogtreecommitdiff
path: root/test/range.go
AgeCommit message (Collapse)Author
2017-09-12cmd/compile: improve single blank variable handling in walkrangeMartin Möhrmann
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>
2017-02-28cmd/compile: fix assignment order in string range loopMartin Möhrmann
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>
2016-10-28cmd/compile: move stringtoslicebytetmp to the backendMartin Möhrmann
- 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>
2014-07-16cmd/gc: implement 'for range x {'Russ Cox
Fixes #6102. LGTM=gri R=ken, r, gri CC=golang-codereviews https://golang.org/cl/113120043
2013-02-11test: a number of fixes.Alan Donovan
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
2012-05-24cmd/gc: fix parallel assignment in rangeRuss Cox
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
2012-02-24test/[n-r]*.go: add documentationRob Pike
The rename ones needed redoing. R=golang-dev, bradfitz, rsc CC=golang-dev https://golang.org/cl/5698054
2012-02-16test: use testlib (final 61)Russ Cox
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
2011-10-25cgo, goyacc, go/build, html, http, path, path/filepath, testing/quick, test: ↵Russ Cox
use rune Nothing terribly interesting here. R=golang-dev, bradfitz, gri, r CC=golang-dev https://golang.org/cl/5300043
2010-07-01gc: implement new len spec, range bug fix, optimizationRuss Cox
Fixes #885. R=ken2 CC=golang-dev https://golang.org/cl/1680048
2010-03-24delete all uses of panicln by rewriting them using panic or,Rob Pike
in the tests, println+panic. gofmt some tests too. R=rsc CC=golang-dev https://golang.org/cl/741041
2010-01-15Test evaluation of range variables.Ian Lance Taylor
R=rsc CC=golang-dev https://golang.org/cl/189088
2009-09-15last round: non-package codeRuss Cox
R=r DELTA=127 (38 added, 3 deleted, 86 changed) OCL=34640 CL=34650
2009-03-20range over channels.Russ Cox
also fix multiple-evaluation bug in range over arrays. R=ken OCL=26576 CL=26576