]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: pick position of implicit break statements more carefully
authorDavid Chase <drchase@google.com>
Wed, 25 Sep 2019 19:20:10 +0000 (15:20 -0400)
committerDavid Chase <drchase@google.com>
Thu, 3 Oct 2019 21:07:45 +0000 (21:07 +0000)
commit6139019efaa3faa9ec94a57ab8c15b726d516664
treef0bfcfc217dcdc554d9bd32d07db74cd6343fd74
parentf7f85bdc2c4a8a472a271a7d2333557ad6143eeb
cmd/compile: pick position of implicit break statements more carefully

The previous version used the position of the switch statement,
which makes for potentially jumpy stepping and introduces a large
number of statements repeating the line (tricky for inserting
breaks).  It also shared a single OBREAK node and this was not
really a syntax "tree".

This improves both the nostmt test (by 6 lines) and
reduces the total badness score from dwarf-goodness (by about 200).

Change-Id: I1f71b231a26f152bdb6ce9bc8f95828bb222f665
Reviewed-on: https://go-review.googlesource.com/c/go/+/188218
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/compile/internal/gc/swt.go