-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Commit 6139019
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>1 parent f7f85bd commit 6139019
1 file changed
+10
-4
lines changedLines changed: 10 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
268 | 268 |
| |
269 | 269 |
| |
270 | 270 |
| |
271 | - | ||
272 | 271 |
| |
273 | 272 |
| |
274 | 273 |
| |
| |||
290 | 289 |
| |
291 | 290 |
| |
292 | 291 |
| |
293 | - | ||
292 | + | ||
293 | + | ||
294 | + | ||
294 | 295 |
| |
295 | 296 |
| |
296 | 297 |
| |
297 | 298 |
| |
298 | 299 |
| |
299 | 300 |
| |
301 | + | ||
302 | + | ||
300 | 303 |
| |
301 | 304 |
| |
302 | 305 |
| |
| |||
469 | 472 |
| |
470 | 473 |
| |
471 | 474 |
| |
472 | - | ||
475 | + | ||
473 | 476 |
| |
474 | 477 |
| |
475 | 478 |
| |
| |||
480 | 483 |
| |
481 | 484 |
| |
482 | 485 |
| |
483 | - | ||
486 | + | ||
487 | + | ||
488 | + | ||
489 | + | ||
484 | 490 |
| |
485 | 491 |
| |
486 | 492 |
| |
|
0 commit comments