]> Cypherpunks repositories - gostls13.git/commit
exp/ssa: support multiple labels on same statement.
authorAlan Donovan <adonovan@google.com>
Tue, 26 Feb 2013 19:07:03 +0000 (14:07 -0500)
committerAlan Donovan <adonovan@google.com>
Tue, 26 Feb 2013 19:07:03 +0000 (14:07 -0500)
commitc8c16cfbb98b717dc6807228e8a6e3553ab63b64
tree5fb217f39d399fd74e59c64bb27bdcffb2894ede
parentb302d68ebcc2500e6e013ff5fed9c70b0e1ff3a4
exp/ssa: support multiple labels on same statement.

Actually it already worked since the spec only requires that
the one immediately preceding a for/switch/... be usable as
the target of a break or continue statement.

Added a test.
Also: allocate Function.lblocks on first use.

R=gri
CC=golang-dev
https://golang.org/cl/7365058
src/pkg/exp/ssa/builder.go
src/pkg/exp/ssa/func.go
src/pkg/exp/ssa/interp/testdata/coverage.go